[stdlib] Add missing Final (#14613)

This commit is contained in:
Semyon Moroz
2025-08-21 10:18:20 +00:00
committed by GitHub
parent 9b5b3ecb0a
commit 9bb8c4f1f9
30 changed files with 197 additions and 187 deletions
+4 -4
View File
@@ -8,7 +8,7 @@ from _asyncio import (
_unregister_task as _unregister_task,
)
from collections.abc import AsyncIterator, Awaitable, Coroutine, Generator, Iterable, Iterator
from typing import Any, Literal, Protocol, TypeVar, overload, type_check_only
from typing import Any, Final, Literal, Protocol, TypeVar, overload, type_check_only
from typing_extensions import TypeAlias
from . import _CoroutineLike
@@ -82,9 +82,9 @@ else:
_TaskYieldType: TypeAlias = Future[object] | None
FIRST_COMPLETED = concurrent.futures.FIRST_COMPLETED
FIRST_EXCEPTION = concurrent.futures.FIRST_EXCEPTION
ALL_COMPLETED = concurrent.futures.ALL_COMPLETED
FIRST_COMPLETED: Final = concurrent.futures.FIRST_COMPLETED
FIRST_EXCEPTION: Final = concurrent.futures.FIRST_EXCEPTION
ALL_COMPLETED: Final = concurrent.futures.ALL_COMPLETED
if sys.version_info >= (3, 13):
@type_check_only
+2 -2
View File
@@ -9,8 +9,8 @@ if sys.platform == "win32":
__all__ = ("pipe", "Popen", "PIPE", "PipeHandle")
BUFSIZE: Final = 8192
PIPE = subprocess.PIPE
STDOUT = subprocess.STDOUT
PIPE: Final = subprocess.PIPE
STDOUT: Final = subprocess.STDOUT
def pipe(*, duplex: bool = False, overlapped: tuple[bool, bool] = (True, True), bufsize: int = 8192) -> tuple[int, int]: ...
class PipeHandle: