chore: update imports
This commit is contained in:
parent
c1e841fea9
commit
d7b965d26d
2 changed files with 3 additions and 2 deletions
|
|
@ -1,5 +1,5 @@
|
|||
from .cell_property import CellProperty
|
||||
from .classproperty import ClassProperty
|
||||
from .classproperty import ClassProperty, classproperty
|
||||
from .hook_property import HookProperty
|
||||
from .initonly import Initonly, initonly
|
||||
from .priv_property import PrivProperty
|
||||
|
|
@ -9,6 +9,7 @@ from .readonly import Readonly, readonly
|
|||
__all__ = [
|
||||
"CellProperty",
|
||||
"ClassProperty",
|
||||
"classproperty",
|
||||
"HookProperty",
|
||||
"Initonly",
|
||||
"initonly",
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ class PrivProperty[T]:
|
|||
def __get__(self, instance: Any, owner: type | None = None, /) -> T:
|
||||
if self.__default_value:
|
||||
return getattr(instance, self.__name, self.__default_value)
|
||||
return getattr(instance, self.__name)
|
||||
return getattr(instance, self.__name) # type: ignore
|
||||
|
||||
def __set__(self, instance: Any, value: T, /) -> None:
|
||||
setattr(instance, self.__name, value)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue