aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2020-05-22 16:22:23 -0700
committerBryan Newbold <bnewbold@robocracy.org>2020-05-22 16:22:23 -0700
commitcc18d2c6eee7abf671f9d585b85b0360ded90598 (patch)
tree63543a5db7c76dc0326f77b85772f1364d5bd547
parentd8cf02dbdc6848be4de2710e54f4463d702b6e7c (diff)
parentcfc5d104e94a2f5d51878e33930e3ba83f0701c8 (diff)
downloadfatcat-cc18d2c6eee7abf671f9d585b85b0360ded90598.tar.gz
fatcat-cc18d2c6eee7abf671f9d585b85b0360ded90598.zip
Merge remote-tracking branch 'github/master'
-rw-r--r--LICENSE.md8
-rw-r--r--python/fatcat_tools/importers/jalc.py4
-rw-r--r--python/tests/harvest_state.py10
3 files changed, 11 insertions, 11 deletions
diff --git a/LICENSE.md b/LICENSE.md
index 2de9f769..5765d5b8 100644
--- a/LICENSE.md
+++ b/LICENSE.md
@@ -5,15 +5,15 @@ The schema files are:
Copyright, 2018 Bryan Newbold <bnewbold@robocracy.org)
-The python 'fatcat_openapi_client' API client library (under the
+The Python 'fatcat_openapi_client' API client library (under the
./python/fatcat_openapi_client/ directory), which is auto-generated from a
swagger/openapi schema specification, is released to the public domain.
-The rust 'fatcat-openapi' API library (under the ./rust/fatcat-openapi/
+The Rust 'fatcat-openapi' API library (under the ./rust/fatcat-openapi/
directory), which is auto-generated from the swagger/openapi schema
specification, is released to the public domain.
-The python 'fatcat' web interface, tests, scripts, and bots (under the
+The Python 'fatcat' web interface, tests, scripts, and bots (under the
./python/ directory, not including fatcat_openapi_client), unless otherwise specified
are released under the GNU Affero General Public License, version 3. A copy of
this license should be included in this repository. Unless otherwise indicated
@@ -21,7 +21,7 @@ this code is:
Copyright, 2018 Bryan Newbold <bnewbold@robocracy.org)
-The rust 'fatcat' API server, tests, scripts, and associated programs (under
+The Rust 'fatcat' API server, tests, scripts, and associated programs (under
the ./rust/fatcat/ directory), unless otherwise specified are released under
the GNU Affero General Public License, version 3. A copy of this license should
be included in this repository. Unless otherwise indicated this code is:
diff --git a/python/fatcat_tools/importers/jalc.py b/python/fatcat_tools/importers/jalc.py
index c2adc0d6..e30bb233 100644
--- a/python/fatcat_tools/importers/jalc.py
+++ b/python/fatcat_tools/importers/jalc.py
@@ -201,11 +201,11 @@ class JalcImporter(EntityImporter):
date = record.date or None
if date:
date = date.string
- if len(date) is 10:
+ if len(date) == 10:
release_date = datetime.datetime.strptime(date['completed-date'], DATE_FMT).date()
release_year = release_date.year
release_date = release_date.isoformat()
- elif len(date) is 4 and date.isdigit():
+ elif len(date) == 4 and date.isdigit():
release_year = int(date)
pages = None
diff --git a/python/tests/harvest_state.py b/python/tests/harvest_state.py
index 85cd2c99..da9bef84 100644
--- a/python/tests/harvest_state.py
+++ b/python/tests/harvest_state.py
@@ -11,7 +11,7 @@ def test_harvest_state():
hs = HarvestState(catchup_days=5)
assert max(hs.to_process) < today
- assert len(hs.to_process) is 5
+ assert len(hs.to_process) == 5
for d in list(hs.to_process):
hs.complete(d)
@@ -22,12 +22,12 @@ def test_harvest_state():
start_date=datetime.date(2000,1,1),
end_date=datetime.date(2000,1,3),
)
- assert len(hs.to_process) is 3
+ assert len(hs.to_process) == 3
hs = HarvestState(
start_date=datetime.date(2000,1,29),
end_date=datetime.date(2000,2,2),
)
- assert len(hs.to_process) is 5
+ assert len(hs.to_process) == 5
hs = HarvestState(catchup_days=0)
assert hs.next() is None
@@ -35,6 +35,6 @@ def test_harvest_state():
start_date=datetime.date(2000,1,1),
end_date=datetime.date(2000,1,3),
)
- assert len(hs.to_process) is 3
+ assert len(hs.to_process) == 3
hs.update('{"completed-date": "2000-01-02"}')
- assert len(hs.to_process) is 2
+ assert len(hs.to_process) == 2