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

Professional-grade mypy conf #1430

Open
MaxHalford opened this issue Nov 1, 2023 · 1 comment
Open

Professional-grade mypy conf #1430

MaxHalford opened this issue Nov 1, 2023 · 1 comment

Comments

@MaxHalford
Copy link
Member

Professional-grade mypy configuration - Wolt Blog

@e10e3
Copy link
Contributor

e10e3 commented Jul 24, 2024

As a remark, show_error_codes and no_implicit_optional are enabled by default in new versions of MyPy.

The configuration suggested by the blog post's author becomes:

disallow_untyped_defs = true
disallow_any_unimported = true
check_untyped_defs = true
warn_return_any = true
warn_unused_ignores = true

Alternatively, one can use the strict option to enable most of MyPy's features.

Some interesting optional error codes need to be enabled individually; there is ignore-without-code that goes well with the suggestion of warn_unused_ignores and forces each "ignore" directive to specify which error type is targetted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: No status
Development

No branches or pull requests

2 participants