Skip to content

Check keyword arguments in class definitions #2653

Open
@JelleZijlstra

Description

@JelleZijlstra

Currently, this incorrect code passes mypy:

class C(a=3):
    pass

It should check that __new__/__init_subclass__ accepts these keyword arguments.

This doesn't seem high-priority to fix since custom class kwargs are rarely used and this should usually cause import-time errors anyway when running the code, but I'm reporting it so it can be tracked.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions