Skip to content

Commit 06f6b73

Browse files
Jdwashin9Jdwashin9
authored andcommitted
general code_cleanup 1806
1 parent 615f869 commit 06f6b73

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

mypy.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[mypy]
2-
check_untyped_defs = true
2+
check_untyped_defs = true

mypy/suggestions.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@
7474
TypeOfAny,
7575
TypeStrVisitor,
7676
TypeTranslator,
77-
TypeVarType,
7877
UninhabitedType,
7978
UnionType,
8079
get_proper_type,
@@ -653,7 +652,7 @@ def extract_from_decorator(self, node: Decorator) -> FuncDef | None:
653652
for ct in typ.items:
654653
if not (
655654
len(ct.arg_types) == 1
656-
#and isinstance(ct.arg_types[0], TypeVarType)
655+
# and isinstance(ct.arg_types[0], TypeVarType)
657656
and ct.arg_types[0] == ct.ret_type
658657
):
659658
return None

mypy/test_decorator_suggestion.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
from typing import Callable, TypeVar, ParamSpec
1+
from typing import Callable, ParamSpec, TypeVar
22

33
R = TypeVar("R")
44
P = ParamSpec("P")
55

6+
67
def dec(f: Callable[P, R]) -> Callable[P, R]:
78
return f
89

10+
911
@dec
1012
def f():
11-
print('hello world')
13+
print("hello world")

mypy/types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1656,7 +1656,7 @@ def copy_modified(
16561656
*,
16571657
variables: Bogus[Sequence[TypeVarLikeType]] = _dummy,
16581658
is_ellipsis_args: Bogus[bool] = _dummy,
1659-
imprecise_arg_kinds: Bogus[bool] = _dummy, # type: ignore
1659+
imprecise_arg_kinds: Bogus[bool] = _dummy, # type: ignore
16601660
) -> Parameters:
16611661
return Parameters(
16621662
arg_types=arg_types if arg_types is not _dummy else self.arg_types,

0 commit comments

Comments
 (0)