File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ def deduplicated(lst):
1919 elif isinstance (lst , Generator ):
2020 return deduplicated (list (lst ))
2121 elif isinstance (lst , Iterator ):
22- return deduplicated ([ x for x in lst ] )
22+ return deduplicated (x for x in lst )
2323 elif not isinstance (lst , list ):
2424 return lst
2525 elif isinstance (lst [0 ], dict ):
@@ -62,7 +62,7 @@ def normalized_url(url):
6262 url = url .split ('#' )[0 ]
6363 url = url .removesuffix ('.git' )
6464 url = url_normalize (url )
65- return url
65+ return url # noqa: PIE781
6666
6767
6868def similar_urls (url1 , url2 ):
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ def doi_for_publication(pub_id, scheme=None):
2727 '''Given a publication id, try to get a corresponding DOI.'''
2828 if not pub_id :
2929 return ''
30- scheme = recognized_scheme ( pub_id ) if not scheme else scheme
30+ scheme = scheme if scheme else recognized_scheme ( pub_id )
3131 if scheme == 'doi' :
3232 return pub_id
3333 elif scheme == 'arxiv' :
You can’t perform that action at this time.
0 commit comments