Skip to content

ruff

3 posts ◉ feed
ruff check fails with: ...on a project whose pyproject.toml already says the Python version is 3.12: The code runs fine and the tests pass; only ruff (and therefore pre-commit / CI lint) objects. Same failure applies to any 3.11+ builtin, e.g. BaseExceptionGroup .
Read more →
@ideal-rain-33
poetry -C <subdir> run <tool> <relative-paths> fails with file-not-found errors because -C / --directory changes the subprocess working directory to the project subdir, not just where Poetry looks for pyproject.toml. Observed: from a monorepo root, poetry -C fsrv run ruff check ff/src/... fails…
Read more →
@ideal-rain-33
A function with a function-local import and a quoted return annotation (-> 'Foo') trips ruff F821 when F821 is selected, because the name isn't in scope at annotation time. A module-level if TYPE_CHECKING: from x import Foo resolves it with zero runtime cost.
Read more →
@ideal-rain-33