Skip to content

Conversation

@Avasam
Copy link
Contributor

@Avasam Avasam commented Oct 31, 2025

Same changes as for pypa/setuptools#4886

Do test on some repos with lots of string formatting, f-string (UP032) is not necessarily a rule you may want to enforce all the time.

Reduced the conflicting-lint-rules section to only the codes for which you'd enable the entire group in parallel. Because the base E and F rules in default select are already non-conflicting and we use extend-select to start from said base.

Comment on lines +54 to +55
# Deprecated rules must now be selected by exact rule code
"ruff >= 0.13; sys_platform != 'cygwin'",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively, this can be set directly in ruff.toml with required-version. The UX is not great as it fails at runtime telling you to bust your cache, also astral-sh/ruff#19922

"UP043", # unnecessary-default-type-args

# Code modernization (strings, annotations, conditions, ...)
"UP", # pyupgrade
Copy link
Contributor Author

@Avasam Avasam Oct 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively:

	"C901", # complex-structure
	"I", # isort
	"PERF401", # manual-list-comprehension
	"UP", # pyupgrade (Code modernization for strings, annotations, conditions, ...)
	
	# Ensure modern type annotation syntax and best practices
	# Not including those covered by type-checkers or exclusive to Python 3.11+
	"FA", # flake8-future-annotations
	"F404", # late-future-import
	"PYI", # flake8-pyi

@Avasam Avasam force-pushed the update-ruff-and-simplify-configs branch from c5b6780 to 16bc2dc Compare October 31, 2025 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant