Repository navigation
Update default rules for v0.17 - #28786
Merged
Merged
Conversation
Summary -- This makes a few modifications to our default rule set for v0.17. As the snapshots show, these had already been incorporated into our preview defaults via rule recategorization. This just ports them back to the stable default rules. This closes #27197, which brought the problems with the DTZ rules to our attention. F406 being a syntax error was raised in [this comment]. [this comment]: #27199 (comment) Test Plan -- Updated snapshots
|
| code | total | + violation | - violation | + fix | - fix |
|---|---|---|---|---|---|
| DTZ001 | 75 | 0 | 75 | 0 | 0 |
| DTZ005 | 58 | 0 | 58 | 0 | 0 |
| DTZ007 | 5 | 0 | 5 | 0 | 0 |
| DTZ011 | 4 | 0 | 4 | 0 | 0 |
| RUF100 | 2 | 2 | 0 | 0 | 0 |
| DTZ006 | 2 | 0 | 2 | 0 | 0 |
Linter (preview)
✅ ecosystem check detected no linter changes.
Merging this PR will improve performance by 7.28%
Performance Changes
Tip Curious why performance improved? Comment Comparing Footnotes
|
MichaReiser
approved these changes
Sep 23, 2026
2 of 3 tasks
ntBre
added a commit
that referenced
this pull request
Sep 25, 2026
Summary -- This makes a few modifications to our default rule set for v0.17. As the snapshots show, these had already been incorporated into our preview defaults via rule recategorization. This just ports them back to the stable default rules. This closes #27197, which brought the problems with the DTZ rules to our attention. F406 being a syntax error was raised in [this comment]. [this comment]: #27199 (comment) Test Plan -- Updated snapshots
ntBre
added a commit
that referenced
this pull request
Sep 25, 2026
Summary -- This makes a few modifications to our default rule set for v0.17. As the snapshots show, these had already been incorporated into our preview defaults via rule recategorization. This just ports them back to the stable default rules. This closes #27197, which brought the problems with the DTZ rules to our attention. F406 being a syntax error was raised in [this comment]. [this comment]: #27199 (comment) Test Plan -- Updated snapshots
ntBre
added a commit
that referenced
this pull request
Oct 1, 2026
Summary -- This makes a few modifications to our default rule set for v0.17. As the snapshots show, these had already been incorporated into our preview defaults via rule recategorization. This just ports them back to the stable default rules. This closes #27197, which brought the problems with the DTZ rules to our attention. F406 being a syntax error was raised in [this comment]. [this comment]: #27199 (comment) Test Plan -- Updated snapshots
ntBre
added a commit
that referenced
this pull request
Oct 9, 2026
Summary -- This makes a few modifications to our default rule set for v0.17. As the snapshots show, these had already been incorporated into our preview defaults via rule recategorization. This just ports them back to the stable default rules. This closes #27197, which brought the problems with the DTZ rules to our attention. F406 being a syntax error was raised in [this comment]. [this comment]: #27199 (comment) Test Plan -- Updated snapshots
ntBre
added a commit
that referenced
this pull request
Oct 9, 2026
Summary -- This makes a few modifications to our default rule set for v0.17. As the snapshots show, these had already been incorporated into our preview defaults via rule recategorization. This just ports them back to the stable default rules. This closes #27197, which brought the problems with the DTZ rules to our attention. F406 being a syntax error was raised in [this comment]. [this comment]: #27199 (comment) Test Plan -- Updated snapshots
tcely
added a commit
to meeb/tubesync
that referenced
this pull request
Oct 9, 2026
> Several of the flake8-datetimez rules > (DTZ001, DTZ005, DTZ006, DTZ007, DTZ011, DTZ012, and DTZ901) > are no longer enabled by default, while > undefined-local-with-nested-import-star-usage (F406), > which corresponds to a syntax error, is now enabled by default. https://github.com/astral-sh/ruff/releases/tag/0.17.0 astral-sh/ruff#28786
davidpoblador
added a commit
to alltuner/vibetuner
that referenced
this pull request
Oct 13, 2026
Bumps ruff to 0.17.0 and ty to 0.0.86. There is one commit per tool, and each one regenerates both lockfiles (`vibetuner-py/uv.lock` and root `uv.lock`) with only that package changed. ## ruff 0.17.0 (#2216) **Cause.** Config discovery did not change. Under both 0.16.10 and 0.17.0, `ruff check --show-settings` resolves to the root `.ruff.toml`, which is the symlink to `vibetuner-template/.ruff.toml`. What did change is ruff's **default rule set**. The [0.17.0 changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md#0170) (astral-sh/ruff#28786) removes `DTZ001`, `DTZ005`, `DTZ006`, `DTZ007`, `DTZ011`, `DTZ012` and `DTZ901` from the defaults and adds `F406`. Our `extend-select` never listed `DTZ`, so those rules quietly turned off. RUF100 then reported our 6 `# noqa: DTZ00x` comments as unused (`non-enabled: DTZ00x`). S101, BLE001 and S104 did **not** go stale: they are still in the 0.17 enabled set, and no RUF100 fires for them. Only the DTZ noqa comments were affected. **Fix.** Add `'DTZ'` to `extend-select` in `vibetuner-template/.ruff.toml`. The noqa comments stay as they are. - Enabled rules, 0.16.10 with the old config vs 0.17.0 with the new config: the only difference is `+F406`. - Enabled rules under 0.16.10, old config vs new config: identical. Under 0.16 all DTZ rules were already defaults. - `ruff check` is clean under both 0.16.10 and 0.17.0. - `ruff>=0.17.0` floor in the `dev` extra. **What changes for scaffolded apps.** `vibetuner-template/.ruff.toml` ships to every app. - A freshly scaffolded app already locks ruff 0.17.0, because the published `vibetuner[dev]` floor is `>=0.16.10`. Without this change, those apps silently lose the DTZ checks. Probe: `datetime.datetime.now()` passes with the old template config under 0.17 and is flagged `DTZ005` with the new one. - With this change they keep exactly the 0.16 rule set, plus whatever ruff 0.17 adds to the defaults itself (`F406`, which flags a syntax error anyway). - Apps still locked to ruff 0.16 see no change. - Not affected: - The new `datetime as dt` ICN001 convention, because ICN001 isn't enabled. - The new default `target-version` (3.11), because the template sets `requires-python`. I scaffolded an app from this branch into `./.tmp/` (`vibetuner scaffold new --template <worktree> --branch ... --defaults`). Its locked ruff 0.17.0 and ruff 0.16.10 both pass `ruff check`, and `ruff format --check` passes. ## ty 0.0.86 (#2217) ty 0.0.86 reported 3 errors and 2 warnings on this tree: - `test_capability_detection.py`: the tests instantiated abstract classes to get a `TypeError`. They now assert `inspect.isabstract(...)` (plus `__abstractmethods__ == {"detect"}`). That checks the same contract without calling the class. - `test_oauth_app.py:98`: the missing-required-fields test now uses `OAuthProviderAppModel.model_validate({"provider": "google"})`, the idiomatic way to validate incomplete input. - `test_robust_task.py:25`: the `@contextmanager` helper is now annotated `Generator[None, None, None]`. The `Iterator` overload is deprecated. - `services/s3_storage.py:385` (`redundant-condition` warning): this is a **ty false positive caused by the stub**. `types-aiobotocore-s3` types `GetBucketLocationOutputTypeDef.LocationConstraint` as non-null, but S3 returns `None` for us-east-1. I added a targeted `# ty: ignore[redundant-condition]` with that reason in the comment. The existing `crud.py` `_build_update_schema` ignore (`unsupported-operator` on `annotation | None`) is still needed. Removing it under 0.0.86 reproduces the error. `ty check --error unused-ignore-comment` reports no unused ignores anywhere in vibetuner-py. `ty check` is clean with `--python-version` 3.11, 3.12 and 3.13. A freshly scaffolded app from this branch (which locks ty 0.0.86 and ruff 0.17.0) passes both `ty check` and `ruff check`. ## Verification All commands were run with `UV_NO_CONFIG=1`. - `just lint-md lint-py lint-toml lint-jinja lint-yaml lint-po type-check type-check-py`: all pass (rebased on #2222, which fixed the djlint failures), as does `pre-commit run --all-files`. - `uv run --frozen --extra dev python -m pytest tests/unit tests/integration -q`: 1124 passed. The 37 warnings are third-party deprecations (slowapi's `asyncio.iscoroutinefunction`). - Lockfile diffs contain only ruff, ty and the matching `requires-dist` floors. There is no `[options]` stanza. Fixes #2216 Fixes #2217
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This makes a few modifications to our default rule set for v0.17. As the snapshots show, these had
already been incorporated into our preview defaults via rule recategorization. This just ports them
back to the stable default rules.
This closes #27197, which brought the problems with the DTZ rules to our attention. F406 being a
syntax error was raised in this comment.
Test Plan
Updated snapshots