Skip to content

Commit

Permalink
Fix new flake errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jelmer committed Aug 9, 2023
1 parent a5e47fe commit 47e157e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dulwich/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def hex_to_filename(path, hex):
# os.path.join accepts bytes or unicode, but all args must be of the same
# type. Make sure that hex which is expected to be bytes, is the same type
# as path.
if type(path) != type(hex) and getattr(path, "encode", None) is not None:
if type(path) is not type(hex) and getattr(path, "encode", None) is not None:
hex = hex.decode("ascii")
dir = hex[:2]
file = hex[2:]
Expand Down
4 changes: 2 additions & 2 deletions dulwich/tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1538,7 +1538,7 @@ def test_run_command_password_and_privkey(self):
)

for w in warnings_list:
if type(w) == type(expected_warning) and w.args == expected_warning.args:
if type(w) is type(expected_warning) and w.args == expected_warning.args:
break
else:
raise AssertionError(
Expand Down Expand Up @@ -1583,7 +1583,7 @@ def test_run_command_password(self):
)

for w in warnings_list:
if type(w) == type(expected_warning) and w.args == expected_warning.args:
if type(w) is type(expected_warning) and w.args == expected_warning.args:
break
else:
raise AssertionError(
Expand Down
2 changes: 1 addition & 1 deletion dulwich/tests/test_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@ def test_shell_hook_post_commit(self):
"non-zero status 1",
)
for w in warnings_list:
if type(w) == type(expected_warning) and w.args == expected_warning.args:
if type(w) is type(expected_warning) and w.args == expected_warning.args:
break
else:
raise AssertionError(
Expand Down

0 comments on commit 47e157e

Please sign in to comment.