-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: introduce mypy to the project #145
ci: introduce mypy to the project #145
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can have a separate PR just for the isort?
If it gives less headaches, we can use pyright instead of mypy |
773f7b5
to
5f92690
Compare
I notified mypy developers of the issue we have in CI with the call to |
pytest_factoryboy/fixture.py
Outdated
@@ -191,7 +191,7 @@ def inject_into_caller(name: str, function: Callable, locals_: dict[str, Any]) - | |||
# Therefore, we can just check for __qualname__ to figure out if we are in a class, and apply the @staticmethod. | |||
is_class_or_function = "__qualname__" in locals_ | |||
if is_class_or_function: | |||
function = staticmethod(function) | |||
function = staticmethod(function) # type: ignore[assignment] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since the build is now failing because of a bug of mypy and this line, I would say to remove the type: ignore[assignment]
from here, and change the mypy builds to do a "ignore_outcome = true" so that we won't block on a failure on mypy for now.
Thank you @skarzi ! |
This PR is a draft and before merging it following things need to be done:
mypy
configuration