Skip to content

Commit

Permalink
feat: Support correct return type for Factory() call (pyright-only)
Browse files Browse the repository at this point in the history
  • Loading branch information
last-partizan committed Oct 14, 2023
1 parent 12ef4ad commit ecdd143
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion factory/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ class BaseFactory(Generic[T]):
UnknownStrategy = errors.UnknownStrategy
UnsupportedStrategy = errors.UnsupportedStrategy

def __new__(cls, *args, **kwargs):
def __new__(cls, *args, **kwargs) -> T:
"""Would be called if trying to instantiate the class."""
raise errors.FactoryError('You cannot instantiate BaseFactory')

Expand Down

0 comments on commit ecdd143

Please sign in to comment.