Skip to content

Refactor all member access to go through checkmember.py (meta issue) #7724

Closed
@ilevkivskyi

Description

@ilevkivskyi
Member

There are bunch of places where we duplicate some parts of code for special logic in member access (such as properties, class methods, descriptors, __getattr__(), etc):

  • The checkmember.py itself
  • Override checks for variables
  • Override checks for methods
  • Multiple inheritance checks
  • Checks for special methods via check_op() and has_member()
  • Protocol implementation check

Here are some issues that will be solved (or significantly simplified) by refactoring this to go through the same place (probably checkmember.py):

Also I think having member access cleaned-up, centralized, and documented will open the way to finally solving #708 (currently the oldest high priority issue), and to having general support for descriptor protocol (for historical reasons, several things like properties are supported via some special-casing).

Activity

42 remaining items

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @sobolevn@97littleleaf11@ilevkivskyi

      Issue actions

        Refactor all member access to go through checkmember.py (meta issue) · Issue #7724 · python/mypy