Fix an invalid-type-form error reported by ty (#4088)

The 'bytes' annotation for the 'bytes' property was actually a
forward reference to the property instead of builtins.bytes:
https://github.com/astral-sh/ty/issues/1747#issuecomment-3609042917
This commit is contained in:
correctmost 2026-01-06 19:54:15 -05:00 committed by GitHub
parent 0470495cb1
commit bb13139339
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,6 @@
from __future__ import annotations from __future__ import annotations
import builtins
import math import math
import uuid import uuid
from dataclasses import dataclass, field from dataclasses import dataclass, field
@ -772,7 +773,7 @@ class PartitionGUID(Enum):
LINUX_ROOT_X86_64 = '4F68BCE3-E8CD-4DB1-96E7-FBCAF984B709' LINUX_ROOT_X86_64 = '4F68BCE3-E8CD-4DB1-96E7-FBCAF984B709'
@property @property
def bytes(self) -> bytes: def bytes(self) -> builtins.bytes:
return uuid.UUID(self.value).bytes return uuid.UUID(self.value).bytes