Skip to content

Commit 2b14b4f

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 7440c77 commit 2b14b4f

File tree

8 files changed

+21
-17
lines changed

8 files changed

+21
-17
lines changed

mypy/checker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
Literal,
1414
NamedTuple,
1515
Optional,
16+
TypeGuard,
1617
TypeVar,
1718
Union,
1819
cast,
1920
overload,
2021
)
21-
from typing import TypeGuard
2222
from typing_extensions import TypeAlias
2323

2424
import mypy.checkexpr

mypy/checkexpr.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
from collections import defaultdict
99
from collections.abc import Iterable, Iterator, Sequence
1010
from contextlib import contextmanager, nullcontext
11-
from typing import Callable, ClassVar, Final, Optional, cast, overload
12-
from typing import assert_never
11+
from typing import Callable, ClassVar, Final, Optional, assert_never, cast, overload
1312
from typing_extensions import TypeAlias
1413

1514
import mypy.checker

mypy/config_parser.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
import tomli as tomllib
1515

1616
from collections.abc import Mapping, MutableMapping, Sequence
17-
from typing import Any, Callable, Final, TextIO, Union
18-
from typing import Never
17+
from typing import Any, Callable, Final, Never, TextIO, Union
1918
from typing_extensions import TypeAlias
2019

2120
from mypy import defaults

mypy/constraints.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
from __future__ import annotations
44

55
from collections.abc import Iterable, Sequence
6-
from typing import TYPE_CHECKING, Final, cast
7-
from typing import TypeGuard
6+
from typing import TYPE_CHECKING, Final, TypeGuard, cast
87

98
import mypy.subtypes
109
import mypy.typeops

mypy/errors.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@
66
from collections import defaultdict
77
from collections.abc import Iterable, Iterator
88
from itertools import chain
9-
from typing import Callable, Final, NoReturn, Optional, TextIO, TypeVar
10-
from typing import Literal
11-
from typing_extensions import Self, TypeAlias
9+
from typing import Callable, Final, Literal, NoReturn, Optional, TextIO, TypeVar
10+
from typing_extensions import Self
1211

1312
from mypy import errorcodes as codes
1413
from mypy.error_formatter import ErrorFormatter

mypy/nodes.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
from collections import defaultdict
99
from collections.abc import Iterator, Sequence
1010
from enum import Enum, unique
11-
from typing import TYPE_CHECKING, Any, Callable, Final, Optional, TypeVar, Union, cast
12-
from typing import TypeGuard
11+
from typing import TYPE_CHECKING, Any, Callable, Final, Optional, TypeGuard, TypeVar, Union, cast
1312
from typing_extensions import TypeAlias
1413

1514
from mypy_extensions import trait

mypy/semanal.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@
5252

5353
from collections.abc import Collection, Iterable, Iterator
5454
from contextlib import contextmanager
55-
from typing import Any, Callable, Final, TypeVar, cast
56-
from typing import TypeGuard
55+
from typing import Any, Callable, Final, TypeGuard, TypeVar, cast
5756
from typing_extensions import TypeAlias
5857

5958
from mypy import errorcodes as codes, message_registry

mypy/types.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,19 @@
55
import sys
66
from abc import abstractmethod
77
from collections.abc import Iterable, Sequence
8-
from typing import TYPE_CHECKING, Any, ClassVar, Final, NewType, TypeVar, Union, cast, overload
9-
from typing import TypeGuard
10-
from typing_extensions import Self, TypeAlias
8+
from typing import (
9+
TYPE_CHECKING,
10+
Any,
11+
ClassVar,
12+
Final,
13+
NewType,
14+
TypeGuard,
15+
TypeVar,
16+
Union,
17+
cast,
18+
overload,
19+
)
20+
from typing_extensions import Self
1121

1222
import mypy.nodes
1323
from mypy.bogus_type import Bogus

0 commit comments

Comments
 (0)