-
Notifications
You must be signed in to change notification settings - Fork 79
LCORE-Test XYZZY #1430
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LCORE-Test XYZZY #1430
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -226,7 +226,14 @@ disable = ["R0801"] | |||||||||||||||||||||||||||
| extend-exclude = ["tests/profiles/syntax_error.py"] | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| [tool.ruff.lint] | ||||||||||||||||||||||||||||
| extend-select = ["TID251", "UP006", "UP007", "UP010", "UP017", "UP035", "RUF100", "B009", "B010", "DTZ005", "D202", "I001"] | ||||||||||||||||||||||||||||
| extend-select = ["ALL"] | ||||||||||||||||||||||||||||
| #extend-select = ["PLW"] | ||||||||||||||||||||||||||||
| #extend-select = ["PGH"] | ||||||||||||||||||||||||||||
| #extend-select = ["PTH"] | ||||||||||||||||||||||||||||
| #extend-select = ["ISC001"] | ||||||||||||||||||||||||||||
| #extend-select = ["PIE"] | ||||||||||||||||||||||||||||
| #extend-select = ["D"] # hodne automatickych oprav!!! | ||||||||||||||||||||||||||||
| ignore = ["UP045", "S101", "E501", "COM812"] | ||||||||||||||||||||||||||||
|
Comment on lines
+229
to
+236
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🌐 Web query:
💡 Result: No, extend-select = ["ALL"] does not enable newly added rules on future upgrades. Ruff's ["ALL"] selector enables all rules available in the current version of Ruff at the time of execution. New rules added in future Ruff versions (e.g., after upgrading from 0.11.x to 0.15.x) are not automatically enabled by ["ALL"] unless explicitly selected via prefixes or codes; ["ALL"] only covers existing rules. Ruff's recommended approach for stable CI configurations is to use explicit select (not extend-select) with specific rule prefixes or categories (e.g., select = ["E4", "E7", "E9", "F", "B"]), combined with ignore for exclusions. This makes the rule set explicit and reproducible across Ruff upgrades, avoiding surprises from new rules. Ruff explicitly advises: "Prefer select and ignore over extend-select and extend-ignore, to make your rule set explicit" and "Use ALL with discretion. Enabling ALL will implicitly enable new rules whenever you upgrade." Start small (e.g., defaults like E4, E7, E9, F) and add categories incrementally. ["ALL"] is intentionally under-documented as an anti-pattern for stable configs. Citations:
🏁 Script executed: grep -A 5 "ruff" pyproject.toml | head -20Repository: lightspeed-core/lightspeed-stack Length of output: 610
Using Suggested fix [tool.ruff.lint]
-extend-select = ["ALL"]
-#extend-select = ["PLW"]
-#extend-select = ["PGH"]
-#extend-select = ["PTH"]
-#extend-select = ["ISC001"]
-#extend-select = ["PIE"]
-#extend-select = ["D"] # hodne automatickych oprav!!!
+select = [
+ "B", "C4", "COM", "D", "E", "F", "I", "N", "PIE", "PL", "PTH", "RUF", "S", "SIM", "UP", "W"
+]
ignore = ["UP045", "S101", "E501", "COM812"]Also remove the commented-out 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| [tool.ruff.lint.flake8-tidy-imports.banned-api] | ||||||||||||||||||||||||||||
| unittest = { msg = "use pytest instead of unittest" } | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick | 🔵 Trivial
Remove commented alternative Ruff configs to reduce ambiguity.
Lines 230-235 look like stale toggle options and make the active policy harder to read/review. Keep only the effective configuration.
🤖 Prompt for AI Agents