mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
remove imports from TYPE_CHECKING (py37+)
Committed via https://github.com/asottile/all-repos
This commit is contained in:
parent
170335cbb6
commit
d8b59300ce
2 changed files with 2 additions and 8 deletions
|
|
@ -5,9 +5,9 @@ import os
|
||||||
import random
|
import random
|
||||||
import re
|
import re
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
from typing import NoReturn
|
||||||
from typing import overload
|
from typing import overload
|
||||||
from typing import Sequence
|
from typing import Sequence
|
||||||
from typing import TYPE_CHECKING
|
|
||||||
|
|
||||||
import pre_commit.constants as C
|
import pre_commit.constants as C
|
||||||
from pre_commit import parse_shebang
|
from pre_commit import parse_shebang
|
||||||
|
|
@ -16,9 +16,6 @@ from pre_commit.prefix import Prefix
|
||||||
from pre_commit.util import cmd_output_b
|
from pre_commit.util import cmd_output_b
|
||||||
from pre_commit.xargs import xargs
|
from pre_commit.xargs import xargs
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
|
||||||
from typing import NoReturn
|
|
||||||
|
|
||||||
FIXED_RANDOM_SEED = 1542676187
|
FIXED_RANDOM_SEED = 1542676187
|
||||||
|
|
||||||
SHIMS_RE = re.compile(r'[/\\]shims[/\\]')
|
SHIMS_RE = re.compile(r'[/\\]shims[/\\]')
|
||||||
|
|
|
||||||
|
|
@ -2,13 +2,10 @@ from __future__ import annotations
|
||||||
|
|
||||||
import os.path
|
import os.path
|
||||||
from typing import Mapping
|
from typing import Mapping
|
||||||
from typing import TYPE_CHECKING
|
from typing import NoReturn
|
||||||
|
|
||||||
from identify.identify import parse_shebang_from_file
|
from identify.identify import parse_shebang_from_file
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
|
||||||
from typing import NoReturn
|
|
||||||
|
|
||||||
|
|
||||||
class ExecutableNotFoundError(OSError):
|
class ExecutableNotFoundError(OSError):
|
||||||
def to_output(self) -> tuple[int, bytes, None]:
|
def to_output(self) -> tuple[int, bytes, None]:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue