8000 Address review · python/typeshed@27308f3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 27308f3

Browse files
committed
Address review
1 parent 9f40fb2 commit 27308f3

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

stubs/SQLAlchemy/sqlalchemy/util/_collections.pyi

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,11 @@ class WeakPopulateDict(dict[Any, Any]):
182182

183183
column_set = set
184184
column_dict = dict
185-
# Ignore Y042, this exists at runtime
186-
ordered_column_set: TypeAlias = OrderedSet[ColumnElement[Any]] # noqa: Y042
185+
# Ignore Y026, this isn't a type alias.
186+
# We have to do `ordered_column_set = OrderedSet[_T]
187+
# instead of `ordered_column_set = OrderedSet`,
188+
# or pyright complains
189+
ordered_column_set = OrderedSet[_T] # noqa: Y026
187190

188191
def unique_list(seq: Iterable[_T], hashfunc: Callable[[_T], Any] | None = ...) -> list[_T]: ...
189192

stubs/html5lib/html5lib/_tokenizer.pyi

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
import sys
22
from collections import OrderedDict
33
from typing import Any
4-
from typing_extensions import TypeAlias
54

65
entitiesTrie: Any
7-
# ignore Y042, this exists at runtime
86
if sys.version_info >= (3, 7):
9-
attributeMap: TypeAlias = dict[Any, Any] # noqa: Y042
7+
attributeMap = dict
108
else:
11-
attributeMap: TypeAlias = OrderedDict[Any, Any] # noqa: Y042
9+
attributeMap = OrderedDict
1210

1311
class HTMLTokenizer:
1412
stream: Any

stubs/psutil/psutil/__init__.pyi

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,8 @@ elif sys.platform == "darwin":
109109
elif sys.platform == "win32":
110110
from ._pswindows import pfullmem, pmem
111111
else:
112-
# ignore Y042, these exist at runtime
113-
pmem: TypeAlias = Any # noqa: Y042
114-
pfullmem: TypeAlias = Any # noqa: Y042
112+
class pmem(Any): ...
113+
class pfullmem(Any): ...
115114

116115
if sys.platform == "linux":
117116
PROCFS_PATH: str

0 commit comments

Comments
 (0)
0