From 6433f64c0a8c3a6266b18e966ffba8e660094064 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jelmer=20Vernoo=C4=B3?= Date: Mon, 18 Nov 2024 13:38:54 +0000 Subject: [PATCH] ruff: Remove E741 --- pyproject.toml | 1 - tests/contrib/test_swift.py | 10 +++++----- tests/test_diff_tree.py | 4 ++-- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 65625ea93..03177e0a5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -103,7 +103,6 @@ ignore = [ "D205", "D417", "E501", # line too long - "E741", # ambiguous variable name ] [tool.ruff.lint.pydocstyle] diff --git a/tests/contrib/test_swift.py b/tests/contrib/test_swift.py index 940b7ee9c..b4100d7d6 100644 --- a/tests/contrib/test_swift.py +++ b/tests/contrib/test_swift.py @@ -205,13 +205,13 @@ def get_object(self, name, range=None): except KeyError: return None else: - l, r = range.split("-") + left, right = range.split("-") try: - if not l: - r = -int(r) - return self.store[name][r:] + if not left: + right = -int(right) + return self.store[name][right:] else: - return self.store[name][int(l) : int(r)] + return self.store[name][int(left) : int(right)] except KeyError: return None diff --git a/tests/test_diff_tree.py b/tests/test_diff_tree.py index 09823abd4..f7f4a9cc5 100644 --- a/tests/test_diff_tree.py +++ b/tests/test_diff_tree.py @@ -629,8 +629,8 @@ def _do_test_count_blocks_no_newline(self, count_blocks): def assertBlockCountEqual(self, expected, got): self.assertEqual( - {(hash(l) & 0xFFFFFFFF): c for (l, c) in expected.items()}, - {(h & 0xFFFFFFFF): c for (h, c) in got.items()}, + {(hash(block) & 0xFFFFFFFF): count for (block, count) in expected.items()}, + {(block & 0xFFFFFFFF): count for (block, count) in got.items()}, ) def _do_test_count_blocks_chunks(self, count_blocks):