Skip to content

Type aliasing doesn't work with multiple assignment #8092

Closed
@WouldYouKindly

Description

@WouldYouKindly

Hello! I have the following code:

Name, Value = str, str
Map = typing.Dict[Name, Value]


>> error: Variable "Name" is not valid as a type
>> error: Variable "Value" is not valid as a type

Is this the intended behaviour or a bug?

mypy==0.750

[mypy]
python_version = 3.7
warn_unused_configs = True
warn_unreachable = True
warn_no_return=False
warn_redundant_casts=True
warn_return_any=False
warn_unused_ignores=True

# flake8-mypy expects the two following for sensible formatting
show_column_numbers=True
show_error_context=False

disallow_untyped_defs=True
disallow_untyped_calls=True
disallow_untyped_decorators = True
disallow_incomplete_defs = True
disallow_any_generics = True

strict_optional=True
check_untyped_defs=True
no_implicit_optional = True

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions