Skip to content

Commit

Permalink
Type fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
corps committed Jul 15, 2024
1 parent b02fd60 commit eb32015
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/seer/dependency_injection.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def inject(c: _A) -> _A:

argspec = inspect.getfullargspec(c)

@functools.wraps(c)
@functools.wraps(c) # type: ignore
def wrapper(*args: Any, **kwargs: Any) -> Any:
new_kwds = {**kwargs}

Expand Down Expand Up @@ -193,12 +193,12 @@ def wrapper(*args: Any, **kwargs: Any) -> Any:
except KeyError:
raise AssertionError(f"Cannot inject argument {k} as it lacks annotations")

return c(*args, **new_kwds)
return c(*args, **new_kwds) # type: ignore

if inspect.isclass(original_type):
return type(original_type.__name__, (original_type,), dict(__init__=wrapper))
return type(original_type.__name__, (original_type,), dict(__init__=wrapper)) # type: ignore

return wrapper
return wrapper # type: ignore


def resolve(source: type[_A]) -> _A:
Expand Down

0 comments on commit eb32015

Please sign in to comment.