Skip to content

Commit 7e111b8

Browse files
committed
another fix?
1 parent 1ed680f commit 7e111b8

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

polyfactory/factories/typed_dict_factory.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from polyfactory.factories.base import BaseFactory
1212
from polyfactory.field_meta import FieldMeta, Null
1313

14-
TypedDictT = TypeVar("TypedDictT", bound=dict)
14+
TypedDictT = TypeVar("TypedDictT")
1515

1616

1717
class TypedDictFactory(Generic[TypedDictT], BaseFactory[TypedDictT]):

tests/test_type_coverage_generation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ class TypedThesaurus(TypedDict):
136136
union: int | str
137137
collection: list[int | str]
138138

139-
class TypedThesaurusFactory(TypedDictFactory[TypedThesaurus]): # type: ignore [type-var]
139+
class TypedThesaurusFactory(TypedDictFactory[TypedThesaurus]):
140140
__model__ = TypedThesaurus
141141

142142
results = list(TypedThesaurusFactory.coverage())
@@ -155,7 +155,7 @@ class TypedThesaurus(TypedDict):
155155
union: int | str
156156
collection: list[int | str]
157157

158-
class TypedThesaurusFactory(TypedDictFactory[TypedThesaurus]): # type: ignore [type-var]
158+
class TypedThesaurusFactory(TypedDictFactory[TypedThesaurus]):
159159
__model__ = TypedThesaurus
160160

161161
results = list(TypedThesaurusFactory.coverage())

tests/test_typeddict_factory.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class TypedDictModel(TypedDict):
1717

1818

1919
def test_factory_with_typeddict() -> None:
20-
class MyFactory(TypedDictFactory[TypedDictModel]): # type: ignore [type-var]
20+
class MyFactory(TypedDictFactory[TypedDictModel]):
2121
__model__ = TypedDictModel
2222

2323
result = MyFactory.build()
@@ -56,7 +56,7 @@ class TypedDictModel(TypedDict):
5656
list_field: list[dict[str, int]]
5757
optional_int: Required[int | None]
5858

59-
class TypedDictModelFactory(TypedDictFactory[TypedDictModel]): # type: ignore [type-var]
59+
class TypedDictModelFactory(TypedDictFactory[TypedDictModel]):
6060
__model__ = TypedDictModel
6161

6262
result = TypedDictModelFactory.build()
@@ -76,7 +76,7 @@ class TypedDictModel(TypedDict, total=False):
7676
list_field: list[dict[str, int]]
7777
optional_int: int | None
7878

79-
class TypedDictModelFactory(TypedDictFactory[TypedDictModel]): # type: ignore [type-var]
79+
class TypedDictModelFactory(TypedDictFactory[TypedDictModel]):
8080
__model__ = TypedDictModel
8181

8282
build_result = TypedDictModelFactory.batch(size=20)

0 commit comments

Comments
 (0)