Use Self for remaining occurrences (#4135)
This commit is contained in:
parent
e1d9935f30
commit
7b45613996
|
|
@ -104,7 +104,7 @@ class MirrorStatusEntryV3(BaseModel):
|
||||||
return value
|
return value
|
||||||
|
|
||||||
@model_validator(mode='after')
|
@model_validator(mode='after')
|
||||||
def debug_output(self) -> 'MirrorStatusEntryV3':
|
def debug_output(self) -> Self:
|
||||||
from ..args import arch_config_handler
|
from ..args import arch_config_handler
|
||||||
|
|
||||||
self._hostname, *port = urllib.parse.urlparse(self.url).netloc.split(':', 1)
|
self._hostname, *port = urllib.parse.urlparse(self.url).netloc.split(':', 1)
|
||||||
|
|
|
||||||
|
|
@ -49,10 +49,10 @@ class MenuKeys(Enum):
|
||||||
SCROLL_DOWN = frozenset({338})
|
SCROLL_DOWN = frozenset({338})
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def from_ord(cls, key: int) -> list['MenuKeys']:
|
def from_ord(cls, key: int) -> list[Self]:
|
||||||
matches = []
|
matches: list[Self] = []
|
||||||
|
|
||||||
for group in MenuKeys:
|
for group in cls:
|
||||||
if key in group.value:
|
if key in group.value:
|
||||||
matches.append(group)
|
matches.append(group)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue