Skip to content

Commit

Permalink
fix E721 rule
Browse files Browse the repository at this point in the history
  • Loading branch information
sckott committed Jul 22, 2024
1 parent 6526c09 commit dec3176
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion habanero/crossref/crossref.py
Original file line number Diff line number Diff line change
Expand Up @@ -1085,7 +1085,7 @@ def registration_agency(self, ids: Union[List[str], str], **kwargs) -> list:
True,
**kwargs
)
if res.__class__ != list:
if not isinstance(res, list):
k = []
k.append(res)
else:
Expand Down
4 changes: 2 additions & 2 deletions habanero/filterhandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def filter_handler(x=None):
else:
# lowercase bools
for k, v in x.items():
if v.__class__ == bool:
if isinstance(v, bool):
x[k] = str(v).lower()

# combine
Expand All @@ -28,7 +28,7 @@ def filter_handler(x=None):
# split any lists into duplicated key/filter names
newx = []
for k, v in x.items():
if v.__class__ == list:
if isinstance(v, list):
for a, b in enumerate(v):
newx.append(":".join([k, b]))
else:
Expand Down
2 changes: 1 addition & 1 deletion habanero/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def request(
url = url + path

if cursor_max.__class__.__name__ != "NoneType":
if cursor_max.__class__ != int:
if not isinstance(cursor_max, int):
raise ValueError("cursor_max must be of class int")

filt = filter_handler(filter)
Expand Down

0 comments on commit dec3176

Please sign in to comment.