Use TypeAlias for type aliases where possible, part II (#7667)

This commit is contained in:
Alex Waygood
2022-04-20 20:02:47 +01:00
committed by GitHub
parent c653be73b8
commit b093c90a94
41 changed files with 91 additions and 90 deletions

View File

@@ -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

View File

@@ -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: