Skip to content
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

[TODO] Get rid of the disabled MyPy error codes #923

Open
webknjaz opened this issue Jan 16, 2024 · 2 comments
Open

[TODO] Get rid of the disabled MyPy error codes #923

webknjaz opened this issue Jan 16, 2024 · 2 comments

Comments

@webknjaz
Copy link
Member

  1. Go through the disable_error_code entries in .mypy.ini
  2. Remove them one by one, and fix whatever they report in the actual Python modules
  3. Multiple small PRs are welcome and are preferred over a single gigantic one
  4. It should be easier to start with the test modules
  5. If there's just one violation in the module, move the disabled error code into that module inline, if it's not fixable
  6. If some rules are hard to fix/understand, switch to the easier ones first
@ShubhAgarwal-dev
Copy link

Do you know if this issue is still open..? It looks like it has been solved(I followed the conversation on #887)

@webknjaz
Copy link
Member Author

webknjaz commented Oct 6, 2024

@ShubhAgarwal-dev this is open, the disabled checks are @ https://github.com/aio-libs/multidict/blob/eff79eb/.mypy.ini#L7-L8 and https://github.com/aio-libs/multidict/blob/eff79eb/.mypy.ini#L31-L117.

Typing can be intimidating if you don't have experience already, however. But it's an important skill to have. Just drop the ignores one by one, fixing whatever they reveal. Use pre-commit run mypy-py313 --all-files to see what the disabled check hid once it's re-enabled and fix the typing problem. Repeat for each, but feel free to send PRs fixing subsets of linting violations, no need to do all at once, it can be overwhelming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants