Closed nikita-p closed 1 year ago
Пофиксил в коммите b361fca.
@classmethod
def names(cls) -> set[str]:
return {tk_type.value.type_description().name for tk_type in cls}
Теперь это просто classmethod поэтому нужно обращаться через TicketType.names(). От конструкции @classmethod @property отказался, так как с python 3.11 это depricated (https://docs.python.org/3.11/whatsnew/3.11.html)
Chaining classmethod descriptors (introduced in bpo-19072) is now deprecated. It can no longer be used to wrap other descriptors such as property. The core design of this feature was flawed and caused a number of downstream problems. To “pass-through” a classmethod, consider using the wrapped attribute that was added in Python 3.10. (Contributed by Raymond Hettinger in gh-89519.)
Code:
Expected:
Actual:
code location https://github.com/caenHV/Setup/blob/665e26c95a9f8acb424c81ec6faf388713dc33ed/caen_setup/Tickets/TicketType.py#L14