Skip to content

Object attribute LSP violation #2747

Closed
Closed

Description

@roganov

MyPy should error if subclass is not compatible with its base class.

class A:
    x = None  # type: int

class B(A):
    x = None  # type: str

Activity

  1. gvanrossum commented on Jan 23, 2017

    @gvanrossum
    Member
  2. roganov commented on Jan 23, 2017

    @roganov
    Author

    Sorry, couldn't find relevant issue. Closing.

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions