summaryrefslogtreecommitdiffstats
path: root/fatcat_scholar/schema.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2021-10-27 14:49:58 -0700
committerBryan Newbold <bnewbold@archive.org>2021-10-27 18:25:58 -0700
commiteb0c866d4e226606fe86e0f90af10c776e664a5c (patch)
tree732be3b53c9947ae8b416e4aaf0b8bb25b3998b9 /fatcat_scholar/schema.py
parent4362e60383bef09d5989830b19ae2d5dec506620 (diff)
downloadfatcat-scholar-eb0c866d4e226606fe86e0f90af10c776e664a5c.tar.gz
fatcat-scholar-eb0c866d4e226606fe86e0f90af10c776e664a5c.zip
lint: small cleanups, mostly E711 and E713
Diffstat (limited to 'fatcat_scholar/schema.py')
-rw-r--r--fatcat_scholar/schema.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/fatcat_scholar/schema.py b/fatcat_scholar/schema.py
index 633d30b..569cc10 100644
--- a/fatcat_scholar/schema.py
+++ b/fatcat_scholar/schema.py
@@ -313,15 +313,15 @@ def clean_small_int(raw: Optional[str]) -> Optional[int]:
def test_clean_small_int() -> None:
- assert clean_small_int("") == None
- assert clean_small_int(None) == None
- assert clean_small_int("asdf") == None
- assert clean_small_int("iiv") == None
+ assert clean_small_int("") is None
+ assert clean_small_int(None) is None
+ assert clean_small_int("asdf") is None
+ assert clean_small_int("iiv") is None
assert clean_small_int("123") == 123
- assert clean_small_int("1200003") == None
- assert clean_small_int("-123") == None
- assert clean_small_int("48844") == None
- assert clean_small_int("1990²") == None
+ assert clean_small_int("1200003") is None
+ assert clean_small_int("-123") is None
+ assert clean_small_int("48844") is None
+ assert clean_small_int("1990²") is None
def doi_split_prefix(doi: str) -> str:
@@ -356,8 +356,8 @@ def clean_url_conservative(url: Optional[str]) -> Optional[str]:
def test_clean_url_conservative() -> None:
- assert clean_url_conservative("") == None
- assert clean_url_conservative(None) == None
+ assert clean_url_conservative("") is None
+ assert clean_url_conservative(None) is None
assert (
clean_url_conservative("<http://en.wikipedia.org/wiki/Rumpelstiltskin>")
== "http://en.wikipedia.org/wiki/Rumpelstiltskin"