mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-12 07:44:16 +00:00
Merge pull request #1452 from asottile/type_init
add typing to src/flake8/__init__.py
This commit is contained in:
commit
c9cac9957b
2 changed files with 8 additions and 1 deletions
|
|
@ -107,6 +107,8 @@ no_implicit_optional = true
|
||||||
warn_unused_ignores = true
|
warn_unused_ignores = true
|
||||||
|
|
||||||
# TODO: until we opt in all the modules
|
# TODO: until we opt in all the modules
|
||||||
|
[mypy-flake8.__init__]
|
||||||
|
disallow_untyped_defs = true
|
||||||
[mypy-flake8.defaults]
|
[mypy-flake8.defaults]
|
||||||
disallow_untyped_defs = true
|
disallow_untyped_defs = true
|
||||||
[mypy-flake8.exceptions]
|
[mypy-flake8.exceptions]
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ This module
|
||||||
"""
|
"""
|
||||||
import logging
|
import logging
|
||||||
import sys
|
import sys
|
||||||
|
from typing import Optional
|
||||||
from typing import Type
|
from typing import Type
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
@ -40,7 +41,11 @@ LOG_FORMAT = (
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def configure_logging(verbosity, filename=None, logformat=LOG_FORMAT):
|
def configure_logging(
|
||||||
|
verbosity: int,
|
||||||
|
filename: Optional[str] = None,
|
||||||
|
logformat: str = LOG_FORMAT,
|
||||||
|
) -> None:
|
||||||
"""Configure logging for flake8.
|
"""Configure logging for flake8.
|
||||||
|
|
||||||
:param int verbosity:
|
:param int verbosity:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue