diff --git a/pyproject.toml b/pyproject.toml index 1184065c..f7e54a65 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,10 +39,14 @@ select = [ # Per-file rule ignores [tool.ruff.lint.per-file-ignores] -"binder/ipython_config.py" = ["E266"] # Trailing whitespace in comment -"tutorial/tests/test_object_oriented_programming.py" = [ - "B904", -] # suppress raise ... from err +# Trailing whitespace in comment +"binder/ipython_config.py" = ["E266"] +# suppress `raise ... from err` +# Why we ignore B904 from the object-oriented tests? +# We do want to raise an assertion error if the check on the solution function attributes fails, +# but Python by default will raise a TypeError via vars(solution_result) +# if the result is not a class and therefore doesn't have a __dict__ attribute. +"tutorial/tests/test_object_oriented_programming.py" = ["B904"] # Ruff formatting [tool.ruff.format]