Skip to content

Commit

Permalink
[ci] fixing ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Animenosekai committed Aug 25, 2023
1 parent 89c2a9f commit 6adac5d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cain/types/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class Type(cain.types.Object):
"""The keys for the annotations, in the order they appear in `annotations_values`"""
annotations_values: typing.List[Type]
"""The values for the annotations, in the order they appear in `annotations_values`"""
arguments: lityping.Listst[typing.Union[str, Type]]
arguments: typing.list[typing.Union[str, Type]]
"""The different type arguments"""

@classmethod
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "cain"
version = "1.1"
version = "1.1.1"
description = "A small yet powerful data format ✨"
license = "MIT"
authors = ["Animenosekai <[email protected]>"]
Expand Down
8 changes: 4 additions & 4 deletions tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def test_dumps():
class TestObject(Object):
bar: typing.Tuple[str, Optional[str], float, int]

assert (cain.dumps(['foo', {'bar': ('baz', None, 1.0, 2)}], typing.List[str, TestObject])
assert (cain.dumps(['foo', {'bar': ('baz', None, 1.0, 2)}], list[str, TestObject])
== b'\x00foo\x00\x00\x00baz\x00\x00\x00\x00\x80?\x00\x02')

assert cain.dumps("\"foo\bar", str) == b'"foo\x08ar\x00'
Expand All @@ -18,7 +18,7 @@ class TestObject(Object):


def test_dump():
schema = typing.List[str, Object[{"bar": typing.Tuple[str, Optional[str], float, int]}]]
schema = list[str, Object[{"bar": typing.Tuple[str, Optional[str], float, int]}]]
with open('test.cain', 'w+b') as fp:
cain.dump(['foo', {'bar': ('baz', None, 1.0, 2)}], fp, schema)

Expand All @@ -27,14 +27,14 @@ def test_dump():


def test_loads():
schema = typing.List[str, Object[{"bar": typing.Tuple[str, Optional[str], float, int]}]]
schema = list[str, Object[{"bar": typing.Tuple[str, Optional[str], float, int]}]]
loaded = cain.loads(b'\x00foo\x00\x00\x00baz\x00\x00\x00\x00\x80?\x00\x02', schema)
assert loaded[0] == "foo"
assert loaded[1]._cain_value == {'bar': ('baz', None, 1.0, 2)}


def test_load():
schema = typing.List[str, Object[{"bar": typing.Tuple[str, Optional[str], float, int]}]]
schema = list[str, Object[{"bar": typing.Tuple[str, Optional[str], float, int]}]]
with open('test.cain', 'w+b') as fp:
cain.dump(['foo', {'bar': ('baz', None, 1.0, 2)}], fp, schema)

Expand Down

0 comments on commit 6adac5d

Please sign in to comment.