-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
bugSomething isn't workingSomething isn't workingsuppressionRelated to supression of violations e.g. noqaRelated to supression of violations e.g. noqa
Description
Summary
Here's a comparison between version 0.14.13 and 0.14.14, no code change:
$ uv run ruff version
ruff 0.14.13 (b4b8299d6 2026-01-15)
$ rg -B 1 'preview = true' pyproject.toml
82-[tool.ruff.lint]
83:preview = true
$ uv run ruff check
All checks passed!
$ # edit pyproject.toml
$ uv sync
Resolved 191 packages in 131ms
Built app @ file:///Users/aquarhead/work/a
Prepared 1 package in 19ms
Uninstalled 2 packages in 3ms
Installed 2 packages in 2ms
~ app==1.10.0 (from file:///Users/aquarhead/work/a)
- ruff==0.14.13
+ ruff==0.14.14
$ rg -B 1 'preview = true' pyproject.toml
82-[tool.ruff.lint]
83:preview = true
$ uv run ruff version
ruff 0.14.14 (8b2e7b36f 2026-01-22)
$ uv run ruff check
E402 Module level import not at top of file
--> app/router.py:113:1
|
112 | # ruff: disable[E402, F401]
113 | import app.demand.worksheets
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
114 | import app.supply.worksheets
115 | import app.masterdata.worksheets
|
... (every line in the block gets 2 errors)
Our actual code usage is like this - we have 2 blocks with the exact same suppresion config, not sure if that's relevant:
# ruff: disable[E402, F401]
import app.demand.worksheets
import ...
# ruff: enable[E402, F401]
router.include_router(prefix="/blah", router=dynamic_router) # this relies on the imports above
# ruff: disable[E402, F401]
import ...
# ruff: enable[E402, F401]Not sure if it's the block suppresion or the preview mode check, I think this is the only feature we use from the preview mode.
Here's all the ruff configuration in pyproject.toml:
[tool.ruff]
line-length = 120
extend-exclude = ["alembic/versions/*.py"]
[tool.ruff.lint]
preview = true
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"C", # flake8-comprehensions
"B", # flake8-bugbear
"DTZ", # flake8-datetimez
"UP", # pyupgrade
"I", # isort
]
ignore = [
"E266", # We want more obvious block comments
]
[tool.ruff.lint.per-file-ignores]
# So we don't have to __all__
"__init__.py" = ["F401"]
[tool.ruff.lint.isort]
known-third-party = ["alembic"]Version
ruff 0.14.14 (8b2e7b3 2026-01-22)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingsuppressionRelated to supression of violations e.g. noqaRelated to supression of violations e.g. noqa