Skip to content

Commit 43e436f

Browse files
committed
Remove deleter
This was added when I was subclassing `property` but is no longer needed.
1 parent 8b18d75 commit 43e436f

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

src/labthings_fastapi/thing_property.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -697,14 +697,6 @@ def fset(self) -> ValueSetter | None: # noqa: DOC201
697697
"""The setter function.""" # noqa: D401
698698
return self._fset
699699

700-
@builtins.property
701-
def fdel(self) -> None: # noqa: DOC201
702-
"""The deleter function.
703-
704-
This function always returns ``None`` as deleters are not yet supported.
705-
""" # noqa: D401
706-
return None
707-
708700
def getter(self, fget: ValueGetter) -> Self:
709701
"""Set the getter function of the property.
710702
@@ -778,18 +770,6 @@ def set_myprop(self, val: int) -> None:
778770
self.readonly = False
779771
return self
780772

781-
def deleter(self, fdel: Callable) -> Self:
782-
"""Set a deleter function. Currently unsupported.
783-
784-
:param fdel: The function called when the attribute is deleted.
785-
:return: The descriptor (i.e. ``self``).
786-
787-
:raises NotImplementedError: every time, because it is not supported.
788-
"""
789-
raise NotImplementedError(
790-
"Deleter functions are not supported for FunctionalProperty."
791-
)
792-
793773
def instance_get(self, obj: Thing) -> Value:
794774
"""Get the value of the property.
795775

0 commit comments

Comments
 (0)