Skip to content

Commit 706d1e9

Browse files
authored
Merge pull request #2439 from pre-commit/all-repos_autofix_type-checking
remove imports from TYPE_CHECKING (py37+)
2 parents 170335c + d8b5930 commit 706d1e9

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

pre_commit/languages/helpers.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
import random
66
import re
77
from typing import Any
8+
from typing import NoReturn
89
from typing import overload
910
from typing import Sequence
10-
from typing import TYPE_CHECKING
1111

1212
import pre_commit.constants as C
1313
from pre_commit import parse_shebang
@@ -16,9 +16,6 @@
1616
from pre_commit.util import cmd_output_b
1717
from pre_commit.xargs import xargs
1818

19-
if TYPE_CHECKING:
20-
from typing import NoReturn
21-
2219
FIXED_RANDOM_SEED = 1542676187
2320

2421
SHIMS_RE = re.compile(r'[/\\]shims[/\\]')

pre_commit/parse_shebang.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,10 @@
22

33
import os.path
44
from typing import Mapping
5-
from typing import TYPE_CHECKING
5+
from typing import NoReturn
66

77
from identify.identify import parse_shebang_from_file
88

9-
if TYPE_CHECKING:
10-
from typing import NoReturn
11-
129

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

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy