[channels] Replace __attrs_post_init__ with self-factory

pull/357/head
nyanpasu64 2018-12-09 21:11:04 -08:00
rodzic be3d537500
commit be1e9f6563
1 zmienionych plików z 1 dodań i 5 usunięć

Wyświetl plik

@ -154,11 +154,7 @@ nope = qc.QVariant()
class Column:
key: str
default: Any # FIXME unused
cls: Type = None
def __attrs_post_init__(self):
if self.cls is None:
self.cls = type(self.default)
cls: Type = attr.Factory(lambda self: type(self.default), takes_self=True)
# Idea: Add translatable display_name