From 5ce7ce5bc3f8f7f004ca0a3b2f822d7d52d44cba Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Sun, 12 Feb 2023 18:37:52 -0500 Subject: [PATCH] Check-in updated snapshot for SIM111 (#2836) --- ...ke8_simplify__tests__SIM111_SIM111.py.snap | 40 ++++- ...simplify__tests__SIM111_SIM111.py.snap.new | 150 ------------------ 2 files changed, 39 insertions(+), 151 deletions(-) delete mode 100644 crates/ruff/src/rules/flake8_simplify/snapshots/ruff__rules__flake8_simplify__tests__SIM111_SIM111.py.snap.new diff --git a/crates/ruff/src/rules/flake8_simplify/snapshots/ruff__rules__flake8_simplify__tests__SIM111_SIM111.py.snap b/crates/ruff/src/rules/flake8_simplify/snapshots/ruff__rules__flake8_simplify__tests__SIM111_SIM111.py.snap index f656ad9763..589531aa48 100644 --- a/crates/ruff/src/rules/flake8_simplify/snapshots/ruff__rules__flake8_simplify__tests__SIM111_SIM111.py.snap +++ b/crates/ruff/src/rules/flake8_simplify/snapshots/ruff__rules__flake8_simplify__tests__SIM111_SIM111.py.snap @@ -1,5 +1,5 @@ --- -source: src/rules/flake8_simplify/mod.rs +source: crates/ruff/src/rules/flake8_simplify/mod.rs expression: diagnostics --- - kind: @@ -108,4 +108,42 @@ expression: diagnostics row: 157 column: 15 parent: ~ +- kind: + ConvertLoopToAll: + all: return all(x in y for x in iterable) + location: + row: 162 + column: 4 + end_location: + row: 164 + column: 24 + fix: + content: + - return all(x in y for x in iterable) + location: + row: 162 + column: 4 + end_location: + row: 165 + column: 15 + parent: ~ +- kind: + ConvertLoopToAll: + all: return all(x <= y for x in iterable) + location: + row: 170 + column: 4 + end_location: + row: 172 + column: 24 + fix: + content: + - return all(x <= y for x in iterable) + location: + row: 170 + column: 4 + end_location: + row: 173 + column: 15 + parent: ~ diff --git a/crates/ruff/src/rules/flake8_simplify/snapshots/ruff__rules__flake8_simplify__tests__SIM111_SIM111.py.snap.new b/crates/ruff/src/rules/flake8_simplify/snapshots/ruff__rules__flake8_simplify__tests__SIM111_SIM111.py.snap.new deleted file mode 100644 index 06ca4011b3..0000000000 --- a/crates/ruff/src/rules/flake8_simplify/snapshots/ruff__rules__flake8_simplify__tests__SIM111_SIM111.py.snap.new +++ /dev/null @@ -1,150 +0,0 @@ ---- -source: crates/ruff/src/rules/flake8_simplify/mod.rs -assertion_line: 47 -expression: diagnostics ---- -- kind: - ConvertLoopToAll: - all: return all(not check(x) for x in iterable) - location: - row: 25 - column: 4 - end_location: - row: 27 - column: 24 - fix: - content: - - return all(not check(x) for x in iterable) - location: - row: 25 - column: 4 - end_location: - row: 28 - column: 15 - parent: ~ -- kind: - ConvertLoopToAll: - all: return all(x.is_empty() for x in iterable) - location: - row: 33 - column: 4 - end_location: - row: 35 - column: 24 - fix: - content: - - return all(x.is_empty() for x in iterable) - location: - row: 33 - column: 4 - end_location: - row: 36 - column: 15 - parent: ~ -- kind: - ConvertLoopToAll: - all: return all(not check(x) for x in iterable) - location: - row: 64 - column: 4 - end_location: - row: 68 - column: 19 - fix: - content: - - return all(not check(x) for x in iterable) - location: - row: 64 - column: 4 - end_location: - row: 68 - column: 19 - parent: ~ -- kind: - ConvertLoopToAll: - all: return all(not check(x) for x in iterable) - location: - row: 83 - column: 4 - end_location: - row: 87 - column: 19 - fix: - content: - - return all(not check(x) for x in iterable) - location: - row: 83 - column: 4 - end_location: - row: 87 - column: 19 - parent: ~ -- kind: - ConvertLoopToAll: - all: return all(not check(x) for x in iterable) - location: - row: 134 - column: 4 - end_location: - row: 136 - column: 24 - fix: ~ - parent: ~ -- kind: - ConvertLoopToAll: - all: return all(not check(x) for x in iterable) - location: - row: 154 - column: 4 - end_location: - row: 156 - column: 24 - fix: - content: - - return all(not check(x) for x in iterable) - location: - row: 154 - column: 4 - end_location: - row: 157 - column: 15 - parent: ~ -- kind: - ConvertLoopToAll: - all: return all(x in y for x in iterable) - location: - row: 162 - column: 4 - end_location: - row: 164 - column: 24 - fix: - content: - - return all(x in y for x in iterable) - location: - row: 162 - column: 4 - end_location: - row: 165 - column: 15 - parent: ~ -- kind: - ConvertLoopToAll: - all: return all(x <= y for x in iterable) - location: - row: 170 - column: 4 - end_location: - row: 172 - column: 24 - fix: - content: - - return all(x <= y for x in iterable) - location: - row: 170 - column: 4 - end_location: - row: 173 - column: 15 - parent: ~ -