mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 14:01:55 +08:00
Use Final for Constant Literals in the stdlib (#12332)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import sys
|
||||
from abc import abstractmethod
|
||||
from time import struct_time
|
||||
from typing import ClassVar, Literal, NamedTuple, NoReturn, SupportsIndex, final, overload
|
||||
from typing import ClassVar, Final, NamedTuple, NoReturn, SupportsIndex, final, overload
|
||||
from typing_extensions import Self, TypeAlias, deprecated
|
||||
|
||||
if sys.version_info >= (3, 11):
|
||||
@@ -9,8 +9,8 @@ if sys.version_info >= (3, 11):
|
||||
elif sys.version_info >= (3, 9):
|
||||
__all__ = ("date", "datetime", "time", "timedelta", "timezone", "tzinfo", "MINYEAR", "MAXYEAR")
|
||||
|
||||
MINYEAR: Literal[1]
|
||||
MAXYEAR: Literal[9999]
|
||||
MINYEAR: Final = 1
|
||||
MAXYEAR: Final = 9999
|
||||
|
||||
class tzinfo:
|
||||
@abstractmethod
|
||||
|
||||
Reference in New Issue
Block a user