Skip to content

PyLance does not appreciate @serializable.serializable_class #8

@whardier

Description

@whardier

Inadvertantly opened this ticket half way through writing the subject.

PyLance thinks that serializable.serializable_class decorated classes are untyped. I'm unsure if there is a proper way to resolve type based issues. The "fix" seems to be to have one undecorated class and one decorated class that references the former: i.e. "MyThing" and "SerializableMyThing" in order to allow for casting in individual programs.

Looking forward to some insight on this. CycloneDX-Python-Lib makes use of this library and it can be a bit cumbersome to work with classes provided by that library. Attempting to cast falls into the same trap.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions