mkgendocs
mkgendocs copied to clipboard
abstractmethod is not output
abstractmethod is not output. Correctly in some classes with implementation.
https://docs.python.org/3/library/abc.html#abc.abstractmethod
Can you give me a precise example of something to be documented and a description of the expected result just so I can reproduce the problem more easily?
yes
preparation
- sample.py
from abc import ABC, abstractmethod
class Sample1(ABC):
'''
Sample class 1
'''
@abstractmethod
def sample_method_abstract(self):
'''
sample abstract
'''
pass
def sample_method_implement(self):
'''
sample implement 1
'''
pass
class Sample2(Sample1):
'''
Sample class 2
'''
def sample_method_implement(self):
'''
sample implement 2
'''
pass
- mkgendocs.yml
sources_dir: docs/sources
templates_dir: docs/templates
repo: https://github.com/davidenunes/tensorx #link to sources on github
version: master #link to sources on github
pages:
- page: "sample.md"
source: "sample.py"
classes:
- Sample1
- Sample2
run gendocs (example)
docker run --rm -it \
-v $PWD:/work \
python \
bash -c \
'pip install mkgendocs && cd /work && gendocs --config mkgendocs.yml'
I want sample_method_abstract
to be output.
--- docs/sources/actual sample.md 2021-11-26 11:01:53.000000000 +0900
+++ docs/sources/expected sample.md 2021-11-26 11:05:16.000000000 +0900
@@ -14,6 +14,16 @@
**Methods:**
+### .sample_method_abstract
+[source](https://github.com/davidenunes/tensorx/blob/master/sample.py/#L8)
+```python
+.sample_method_abstract()
+```
+
+---
+sample abstract
+
+----
### .sample_method_implement
[source](https://github.com/davidenunes/tensorx/blob/master/sample.py/#L13)
I edited the above comment and wrote the actual and expected.
Thank you, this helps :+1:, I'm a bit swamped at the time but I'll give it a look as soon as I can
Sorry for the delay, this was an easy fix but I've been a bit swamped with my thesis work It should be working in version 0.9.2