Fix invalid-annotation warnings reported by Pyrefly (#3523)

This commit is contained in:
correctmost 2025-05-28 12:00:52 +00:00 committed by GitHub
parent 26c6812827
commit 426650a3c4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -890,7 +890,7 @@ class PartitionModification:
def __post_init__(self) -> None:
# needed to use the object as a dictionary key due to hash func
if not hasattr(self, '_obj_id'):
self._obj_id: uuid.UUID | str = uuid.uuid4()
self._obj_id = uuid.uuid4()
if self.is_exists_or_modify() and not self.dev_path:
raise ValueError('If partition marked as existing a path must be set')
@ -1157,7 +1157,7 @@ class LvmVolume:
def __post_init__(self) -> None:
# needed to use the object as a dictionary key due to hash func
if not hasattr(self, '_obj_id'):
self._obj_id: uuid.UUID | str = uuid.uuid4()
self._obj_id = uuid.uuid4()
@override
def __hash__(self) -> int: