[BE] Enable Ruff's Flake8 PYI018 (#111101)

Enable [unused-private-type-var (PYI018)](https://docs.astral.sh/ruff/rules/unused-private-type-var/#unused-private-type-var-pyi018)

Link: #110950

Pull Request resolved: https://github.com/pytorch/pytorch/pull/111101
Approved by: https://github.com/albanD
This commit is contained in:
isdanni 2023-10-12 16:26:17 +00:00 committed by PyTorch MergeBot
parent 53a9ac534c
commit dede1e96e2
2 changed files with 1 additions and 3 deletions

View File

@ -47,7 +47,6 @@ ignore = [
# these ignores are from RUFF perf; please fix!
"PERF203", "PERF4",
"PYI001", # these ignores are from PYI; please fix!
"PYI018",
"PYI019",
"PYI024",
"PYI034",

View File

@ -13,7 +13,7 @@ Add new types to `types.py` if these types are ATen/c10 related.
Add new types to `types_base.py` if they are basic and not attached to ATen/c10.
"""
from dataclasses import dataclass
from typing import Dict, TypeVar
from typing import Dict
from torchgen.model import BaseTy, ScalarType
@ -31,7 +31,6 @@ from .types_base import (
shortT,
)
_T = TypeVar("_T")
TENSOR_LIST_LIKE_CTYPES = [
"at::TensorList",