diff options
author | Bryan Newbold <bnewbold@archive.org> | 2021-10-27 14:49:58 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@archive.org> | 2021-10-27 18:25:58 -0700 |
commit | eb0c866d4e226606fe86e0f90af10c776e664a5c (patch) | |
tree | 732be3b53c9947ae8b416e4aaf0b8bb25b3998b9 /fatcat_scholar/hacks.py | |
parent | 4362e60383bef09d5989830b19ae2d5dec506620 (diff) | |
download | fatcat-scholar-eb0c866d4e226606fe86e0f90af10c776e664a5c.tar.gz fatcat-scholar-eb0c866d4e226606fe86e0f90af10c776e664a5c.zip |
lint: small cleanups, mostly E711 and E713
Diffstat (limited to 'fatcat_scholar/hacks.py')
-rw-r--r-- | fatcat_scholar/hacks.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fatcat_scholar/hacks.py b/fatcat_scholar/hacks.py index 541edda..2be90f0 100644 --- a/fatcat_scholar/hacks.py +++ b/fatcat_scholar/hacks.py @@ -68,8 +68,8 @@ def parse_accept_lang(header: str, options: typing.List[str]) -> typing.Optional def test_parse_accept_lang() -> None: - assert parse_accept_lang("", []) == None - assert parse_accept_lang("en,de", []) == None + assert parse_accept_lang("", []) is None + assert parse_accept_lang("en,de", []) is None assert parse_accept_lang("en,de", ["en"]) == "en" assert parse_accept_lang("en-GB,de", ["en"]) == "en" assert parse_accept_lang("zh_Hans_CN", ["en", "zh"]) == "zh" @@ -94,7 +94,7 @@ def wayback_direct_url(url: str) -> str: """ Re-writes a wayback replay URL to add the 'id_' suffix (or equivalent for direct file access) """ - if not "://web.archive.org" in url: + if "://web.archive.org" not in url: return url segments = url.split("/") if len(segments) < 6 or not segments[4].isdigit(): |