Skip to content

Type hints of config do not accept other values than str #1064

@kasium

Description

@kasium
def foo(context: Context) -> None:
    context.config["some"] = True

fails in mypy with

x.py:5:30: error: Incompatible types in assignment (expression has type "bool", target has type "str")  [assignment]
        context.config["some"] = True

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions