posit-bakery/pyproject.toml sets [tool.ruff.lint] select = ["T201"]. Ruff's select replaces the default rule set. It does not add to it. Only T201 is active, so every other rule is off. Commit a13d14ff added this setting on 2024-11-22.
This is not a theoretical problem. 80 findings appear when pyflakes is active. Four of them are defects:
requires-python = ">=3.10" is wrong. posit_bakery/error.py defines three classes that subclass the builtin ExceptionGroup. That class exists only from Python 3.11 (PEP 654). The metadata permits installation on Python 3.10. The CLI then stops with NameError, because cli/build.py imports error.py. The trove classifiers also advertise Python 3.10.
- Four tests never ran. A second definition with the same name shadowed each one. One is a parametrized
test_build_args with about sixteen cases. A copy of cli_cwd_context also shadowed the cli_tmpcontext fixture.
- A call to an undefined function passed the lint step.
_emit_summary() did not exist. Rule F821 reports it.
- Nine bare
except: clauses in CLI handlers catch BaseException. As a result, a handler catches Ctrl-C and shows it as a command failure.
mypy finds some of these problems. mypy does not run in CI.
posit-bakery/pyproject.tomlsets[tool.ruff.lint] select = ["T201"]. Ruff'sselectreplaces the default rule set. It does not add to it. OnlyT201is active, so every other rule is off. Commita13d14ffadded this setting on 2024-11-22.This is not a theoretical problem. 80 findings appear when pyflakes is active. Four of them are defects:
requires-python = ">=3.10"is wrong.posit_bakery/error.pydefines three classes that subclass the builtinExceptionGroup. That class exists only from Python 3.11 (PEP 654). The metadata permits installation on Python 3.10. The CLI then stops withNameError, becausecli/build.pyimportserror.py. The trove classifiers also advertise Python 3.10.test_build_argswith about sixteen cases. A copy ofcli_cwd_contextalso shadowed thecli_tmpcontextfixture._emit_summary()did not exist. RuleF821reports it.except:clauses in CLI handlers catchBaseException. As a result, a handler catches Ctrl-C and shows it as a command failure.mypy finds some of these problems. mypy does not run in CI.