Skip to content

Pyright always reports unused violations even after disabling them #94

Open
@vikigenius

Description

@vikigenius
from typing import Literal


class MyService(object):
    """My Service."""

    def __init__(self, env: Literal["prod", "dev", "stg"] = "stg", country: Literal["us", "ca"] = "us") -> None:
        super().__init__()
        a = 4

I have the following in my pyproject.toml

[tool.pyright]
include = ["src"]
exclude = ["notebooks"]
reportUnusedVariable = false
reportUnusedImport = false

And pyright still complains about all 3 env is not accessed country is not accessed and a is not accessed

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