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

TG-946 Add truthy-bool rule to pyproject.toml #51

Merged
merged 1 commit into from
Jan 8, 2024

Conversation

niccolomineo
Copy link
Member

Adds the pyproject rule implementing the following concept:

Sometimes code uses boolean checks on variables that can only be true. This is normally a sign of a mistake, either in the type hints or the implementation. Mypy has an optional check that can find such problematic boolean usage with its truthy-bool error code.

https://adamj.eu/tech/2022/10/24/python-type-hints-truthy-bool/

@niccolomineo niccolomineo self-assigned this Jan 8, 2024
@niccolomineo niccolomineo changed the title TG-946 Add truthy-bool rule to pyproject.toml TG-946 Add truthy-bool rule to pyproject.toml Jan 8, 2024
@niccolomineo niccolomineo merged commit 4fb6858 into main Jan 8, 2024
1 check passed
@niccolomineo niccolomineo deleted the feature/946-truthy-bool branch January 8, 2024 14:42
@trottomv trottomv restored the feature/946-truthy-bool branch January 12, 2024 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant