use typing.Self
This commit is contained in:
parent
a2a6f0dde1
commit
2a0eef88fb
1 changed files with 4 additions and 2 deletions
|
@ -2,6 +2,8 @@ import re
|
|||
import enum
|
||||
import datetime
|
||||
|
||||
from typing import Self
|
||||
|
||||
RE_PHENOM = re.compile(r'''
|
||||
^/ (?P<typeof>[OTEX])
|
||||
\. (?P<actions>[A-Z]{3})
|
||||
|
@ -45,7 +47,7 @@ class VTECEvent():
|
|||
timestamp_end: datetime.datetime
|
||||
|
||||
@staticmethod
|
||||
def parse(text: str) -> __class__:
|
||||
def parse(text: str) -> Self:
|
||||
match = RE_PHENOM.match(text)
|
||||
|
||||
if match is None:
|
||||
|
@ -77,7 +79,7 @@ class VTECHydroEvent():
|
|||
timestamp_end: datetime.datetime
|
||||
|
||||
@staticmethod
|
||||
def parse(text: str) -> __class__:
|
||||
def parse(text: str) -> Self:
|
||||
match = RE_HYDRO.match(text)
|
||||
|
||||
if match is None:
|
||||
|
|
Loading…
Add table
Reference in a new issue