Skip to content

Bug with dunder methods #7660

@klamike

Description

@klamike

Type: Bug

class Contains:
    def __contains__(self, x): return True

    def method(self, x): return x in self  # `in` does not point to __contains__

1 not in Contains()  # only `not` is highlighted instead of `not in`

Extension version: 2025.8.3
VS Code version: Code 1.103.2 (Universal) (6f17636121051a53c88d3e605c491d22af2ba755, 2025-08-20T16:45:34.255Z)
OS version: Darwin arm64 25.0.0
Modes:

Metadata

Metadata

Assignees

Labels

ai-triage-respondedIndicate whether the AI triage agent has responded to this issue.team needs to reproduceIssue has not been reproduced yet

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions