mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
Use TypeAlias for type aliases where possible, part II (#7667)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
from _typeshed import Self
|
||||
from datetime import date, datetime, timedelta
|
||||
from typing import SupportsFloat, TypeVar, overload
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
from ._common import weekday
|
||||
|
||||
@@ -8,7 +9,7 @@ from ._common import weekday
|
||||
_SelfT = TypeVar("_SelfT", bound=relativedelta)
|
||||
_DateT = TypeVar("_DateT", date, datetime)
|
||||
# Work around attribute and type having the same name.
|
||||
_weekday = weekday
|
||||
_weekday: TypeAlias = weekday
|
||||
|
||||
MO: weekday
|
||||
TU: weekday
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import datetime
|
||||
from typing import Any, Iterable
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
from ._common import weekday as weekdaybase
|
||||
|
||||
@@ -81,7 +82,7 @@ class _iterinfo:
|
||||
def mtimeset(self, hour, minute, second): ...
|
||||
def stimeset(self, hour, minute, second): ...
|
||||
|
||||
_rrule = rrule
|
||||
_rrule: TypeAlias = rrule
|
||||
|
||||
class rruleset(rrulebase):
|
||||
class _genitem:
|
||||
|
||||
Reference in New Issue
Block a user