Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove imports from TYPE_CHECKING (py37+) #2439

Merged
merged 1 commit into from Jul 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 1 addition & 4 deletions pre_commit/languages/helpers.py
Expand Up @@ -5,9 +5,9 @@
import random
import re
from typing import Any
from typing import NoReturn
from typing import overload
from typing import Sequence
from typing import TYPE_CHECKING

import pre_commit.constants as C
from pre_commit import parse_shebang
Expand All @@ -16,9 +16,6 @@
from pre_commit.util import cmd_output_b
from pre_commit.xargs import xargs

if TYPE_CHECKING:
from typing import NoReturn

FIXED_RANDOM_SEED = 1542676187

SHIMS_RE = re.compile(r'[/\\]shims[/\\]')
Expand Down
5 changes: 1 addition & 4 deletions pre_commit/parse_shebang.py
Expand Up @@ -2,13 +2,10 @@

import os.path
from typing import Mapping
from typing import TYPE_CHECKING
from typing import NoReturn

from identify.identify import parse_shebang_from_file

if TYPE_CHECKING:
from typing import NoReturn


class ExecutableNotFoundError(OSError):
def to_output(self) -> tuple[int, bytes, None]:
Expand Down