caenHV / Setup

Package that offers tools to communicate with new HV power supply of CMD-3 drift chamber (hope so).
0 stars 0 forks source link

TicketType.names problem #2

Closed nikita-p closed 1 year ago

nikita-p commented 1 year ago
AliensWithdrawPeople commented 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.)