Skip to content

unused-private-type-var (PYI018)#

Derived from the flake8-pyi linter.

What it does#

Checks for the presence of unused private TypeVar declarations.

Why is this bad?#

A private TypeVar that is defined but not used is likely a mistake, and should either be used, made public, or removed to avoid confusion.

Example#

import typing

_T = typing.TypeVar("_T")