Skip to content

Weird, but legal ** syntax not accepted #5580

Description

@warsaw

I saw this in real code, although I don't really understand the reason why this is done. Still, even though it's a bit weird, it's legal and I think mypy should allow it:

class Foo:
    def __init__(self, a=1, b=2):
        self.a = a
        self.b = b


Foo(**{})
$ mypy foo.py
foo.py:7: error: Keywords must be strings

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions