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