Skip to content

Commit 503a968

Browse files
committed
fixes
1 parent 4c9c0ab commit 503a968

File tree

3 files changed

+3
-9
lines changed

3 files changed

+3
-9
lines changed

mypy/plugins/attrs.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,6 @@ def _parse_converter(
764764
converter_info.init_type = AnyType(TypeOfAny.from_error)
765765
return converter_info
766766

767-
converter_type = get_proper_type(converter_type)
768767
if isinstance(converter_type, CallableType) and converter_type.arg_types:
769768
converter_info.init_type = converter_type.arg_types[0]
770769
if not is_attr_converters_optional:

mypy/semanal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6765,7 +6765,7 @@ def _get_node_for_class_scoped_import(
67656765
# mypyc is absolutely convinced that `symbol_node` narrows to a Var in the following,
67666766
# when it can also be a FuncBase. Once fixed, `f` in the following can be removed.
67676767
# See also https://github.com/mypyc/mypyc/issues/892
6768-
f: Callable[[object], Any] = lambda x: x
6768+
f = cast(Callable[[object], Any], lambda x: x)
67696769
if isinstance(f(symbol_node), (Decorator, FuncBase, Var)):
67706770
# For imports in class scope, we construct a new node to represent the symbol and
67716771
# set its `info` attribute to `self.type`.

mypy/types.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2179,7 +2179,8 @@ def with_normalized_var_args(self) -> Self:
21792179
types_suffix = self.arg_types[var_arg_index + 1 :]
21802180
kinds_suffix = self.arg_kinds[var_arg_index + 1 :]
21812181
names_suffix = self.arg_names[var_arg_index + 1 :]
2182-
no_name: str | None = None # to silence mypy
2182+
names_middle: list[str | None]
2183+
no_name = cast("str | None", None)
21832184

21842185
# Now we have something non-trivial to do.
21852186
if unpack_index is None:
@@ -3725,12 +3726,6 @@ def find_unpack_in_list(items: Sequence[Type]) -> int | None:
37253726
unpack_index: int | None = None
37263727
for i, item in enumerate(items):
37273728
if isinstance(item, UnpackType):
3728-
# We cannot fail here, so we must check this in an earlier
3729-
# semanal phase.
3730-
# Funky code here avoids mypyc narrowing the type of unpack_index.
3731-
old_index = unpack_index
3732-
assert old_index is None
3733-
# Don't return so that we can also sanity check there is only one.
37343729
unpack_index = i
37353730
return unpack_index
37363731

0 commit comments

Comments
 (0)