ruff
925c7f8d - [`refurb`] Advoid `operator.itemgetter` suggestion for single-item tuple (#11095)

Comment changes are shownComment changes are hidden
Commit
1 year ago
[`refurb`] Advoid `operator.itemgetter` suggestion for single-item tuple (#11095) ## Summary The `operator.itemgetter` behavior changes where there's more than one argument, such that `operator.itemgetter(0)` yields `r[0]`, rather than `(r[0],)`. Closes https://github.com/astral-sh/ruff/issues/11075.
Author
Parents
  • crates/ruff_linter
    • resources/test/fixtures/refurb
      • File
        FURB118.py
    • src/rules/refurb
      • rules
        • File
          reimplemented_operator.rs
      • snapshots
        • ruff_linter__rules__refurb__tests__FURB118_FURB118.py.snap