Skip to content

MyPy complains when trying to update DEFAULT_MATCHERS #93

@MaxShvets

Description

@MaxShvets

The advanced header matching section of the documentation suggests that to set a custom header matcher globally one can do:

HeaderValueMatcher.DEFAULT_MATCHERS["X-Foo"] = some_matcher

However, when attempting to actually do that in a project that uses mypy one gets the following error:

Unsupported target for indexed assignment ("Mapping[str, Callable[[Optional[str], str], bool]]")

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