From b8746601802eef3bbefb1a49984d35574807ecd8 Mon Sep 17 00:00:00 2001 From: jupiterbjy Date: Thu, 20 Jan 2022 00:25:04 +0900 Subject: [PATCH 1/3] Added missing names in __all__ --- aiogoogle/__init__.py | 9 +++++++++ aiogoogle/excs.py | 3 +++ 2 files changed, 12 insertions(+) diff --git a/aiogoogle/__init__.py b/aiogoogle/__init__.py index 153fcaf..0f14729 100644 --- a/aiogoogle/__init__.py +++ b/aiogoogle/__init__.py @@ -20,3 +20,12 @@ HTTPError, ValidationError, ) +# import .utils # noqa: F401 imported but unused +# import .validate # noqa: F401 imported but unused + + +__all__.extend(client.__all__) +__all__.extend(resource.__all__) +__all__.extend(excs.__all__) +# __all__.extend(utils.__all__) +# __all__.extend(validate.__all__) Is validate in __all__ here mean validate.py or function validate? diff --git a/aiogoogle/excs.py b/aiogoogle/excs.py index 467406a..57a15d2 100644 --- a/aiogoogle/excs.py +++ b/aiogoogle/excs.py @@ -1,3 +1,6 @@ +__all__ = ["AiogoogleError", "ValidationError", "HTTPError", "AuthError"] + + class AiogoogleError(Exception): pass From ab2e0acc888d5dd83296cdad8a86c0156eb70e4b Mon Sep 17 00:00:00 2001 From: jupiterbjy Date: Thu, 20 Jan 2022 00:38:07 +0900 Subject: [PATCH 2/3] Included utils and validate, removed comments, added py310 in test --- aiogoogle/__init__.py | 6 ++---- tests/ALL_APIS.py | 2 -- tox.ini | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/aiogoogle/__init__.py b/aiogoogle/__init__.py index 0f14729..446efab 100644 --- a/aiogoogle/__init__.py +++ b/aiogoogle/__init__.py @@ -20,12 +20,10 @@ HTTPError, ValidationError, ) -# import .utils # noqa: F401 imported but unused -# import .validate # noqa: F401 imported but unused +from . import utils # noqa: F401 imported but unused +from . import validate # noqa: F401 imported but unused __all__.extend(client.__all__) __all__.extend(resource.__all__) __all__.extend(excs.__all__) -# __all__.extend(utils.__all__) -# __all__.extend(validate.__all__) Is validate in __all__ here mean validate.py or function validate? diff --git a/tests/ALL_APIS.py b/tests/ALL_APIS.py index 6b81bf3..b1fb295 100644 --- a/tests/ALL_APIS.py +++ b/tests/ALL_APIS.py @@ -95,7 +95,6 @@ ('recommender', 'v1'), ('redis', 'v1'), ('reseller', 'v1'), - ('run', 'v1'), ('runtimeconfig', 'v1'), ('safebrowsing', 'v4'), ('script', 'v1'), @@ -127,7 +126,6 @@ ('videointelligence', 'v1'), ('vision', 'v1'), ('webfonts', 'v1'), - ('webmasters', 'v3'), ('websecurityscanner', 'v1'), ('youtube', 'v3'), ('youtubeAnalytics', 'v2'), diff --git a/tox.ini b/tox.ini index da3fbce..7944fa4 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist=py36,py37,py38 +envlist=py36,py37,py38,py39,py310 [testenv] deps = From 2cb4b7171daad47ab5a5cc16c98b7301e86d7ca6 Mon Sep 17 00:00:00 2001 From: jupiterbjy Date: Fri, 21 Jan 2022 19:34:27 +0900 Subject: [PATCH 3/3] Explict import of submodule's __all__ & removed 2 unnecessary imports --- aiogoogle/__init__.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/aiogoogle/__init__.py b/aiogoogle/__init__.py index 446efab..69069b9 100644 --- a/aiogoogle/__init__.py +++ b/aiogoogle/__init__.py @@ -12,18 +12,17 @@ __license__, __copyright__, ) -from .client import Aiogoogle # noqa: F401 imported but unused -from .resource import GoogleAPI # noqa: F401 imported but unused +from .client import Aiogoogle, __all__ as _client_all # noqa: F401 imported but unused +from .resource import GoogleAPI, __all__ as _resource_all # noqa: F401 imported but unused from .excs import ( # noqa: F401 imported but unused AiogoogleError, AuthError, HTTPError, ValidationError, + __all__ as _exception_all ) -from . import utils # noqa: F401 imported but unused -from . import validate # noqa: F401 imported but unused -__all__.extend(client.__all__) -__all__.extend(resource.__all__) -__all__.extend(excs.__all__) +__all__.extend(_client_all) +__all__.extend(_resource_all) +__all__.extend(_exception_all)