Skip to content

Commit

Permalink
Merge pull request #2439 from pre-commit/all-repos_autofix_type-checking
Browse files Browse the repository at this point in the history
remove imports from TYPE_CHECKING (py37+)
  • Loading branch information
asottile committed Jul 4, 2022
2 parents 170335c + d8b5930 commit 706d1e9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
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

0 comments on commit 706d1e9

Please sign in to comment.