Use Self for remaining occurrences (#4135)

This commit is contained in:
codefiles 2026-01-17 02:51:44 -05:00 committed by GitHub
parent e1d9935f30
commit 7b45613996
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

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

View File

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