Skip to content

Commit 8353f54

Browse files
Suppression of E721 is fixed (#13)
1 parent a42d123 commit 8353f54

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/exceptions.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def message(self) -> str:
88
assert isinstance(self, TestgresException)
99
r = super().__str__()
1010
assert r is not None
11-
assert type(r) == str # noqa: E721
11+
assert type(r) is str
1212
return r
1313

1414
@property
@@ -18,7 +18,7 @@ def source(self) -> typing.Optional[str]:
1818

1919
def __str__(self) -> str:
2020
r = self.message
21-
assert type(r) == str # noqa: E721
21+
assert type(r) is str
2222
return r
2323

2424

@@ -27,21 +27,21 @@ class InvalidOperationException(TestgresException):
2727
_source: typing.Optional[str]
2828

2929
def __init__(self, message: str, source: typing.Optional[str] = None):
30-
assert type(message) == str # noqa: E721
31-
assert source is None or type(source) == str # noqa: E721
30+
assert type(message) is str
31+
assert source is None or type(source) is str
3232
super().__init__()
3333
self._message = message
3434
self._source = source
3535
return
3636

3737
@property
3838
def message(self) -> str:
39-
assert type(self._message) == str # noqa: E721
39+
assert type(self._message) is str
4040
return self._message
4141

4242
@property
4343
def source(self) -> str:
44-
assert self._source is None or type(self._source) == str # noqa: E721
44+
assert self._source is None or type(self._source) is str
4545
return self._source
4646

4747
def __repr__(self) -> str:
@@ -52,5 +52,5 @@ def __repr__(self) -> str:
5252
repr(self._message),
5353
repr(self._source),
5454
)
55-
assert type(r) == str # noqa: E721
55+
assert type(r) is str
5656
return r

0 commit comments

Comments
 (0)