summaryrefslogtreecommitdiffstats
path: root/tests/roots/test-ext-autodoc/target/partialmethod.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/roots/test-ext-autodoc/target/partialmethod.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/roots/test-ext-autodoc/target/partialmethod.py b/tests/roots/test-ext-autodoc/target/partialmethod.py
new file mode 100644
index 0000000..4966a98
--- /dev/null
+++ b/tests/roots/test-ext-autodoc/target/partialmethod.py
@@ -0,0 +1,18 @@
+# for py34 or above
+from functools import partialmethod
+
+
+class Cell(object):
+ """An example for partialmethod.
+
+ refs: https://docs.python.jp/3/library/functools.html#functools.partialmethod
+ """
+
+ def set_state(self, state):
+ """Update state of cell to *state*."""
+
+ #: Make a cell alive.
+ set_alive = partialmethod(set_state, True)
+
+ # a partialmethod with no docstring
+ set_dead = partialmethod(set_state, False)