Skip to content

Commit

Permalink
ruff: Remove E741
Browse files Browse the repository at this point in the history
  • Loading branch information
jelmer committed Nov 18, 2024
1 parent 96eba5b commit 6433f64
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ ignore = [
"D205",
"D417",
"E501", # line too long
"E741", # ambiguous variable name
]

[tool.ruff.lint.pydocstyle]
Expand Down
10 changes: 5 additions & 5 deletions tests/contrib/test_swift.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions tests/test_diff_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 6433f64

Please sign in to comment.