Skip to content

Commit

Permalink
bump mypy to fix a bunch of issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jonapich committed Mar 21, 2024
1 parent 15d339f commit 833424f
Show file tree
Hide file tree
Showing 29 changed files with 425 additions and 365 deletions.
63 changes: 34 additions & 29 deletions coveo-arnparse/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion coveo-arnparse/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ bandit = "*"
black = "*"
coveo-testing = { path = "../coveo-testing", develop = true }
flake8 = "*"
mypy = "0.950"
mypy = "1.9.0"
pytest = "*"


Expand Down
63 changes: 34 additions & 29 deletions coveo-example-library/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion coveo-example-library/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ python = ">=3.8"
bandit = "*"
black = "*"
coveo-testing = { path = "../coveo-testing", develop = true }
mypy = "0.950"
mypy = "1.9.0"
pytest = "*"

[tool.stew.ci]
Expand Down
2 changes: 1 addition & 1 deletion coveo-functools/coveo_functools/flex/decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def _generate_callable_wrapper(fn: RealFunction, errors: ErrorBehavior) -> Wrapp
"""Class decorators"""

@functools.wraps(fn)
def wrapper(*args: Any, **kwargs: Any) -> T:
def wrapper(*args: Any, **kwargs: Any) -> T: # type: ignore[type-var]
value: T = fn(*args, **convert_kwargs_for_unpacking(kwargs, hint=fn, errors=errors))
if hasattr(value, "__dict__"):
value.__dict__[RAW_KEY] = kwargs
Expand Down
2 changes: 1 addition & 1 deletion coveo-functools/coveo_functools/flex/deserializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def convert_kwargs_for_unpacking(

# convert the values so they match the additional metadata if available, else fn's annotations.
converted_kwargs = {}
for arg_name, arg_hint in {**find_annotations(fn), **additional_metadata}.items(): # type: ignore[arg-type]
for arg_name, arg_hint in {**find_annotations(fn), **additional_metadata}.items():
if arg_name not in mapped_kwargs:
continue # this may be ok, for instance if the target argument has a default

Expand Down
Loading

0 comments on commit 833424f

Please sign in to comment.