Skip to content

Commit aa4e1ea

Browse files
committed
chore: remove more type anns
1 parent c24c5be commit aa4e1ea

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

koerce/patterns.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ def match(self, value, ctx: Context):
556556
else:
557557
raise NoMatchError()
558558

559-
klass: type
559+
klass: Any
560560
package: str
561561
for klass in type(value).__mro__:
562562
package = klass.__module__.split(".", 1)[0]
@@ -585,7 +585,7 @@ def GenericInstanceOf(typ) -> Pattern:
585585
@cython.final
586586
@cython.cclass
587587
class GenericInstanceOf1(Pattern):
588-
origin: type
588+
origin: Any
589589
name1: str
590590
pattern1: Pattern
591591

@@ -622,7 +622,7 @@ def match(self, value, ctx: Context):
622622
@cython.final
623623
@cython.cclass
624624
class GenericInstanceOf2(Pattern):
625-
origin: type
625+
origin: Any
626626
name1: str
627627
name2: str
628628
pattern1: Pattern
@@ -667,7 +667,7 @@ def match(self, value, ctx: Context):
667667
@cython.final
668668
@cython.cclass
669669
class GenericInstanceOfN(Pattern):
670-
origin: type
670+
origin: Any
671671
fields: dict[str, Pattern]
672672

673673
def __init__(self, typ):
@@ -796,7 +796,7 @@ def match(self, value, ctx: Context):
796796
@cython.final
797797
@cython.cclass
798798
class GenericCoercedTo(Pattern):
799-
origin: type
799+
origin: Any
800800
params: dict[str, type]
801801
checker: Pattern
802802

koerce/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def get_type_params(typ: Any) -> dict[TypeVar, type]:
7272
{'T': <class 'int'>, 'U': <class 'str'>}
7373
"""
7474
args: tuple = get_type_args(typ)
75-
origin: type = get_type_origin(typ) # or typ
75+
origin: Any = get_type_origin(typ) # or typ
7676
params: tuple = getattr(origin, "__parameters__", ())
7777

7878
result: dict[str, type] = {}

0 commit comments

Comments
 (0)