kopia lustrzana https://github.com/corrscope/corrscope
[channels] Replace __attrs_post_init__ with self-factory
rodzic
be3d537500
commit
be1e9f6563
|
@ -154,11 +154,7 @@ nope = qc.QVariant()
|
||||||
class Column:
|
class Column:
|
||||||
key: str
|
key: str
|
||||||
default: Any # FIXME unused
|
default: Any # FIXME unused
|
||||||
cls: Type = None
|
cls: Type = attr.Factory(lambda self: type(self.default), takes_self=True)
|
||||||
|
|
||||||
def __attrs_post_init__(self):
|
|
||||||
if self.cls is None:
|
|
||||||
self.cls = type(self.default)
|
|
||||||
|
|
||||||
# Idea: Add translatable display_name
|
# Idea: Add translatable display_name
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue