That's why this is already included as a linter rule in ruff (originally from flake8-boolean-trap)
docs.astral.sh/ruff/rul…
Also with useful hint of making the boolean argument keyword-only