mirror of
https://github.com/PyCQA/flake8.git
synced 2026-03-30 18:56:53 +00:00
Merge branch 'typing_3_5_1' into 'master'
Make uses of typing compatible with python 3.5.1 / 3.5.0 Closes #498 See merge request pycqa/flake8!294
This commit is contained in:
commit
e21d74fcc4
2 changed files with 5 additions and 5 deletions
|
|
@ -5,7 +5,6 @@ import logging
|
|||
import sys
|
||||
import time
|
||||
from typing import List, Optional, Sequence # noqa: F401 (until flake8 3.7)
|
||||
from typing import Type, TYPE_CHECKING # noqa: F401 (until flake8 3.7)
|
||||
|
||||
import flake8
|
||||
from flake8 import checker
|
||||
|
|
@ -18,8 +17,10 @@ from flake8.options import aggregator, config
|
|||
from flake8.options import manager
|
||||
from flake8.plugins import manager as plugin_manager
|
||||
|
||||
if TYPE_CHECKING:
|
||||
if False: # `typing.TYPE_CHECKING` was introduced in 3.5.2
|
||||
# fmt: off
|
||||
# `typing.Type` as introduced in 3.5.2
|
||||
from typing import Type # noqa: F401 (until flake8 3.7)
|
||||
from flake8.formatting.base import BaseFormatter # noqa: F401, E501 (until flake8 3.7)
|
||||
# fmt: on
|
||||
|
||||
|
|
|
|||
|
|
@ -10,10 +10,9 @@ import sys
|
|||
import tokenize
|
||||
from typing import Callable, Dict, Generator # noqa: F401 (until flake8 3.7)
|
||||
from typing import List, Pattern, Sequence # noqa: F401 (until flake8 3,7)
|
||||
from typing import Tuple, TYPE_CHECKING # noqa: F401 (until flake8 3.7)
|
||||
from typing import Union # noqa: F401 (until flake8 3.7)
|
||||
from typing import Tuple, Union # noqa: F401 (until flake8 3.7)
|
||||
|
||||
if TYPE_CHECKING:
|
||||
if False: # `typing.TYPE_CHECKING` was introduced in 3.5.2
|
||||
from flake8.plugins.manager import Plugin # noqa: F401 (until flake8 3.7)
|
||||
|
||||
DIFF_HUNK_REGEXP = re.compile(r"^@@ -\d+(?:,\d+)? \+(\d+)(?:,(\d+))? @@.*$")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue