Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more type annotations #1446

Merged
merged 5 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
ruff: Remove E741
  • Loading branch information
jelmer committed Nov 18, 2024
commit 6433f64c0a8c3a6266b18e966ffba8e660094064
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