Skip to content

Development Bug: pyright and other language servers cannot identify unresolved references on subclasses of StateMachine #515

Open
@comalice

Description

@comalice
  • Python State Machine version: 2.5.0
  • Python version: 3.12
  • Operating System: Windows 11

Description

As in the title, when StateMachine is subclassed, no unresolved references are found by pyright or similar language servers.

What I Did

In the following example code, the class without inheritance is flagged correctly as having an unresolved reference. The class with inheritance is not flagged correctly.

from statemachine import StateMachine


class MyStatemachine(StateMachine):
    def __init__(self):
        super().__init__()
        self.this_method_does_not_exist()

class MyNotStatemachine:
    def __init__(self):
        self.this_method_does_not_exist()

image

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions