Skip to content

__init_subclass__ is not type-checked #7190

@GoldsteinE

Description

@GoldsteinE

This code reproduces the bug: https://mypy-play.net/?gist=7c59359096250bb558136c4595fa1a47

I expect that I won't be able to create classes B and C because of incompatible __init_subclass__() arguments, however mypy doesn't find any errors in this. Second case (class C) will raise an exception at import time, but the first (class B) will pass.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy