Skip to content

missing-super-call - false positive in if TYPE_CHECKING block #5136

Description

@DetachHead

Describe the Bug

from typing import TYPE_CHECKING

if TYPE_CHECKING:
    class Foo:
        def __init__(self) -> None:
            ...

    class Bar(Foo):
        def __init__(self) -> None: ... # error
ERROR sandbox.py:9:13-21: Method `Bar.__init__` does not call the method of the same name in a parent class [missing-super-call]

if TYPE_CHECKING blocks should be treated the same as stubs, since they aren't executed at runtime

Sandbox Link

No response

(Only applicable for extension issues) IDE Information

No response

Activity

  1. added theissue type on Oct 7, 2026
  2. Aayushyaash commented on Oct 9, 2026

    @Aayushyaash
    Contributor

    i'd like to work on this. #claim

  3. github-actions commented on Oct 9, 2026

    @github-actions

    @Aayushyaash you've claimed this issue — it's now assigned to you. Thanks for picking it up! 🎉

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

Metadata

Metadata

Assignees

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions