Release/v0.4.1 #1

Merged
rus07tam merged 12 commits from release/v0.4.1 into main 2025-10-27 15:05:33 +03:00
2 changed files with 3 additions and 2 deletions
Showing only changes of commit d7b965d26d - Show all commits

View file

@ -1,5 +1,5 @@
from .cell_property import CellProperty from .cell_property import CellProperty
from .classproperty import ClassProperty from .classproperty import ClassProperty, classproperty
from .hook_property import HookProperty from .hook_property import HookProperty
from .initonly import Initonly, initonly from .initonly import Initonly, initonly
from .priv_property import PrivProperty from .priv_property import PrivProperty
@ -9,6 +9,7 @@ from .readonly import Readonly, readonly
__all__ = [ __all__ = [
"CellProperty", "CellProperty",
"ClassProperty", "ClassProperty",
"classproperty",
"HookProperty", "HookProperty",
"Initonly", "Initonly",
"initonly", "initonly",

View file

@ -15,7 +15,7 @@ class PrivProperty[T]:
def __get__(self, instance: Any, owner: type | None = None, /) -> T: def __get__(self, instance: Any, owner: type | None = None, /) -> T:
if self.__default_value: if self.__default_value:
return getattr(instance, self.__name, 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: def __set__(self, instance: Any, value: T, /) -> None:
setattr(instance, self.__name, value) setattr(instance, self.__name, value)