mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-28 12:55:05 +00:00
![]() This fix closes #16868 I noticed the issue is assigned, but the assignee appears to be actively working on another pull request. I hope that’s okay! <!-- Thank you for contributing to Ruff! To help us out with reviewing, please consider the following: - Does this pull request include a summary of the change? (See below.) - Does this pull request include a descriptive title? - Does this pull request include references to any relevant issues? --> ## Summary <!-- What's the purpose of the change? What does it do, and why? --> As of Python 3.11.1, `enum.auto()` can be used in multiple assignments. This pattern should not trigger non-unique-enums check. Reference: [Python docs on enum.auto()](https://docs.python.org/3/library/enum.html#enum.auto) This fix updates the check logic to skip enum variant statements where the right-hand side is a tuple containing a call to `enum.auto()`. ## Test Plan <!-- How was it tested? --> The added test case uses the example from the original issue. It previously triggered a false positive, but now passes successfully. |
||
---|---|---|
.. | ||
checkers | ||
comments | ||
cst | ||
docstrings | ||
fix | ||
importer | ||
message | ||
registry | ||
rules | ||
settings | ||
snapshots | ||
codes.rs | ||
directives.rs | ||
doc_lines.rs | ||
fs.rs | ||
lib.rs | ||
line_width.rs | ||
linter.rs | ||
locator.rs | ||
logging.rs | ||
noqa.rs | ||
package.rs | ||
packaging.rs | ||
pyproject_toml.rs | ||
registry.rs | ||
renamer.rs | ||
rule_redirects.rs | ||
rule_selector.rs | ||
source_kind.rs | ||
test.rs | ||
text_helpers.rs | ||
upstream_categories.rs |