-
Notifications
You must be signed in to change notification settings - Fork 13
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
fix mypy and ruff errors #257
Conversation
It's ready for review. |
e9776df
to
ea42a68
Compare
b11ce5e
to
7ed0c0a
Compare
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.
In general, there are many lines touched by this PR where Mapping
or Sequence
are not used for type hints instead of dict
and list
. I started commenting on them, but since I realized they are quite a lot I wonder if there is a reason for this. Before I keep leaving many comments, better to know ;)
ea42a68
to
e7f0420
Compare
7ed0c0a
to
36a474d
Compare
Merge activity
|
e7f0420
to
155f7f8
Compare
fix code or ignore type checking for some nonsense mypy errors
This ensures that the type hints are available both during type checking and at runtime, improving code clarity and reducing the chance of runtime errors related to type hints.
use broader type hints Sequence and Mapping to replace list and dict, respectively
use more general type when necessary
621635a
to
4d54869
Compare
Quality Gate passedIssues Measures |
This PR tries to solve all type hints errors (mypy), formatting errors (ruff) and typos for refactored code. As for non-refactored code, we keep it as it is.
As for type hints, the changes follow the rules below:
@overload
for different data types of the same argumentSequence
andMapping
to replacelist
anddict
, respectively, as much as possibleTYPE_CHECKING
to only avoid circular imports