Use Final for unittest constants (#12447)

This commit is contained in:
Max Muoto
2024-07-28 05:03:02 -05:00
committed by GitHub
parent 0ffa2c5597
commit b40eb642e0
5 changed files with 30 additions and 17 deletions

View File

@@ -5,11 +5,11 @@ import unittest.result
import unittest.suite
from collections.abc import Iterable
from types import ModuleType
from typing import Any, Protocol
from typing import Any, Final, Protocol
from typing_extensions import deprecated
MAIN_EXAMPLES: str
MODULE_EXAMPLES: str
MAIN_EXAMPLES: Final[str]
MODULE_EXAMPLES: Final[str]
class _TestRunner(Protocol):
def run(self, test: unittest.suite.TestSuite | unittest.case.TestCase, /) -> unittest.result.TestResult: ...