aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2021-10-27 14:55:15 -0700
committerBryan Newbold <bnewbold@archive.org>2021-10-27 18:25:58 -0700
commit1fcd19dc11a7b3b0e8c9020b7d1c2db4b62091f3 (patch)
tree865e083fad3a2e601c0f939503a7b015d8a6fa0a
parenteb0c866d4e226606fe86e0f90af10c776e664a5c (diff)
downloadfatcat-scholar-1fcd19dc11a7b3b0e8c9020b7d1c2db4b62091f3.tar.gz
fatcat-scholar-1fcd19dc11a7b3b0e8c9020b7d1c2db4b62091f3.zip
replace classmethods with staticmethods
-rw-r--r--fatcat_scholar/issue_db.py8
-rw-r--r--fatcat_scholar/schema.py4
2 files changed, 6 insertions, 6 deletions
diff --git a/fatcat_scholar/issue_db.py b/fatcat_scholar/issue_db.py
index 320c98d..8771f7f 100644
--- a/fatcat_scholar/issue_db.py
+++ b/fatcat_scholar/issue_db.py
@@ -38,8 +38,8 @@ class SimPubRow:
self.wikidata_qid,
)
- @classmethod
- def from_tuple(cls, row: Any) -> "SimPubRow":
+ @staticmethod
+ def from_tuple(row: Any) -> "SimPubRow":
return SimPubRow(
sim_pubid=row[0],
pub_collection=row[1],
@@ -82,8 +82,8 @@ class SimIssueRow:
self.release_count,
)
- @classmethod
- def from_tuple(cls, row: Any) -> "SimIssueRow":
+ @staticmethod
+ def from_tuple(row: Any) -> "SimIssueRow":
return SimIssueRow(
issue_item=row[0],
sim_pubid=row[1],
diff --git a/fatcat_scholar/schema.py b/fatcat_scholar/schema.py
index 569cc10..901379a 100644
--- a/fatcat_scholar/schema.py
+++ b/fatcat_scholar/schema.py
@@ -47,8 +47,8 @@ class IntermediateBundle(BaseModel):
datetime.datetime: lambda dt: dt.isoformat(),
}
- @classmethod
- def from_json(cls, obj: Dict[Any, Any]) -> "IntermediateBundle":
+ @staticmethod
+ def from_json(obj: Dict[Any, Any]) -> "IntermediateBundle":
return IntermediateBundle(
doc_type=DocType(obj.get("doc_type")),
releases=[