Skip to content

False positives with Pylance in VS Code #104

@pm-gusmano

Description

@pm-gusmano

As I used this package, it seemed like the code's documentation was inconsistent with its API. I've developed a minimal example based on my use case:

# Shows error in pylance type analysis

from periodictable import elements

# If `type: ignore` is removed, pylance throws an error when it shouldn't.
print(elements.symbol('Fe').mass) # type: ignore

This code works fine, but it throws an error in pylance. A fix would be great, but if there was at least some indication of this behavior in the documentation, that would be really helpful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions