Skip to content

Commit

Permalink
fix for E721 errors raised by flake8 (#1289)
Browse files Browse the repository at this point in the history
  • Loading branch information
julianz- authored Jan 26, 2024
1 parent 7f3e4f9 commit 1508c4b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions tests/test_crypto.py
Original file line number Diff line number Diff line change
Expand Up @@ -1740,7 +1740,7 @@ def test_construction(self):
certificate = X509()
assert isinstance(certificate, X509)
assert type(certificate).__name__ == "X509"
assert type(certificate) == X509
assert type(certificate) is X509

def test_set_version_wrong_args(self):
"""
Expand Down Expand Up @@ -3148,7 +3148,7 @@ def test_construction(self):
"""
revoked = Revoked()
assert isinstance(revoked, Revoked)
assert type(revoked) == Revoked
assert type(revoked) is Revoked
assert revoked.get_serial() == b"00"
assert revoked.get_rev_date() is None
assert revoked.get_reason() is None
Expand Down Expand Up @@ -3443,8 +3443,8 @@ def test_get_revoked(self):

revs = crl.get_revoked()
assert len(revs) == 2
assert type(revs[0]) == Revoked
assert type(revs[1]) == Revoked
assert type(revs[0]) is Revoked
assert type(revs[1]) is Revoked
assert revs[0].get_serial() == b"03AB"
assert revs[1].get_serial() == b"0100"
assert revs[0].get_rev_date() == now
Expand Down
2 changes: 1 addition & 1 deletion tests/test_ssl.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def join_bytes_or_unicode(prefix, suffix):
The return type is the same as the type of ``prefix``.
"""
# If the types are the same, nothing special is necessary.
if type(prefix) == type(suffix):
if type(prefix) is type(suffix):
return join(prefix, suffix)

# Otherwise, coerce suffix to the type of prefix.
Expand Down

0 comments on commit 1508c4b

Please sign in to comment.