aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Zamarin <arthurzam@gentoo.org>2022-09-25 22:31:56 +0300
committerArthur Zamarin <arthurzam@gentoo.org>2022-09-25 22:31:56 +0300
commit643acbedfa7ef17b4fa56c7ca4591425a0ef5e52 (patch)
treec26c5d15aa266c07a8a0163f196bc48ef25ca6d9 /src/snakeoil
parentfileutils: remove unused `UnbufferedWriteHandle` (diff)
downloadsnakeoil-643acbedfa7ef17b4fa56c7ca4591425a0ef5e52.tar.gz
snakeoil-643acbedfa7ef17b4fa56c7ca4591425a0ef5e52.tar.bz2
snakeoil-643acbedfa7ef17b4fa56c7ca4591425a0ef5e52.zip
descriptors: remove unused `classproperty`
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'src/snakeoil')
-rw-r--r--src/snakeoil/descriptors.py34
1 files changed, 0 insertions, 34 deletions
diff --git a/src/snakeoil/descriptors.py b/src/snakeoil/descriptors.py
deleted file mode 100644
index 12f51cb..0000000
--- a/src/snakeoil/descriptors.py
+++ /dev/null
@@ -1,34 +0,0 @@
-"""Classes implementing the descriptor protocol."""
-
-__all__ = ("classproperty",)
-
-
-class classproperty:
-
- """Like the builtin :py:func:`property` but takes a single classmethod.
-
- Essentially, it allows you to use a property on a class itself- not
- just on its instances.
-
- Used like this:
-
- >>> from snakeoil.descriptors import classproperty
- >>> class foo:
- ...
- ... @classproperty
- ... def test(cls):
- ... print("invoked")
- ... return True
- >>> foo.test
- invoked
- True
- >>> foo().test
- invoked
- True
- """
-
- def __init__(self, getter):
- self.getter = getter
-
- def __get__(self, instance, owner):
- return self.getter(owner)