ruff
cff9c13c - feat: Update RUF055 to do var == value (#15605)

Comment changes are shownComment changes are hidden
Commit
182 days ago
feat: Update RUF055 to do var == value (#15605) This commit fixes RUF055 rule to format `re.fullmatch(pattern, var)` to `var == pattern` instead of the current `pattern == var` behaviour. This is more idiomatic and easy to understand. ## Summary This changes the current formatting behaviour of `re.fullmatch(pattern, var)` to format it to `var == pattern` instead of `pattern == var`. ## Test Plan I used a code file locally to see the updated formatting behaviour. Fixes https://github.com/astral-sh/ruff/issues/14733
Author
Parents
  • crates/ruff_linter/src/rules/ruff
    • rules
      • File
        unnecessary_regular_expression.rs
    • snapshots
      • ruff_linter__rules__ruff__tests__preview__RUF055_RUF055_0.py.snap