mirror of
https://github.com/b4tman/sync_ics2gcal
synced 2025-01-21 07:28:24 +00:00
remove TypeAlias usage
This commit is contained in:
parent
29275d3f0e
commit
3cbbbb1a1b
@ -9,7 +9,6 @@ from typing import (
|
|||||||
Optional,
|
Optional,
|
||||||
Union,
|
Union,
|
||||||
TypedDict,
|
TypedDict,
|
||||||
TypeAlias,
|
|
||||||
Literal,
|
Literal,
|
||||||
NamedTuple,
|
NamedTuple,
|
||||||
)
|
)
|
||||||
@ -30,7 +29,7 @@ class EventDateTime(TypedDict, total=False):
|
|||||||
timeZone: str
|
timeZone: str
|
||||||
|
|
||||||
|
|
||||||
EventDateOrDateTime: TypeAlias = Union[EventDate, EventDateTime]
|
EventDateOrDateTime = Union[EventDate, EventDateTime]
|
||||||
|
|
||||||
|
|
||||||
class ACLScope(TypedDict, total=False):
|
class ACLScope(TypedDict, total=False):
|
||||||
@ -81,8 +80,8 @@ EventDataKey = Union[
|
|||||||
Literal["transparency"],
|
Literal["transparency"],
|
||||||
Literal["visibility"],
|
Literal["visibility"],
|
||||||
]
|
]
|
||||||
EventList: TypeAlias = List[EventData]
|
EventList = List[EventData]
|
||||||
EventTuple: TypeAlias = Tuple[EventData, EventData]
|
EventTuple = Tuple[EventData, EventData]
|
||||||
|
|
||||||
|
|
||||||
class EventsSearchResults(NamedTuple):
|
class EventsSearchResults(NamedTuple):
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import datetime
|
import datetime
|
||||||
import logging
|
import logging
|
||||||
from typing import Union, Dict, Callable, Optional, Mapping, TypeAlias, TypedDict
|
from typing import Union, Dict, Callable, Optional, Mapping, TypedDict
|
||||||
|
|
||||||
from icalendar import Calendar, Event
|
from icalendar import Calendar, Event
|
||||||
from pytz import utc
|
from pytz import utc
|
||||||
@ -14,7 +14,7 @@ from .gcal import (
|
|||||||
EventDataKey,
|
EventDataKey,
|
||||||
)
|
)
|
||||||
|
|
||||||
DateDateTime: TypeAlias = Union[datetime.date, datetime.datetime]
|
DateDateTime = Union[datetime.date, datetime.datetime]
|
||||||
|
|
||||||
|
|
||||||
def format_datetime_utc(value: DateDateTime) -> str:
|
def format_datetime_utc(value: DateDateTime) -> str:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user