diff options
Diffstat (limited to 'python/fatcat_tools/cleanups')
-rw-r--r-- | python/fatcat_tools/cleanups/common.py | 6 | ||||
-rw-r--r-- | python/fatcat_tools/cleanups/file_release_bugfix.py | 4 | ||||
-rw-r--r-- | python/fatcat_tools/cleanups/file_short_wayback_ts.py | 4 | ||||
-rw-r--r-- | python/fatcat_tools/cleanups/files.py | 4 | ||||
-rw-r--r-- | python/fatcat_tools/cleanups/release_lowercase_doi.py | 4 |
5 files changed, 11 insertions, 11 deletions
diff --git a/python/fatcat_tools/cleanups/common.py b/python/fatcat_tools/cleanups/common.py index c8ca5800..1b467b59 100644 --- a/python/fatcat_tools/cleanups/common.py +++ b/python/fatcat_tools/cleanups/common.py @@ -5,7 +5,7 @@ import sys from collections import Counter from typing import Any, Dict, List, Sequence -from fatcat_openapi_client import ApiClient, Editgroup +from fatcat_openapi_client import DefaultApi, Editgroup from fatcat_tools.transforms import entity_from_dict, entity_to_dict @@ -29,7 +29,7 @@ class EntityCleaner: This class is pretty similar to EntityImporter, but isn't subclassed. """ - def __init__(self, api: ApiClient, entity_type: Any, **kwargs) -> None: + def __init__(self, api: DefaultApi, entity_type: Any, **kwargs) -> None: eg_extra = kwargs.get("editgroup_extra", dict()) eg_extra["git_rev"] = eg_extra.get( @@ -46,7 +46,7 @@ class EntityCleaner: ) self.editgroup_extra = eg_extra self.reset() - self.ac = ApiClient() + self.ac = DefaultApi() if self.dry_run_mode: print("Running in dry-run mode!") diff --git a/python/fatcat_tools/cleanups/file_release_bugfix.py b/python/fatcat_tools/cleanups/file_release_bugfix.py index dc27f9b5..cbc3a114 100644 --- a/python/fatcat_tools/cleanups/file_release_bugfix.py +++ b/python/fatcat_tools/cleanups/file_release_bugfix.py @@ -4,7 +4,7 @@ import sys from typing import Any, Dict import fatcat_openapi_client -from fatcat_openapi_client import ApiClient, FileEntity +from fatcat_openapi_client import DefaultApi, FileEntity from fatcat_tools import authenticated_api, public_api, uuid2fcid from fatcat_tools.importers.common import EntityImporter, JsonLinePusher @@ -24,7 +24,7 @@ class FileReleaseBugfix(EntityImporter): python -m fatcat_tools.cleans.file_release_bugfix - < blah.json """ - def __init__(self, api: ApiClient, **kwargs): + def __init__(self, api: DefaultApi, **kwargs): eg_desc = ( kwargs.pop("editgroup_description", None) diff --git a/python/fatcat_tools/cleanups/file_short_wayback_ts.py b/python/fatcat_tools/cleanups/file_short_wayback_ts.py index bdd49f9b..4e029f2b 100644 --- a/python/fatcat_tools/cleanups/file_short_wayback_ts.py +++ b/python/fatcat_tools/cleanups/file_short_wayback_ts.py @@ -5,7 +5,7 @@ import sys from typing import Any, Dict import fatcat_openapi_client -from fatcat_openapi_client import ApiClient, FileEntity +from fatcat_openapi_client import DefaultApi, FileEntity from fatcat_tools import authenticated_api, entity_from_dict, public_api from fatcat_tools.importers.common import EntityImporter, JsonLinePusher @@ -25,7 +25,7 @@ class FileShortWaybackTimestampCleanup(EntityImporter): python -m fatcat_tools.cleans.file_short_wayback_ts - < blah.json """ - def __init__(self, api: ApiClient, **kwargs): + def __init__(self, api: DefaultApi, **kwargs): eg_desc = ( kwargs.pop("editgroup_description", None) diff --git a/python/fatcat_tools/cleanups/files.py b/python/fatcat_tools/cleanups/files.py index 309924e3..7a81f759 100644 --- a/python/fatcat_tools/cleanups/files.py +++ b/python/fatcat_tools/cleanups/files.py @@ -1,4 +1,4 @@ -from fatcat_openapi_client import ApiClient, FileEntity +from fatcat_openapi_client import DefaultApi, FileEntity from fatcat_openapi_client.rest import ApiException from .common import EntityCleaner @@ -9,7 +9,7 @@ class FileCleaner(EntityCleaner): File fixups! """ - def __init__(self, api: ApiClient, **kwargs) -> None: + def __init__(self, api: DefaultApi, **kwargs) -> None: eg_desc = ( kwargs.pop("editgroup_description", None) diff --git a/python/fatcat_tools/cleanups/release_lowercase_doi.py b/python/fatcat_tools/cleanups/release_lowercase_doi.py index 5e3275db..d3f5bbd3 100644 --- a/python/fatcat_tools/cleanups/release_lowercase_doi.py +++ b/python/fatcat_tools/cleanups/release_lowercase_doi.py @@ -2,7 +2,7 @@ import argparse import os import sys -from fatcat_openapi_client import ApiClient, ApiException, ReleaseEntity, ReleaseExtIds +from fatcat_openapi_client import DefaultApi, ApiException, ReleaseEntity, ReleaseExtIds from fatcat_tools import authenticated_api, public_api from fatcat_tools.importers.common import EntityImporter, LinePusher @@ -27,7 +27,7 @@ class ReleaseLowercaseDoiCleanup(EntityImporter): update. """ - def __init__(self, api: ApiClient, **kwargs): + def __init__(self, api: DefaultApi, **kwargs): eg_desc = ( kwargs.pop("editgroup_description", None) |