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

Confusing description for --no-namespace-packages #17466

Closed
rafalkrupinski opened this issue Jul 2, 2024 · 2 comments · Fixed by #17472
Closed

Confusing description for --no-namespace-packages #17466

rafalkrupinski opened this issue Jul 2, 2024 · 2 comments · Fixed by #17472
Labels
bug mypy got something wrong good-first-issue

Comments

@rafalkrupinski
Copy link
Contributor

Bug Report

in the built-in help, the description for --no-namespace-packages is reversed.

To Reproduce

$ mypy --help

Expected Behavior

[...]
Import discovery:
  Configure how imports are discovered and followed.

  --no-namespace-packages   Disable support for namespace packages (PEP 420, __init__.py-less) (inverse: --namespace-packages)

Actual Behavior

[...]
  --no-namespace-packages   Support namespace packages (PEP 420, __init__.py-less) (inverse: --namespace-packages)

Description suggests that the flag enables support for namespace packages. Namespace packages are enabled by default and the flag disables it.
https://github.com/python/mypy/blob/f297917fc9eba13cc2a5b7e2e276394d94c03c8d/mypy/main.py#L564C4-L570C6

Your Environment

  • Mypy version used: 1.10.1
  • Mypy command-line flags: --help
@rafalkrupinski rafalkrupinski added the bug mypy got something wrong label Jul 2, 2024
@hauntsaninja
Copy link
Collaborator

PR welcome

@rafalkrupinski
Copy link
Contributor Author

dibs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mypy got something wrong good-first-issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants