diff options
| author | Nejc Habjan <nejc.habjan@siemens.com> | 2022-06-23 21:53:49 +0200 |
|---|---|---|
| committer | John Villalovos <john@sodarock.com> | 2022-06-23 16:15:16 -0700 |
| commit | 981b8448dbadc63d70867dc069e33d4c4d1cfe95 (patch) | |
| tree | d6cf6058007bb18325f9bf78af46fa9f3b19e1e1 | |
| parent | f0ac3cda2912509d0a3132be8344e41ddcec71ab (diff) | |
| download | gitlab-981b8448dbadc63d70867dc069e33d4c4d1cfe95.tar.gz | |
chore(gitlab): fix implicit re-exports for mpypy
| -rw-r--r-- | gitlab/__init__.py | 14 | ||||
| -rw-r--r-- | gitlab/const.py | 8 | ||||
| -rw-r--r-- | gitlab/exceptions.py | 3 | ||||
| -rw-r--r-- | pyproject.toml | 2 |
4 files changed, 26 insertions, 1 deletions
diff --git a/gitlab/__init__.py b/gitlab/__init__.py index 8cffecd..c8fc975 100644 --- a/gitlab/__init__.py +++ b/gitlab/__init__.py @@ -51,3 +51,17 @@ def __getattr__(name: str) -> Any: ) return getattr(gitlab.const, name) raise AttributeError(f"module {__name__} has no attribute {name}") + + +__all__ = [ + "__author__", + "__copyright__", + "__email__", + "__license__", + "__title__", + "__version__", + "Gitlab", + "GitlabList", +] +__all__.extend(gitlab.const._DEPRECATED) +__all__.extend(gitlab.exceptions.__all__) diff --git a/gitlab/const.py b/gitlab/const.py index 033044a..382590d 100644 --- a/gitlab/const.py +++ b/gitlab/const.py @@ -143,3 +143,11 @@ SEARCH_SCOPE_GLOBAL_SNIPPET_TITLES = SearchScope.GLOBAL_SNIPPET_TITLES.value SEARCH_SCOPE_PROJECT_NOTES = SearchScope.PROJECT_NOTES.value USER_AGENT: str = f"{__title__}/{__version__}" + +__all__ = [ + "AccessLevel", + "Visibility", + "NotificationLevel", + "SearchScope", +] +__all__.extend(_DEPRECATED) diff --git a/gitlab/exceptions.py b/gitlab/exceptions.py index 251ef7b..602a452 100644 --- a/gitlab/exceptions.py +++ b/gitlab/exceptions.py @@ -322,3 +322,6 @@ def on_http_error(error: Type[Exception]) -> Callable[[__F], __F]: return cast(__F, wrapped_f) return wrap + + +__all__ = [name for name in dir() if name.endswith("Error")] diff --git a/pyproject.toml b/pyproject.toml index 8912199..08a39db 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,7 +21,7 @@ warn_unused_ignores = true # disallow_any_generics = true # disallow_untyped_calls = true # no_implicit_optional = true -# no_implicit_reexport = true +no_implicit_reexport = true # strict_equality = true # warn_return_any = true |
