Browse Source

ruff: Remove E741

Jelmer Vernooij 4 months ago
parent
commit
6433f64c0a
3 changed files with 7 additions and 8 deletions
  1. 0 1
      pyproject.toml
  2. 5 5
      tests/contrib/test_swift.py
  3. 2 2
      tests/test_diff_tree.py

+ 0 - 1
pyproject.toml

@@ -103,7 +103,6 @@ ignore = [
     "D205",
     "D417",
     "E501",  # line too long
-    "E741",  # ambiguous variable name
 ]
 
 [tool.ruff.lint.pydocstyle]

+ 5 - 5
tests/contrib/test_swift.py

@@ -205,13 +205,13 @@ class FakeSwiftConnector:
             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
 

+ 2 - 2
tests/test_diff_tree.py

@@ -629,8 +629,8 @@ class RenameDetectionTest(DiffTestCase):
 
     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):