diff --git a/github/__init__.py b/github/__init__.py index 80abc201..680ae684 100644 --- a/github/__init__.py +++ b/github/__init__.py @@ -36,6 +36,22 @@ like :class:`github.NamedUser.NamedUser` or :class:`github.Repository.Repository All classes inherit from :class:`github.GithubObject.GithubObject`. """ +__all__ = [ + "BadAttributeException", + "BadCredentialsException", + "BadUserAgentException", + "enable_console_debug_logging", + "Github", + "GithubException", + "GithubIntegration", + "IncompletableObject", + "InputFileContent", + "InputGitAuthor", + "InputGitTreeElement", + "RateLimitExceededException", + "TwoFactorException", + "UnknownObjectException", +] import logging @@ -64,21 +80,3 @@ def enable_console_debug_logging(): # pragma no cover (Function useful only out logger = logging.getLogger("github") logger.setLevel(logging.DEBUG) logger.addHandler(logging.StreamHandler()) - - -__all__ = [ - BadAttributeException, - BadCredentialsException, - BadUserAgentException, - enable_console_debug_logging, - Github, - GithubException, - GithubIntegration, - IncompletableObject, - InputFileContent, - InputGitAuthor, - InputGitTreeElement, - RateLimitExceededException, - TwoFactorException, - UnknownObjectException, -] diff --git a/tox.ini b/tox.ini index 145508f6..9f3e2fd6 100644 --- a/tox.ini +++ b/tox.ini @@ -18,7 +18,7 @@ commands = pre-commit run --all-files --show-diff-on-failure ; Run mypy outside pre-commit because pre-commit runs mypy in a venv ; that doesn't have dependencies or their type annotations installed. - mypy github/ tests/ + mypy github tests [testenv:docs] basepython = python3.6 @@ -30,3 +30,8 @@ commands = sphinx-build doc build max-line-length = 88 select = C,E,F,W ignore = E266, E501, W503 + +[mypy] +python_version = 3.6 +ignore_missing_imports = True +namespace_packages = True