Fix all type issues flagged by mypy (#1484)

This commit is contained in:
Liuyang Wan
2020-04-26 12:40:05 +08:00
committed by GitHub
parent 6a6e7c2614
commit 546d601b50
2 changed files with 22 additions and 19 deletions
+16 -18
View File
@@ -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,
]
+6 -1
View File
@@ -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