redundant-open-modes (UP015) only recognizes seven redundant modes in Ruff 0.7.3:
|
enum OpenMode { |
|
U, |
|
Ur, |
|
Ub, |
|
RUb, |
|
R, |
|
Rt, |
|
Wt, |
|
} |
However, many other modes are redundant. t and U can always be omitted. r is redundant unless b or + is present. The characters can appear in any order; although the rule handles wt, for example, it misses tw.
More information:
redundant-open-modes(UP015) only recognizes seven redundant modes in Ruff 0.7.3:ruff/crates/ruff_linter/src/rules/pyupgrade/rules/redundant_open_modes.rs
Lines 112 to 120 in fbf140a
However, many other modes are redundant.
tandUcan always be omitted.ris redundant unlessbor+is present. The characters can appear in any order; although the rule handleswt, for example, it missestw.More information: