Start using pydocstyle for Python doc generation
parent
7f50c62e35
commit
b24293e545
@ -1,13 +1,8 @@
|
||||
{%- if obj.display %}
|
||||
|
||||
{%- if is_method %}
|
||||
{# Slice self off #}
|
||||
.. method:: {{ obj.name.split('.')[-1] }}({{ obj.args[1:]|join(',') }})
|
||||
{% else %}
|
||||
.. function:: {{ obj.name.split('.')[-1] }}({{ obj.args|join(',') }})
|
||||
{% endif %}
|
||||
|
||||
{%- if obj.docstring %}
|
||||
{% if obj.docstring %}
|
||||
{{ obj.docstring.strip()|indent(3) }}
|
||||
{% endif %}
|
||||
|
||||
|
@ -0,0 +1,9 @@
|
||||
{%- if obj.display %}
|
||||
|
||||
.. method:: {{ obj.name.split('.')[-1] }}({{ obj.args[1:]|join(',') }})
|
||||
|
||||
{% if obj.docstring %}
|
||||
{{ obj.docstring.strip()|indent(3) }}
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
@ -0,0 +1,14 @@
|
||||
import unicodedata
|
||||
import re
|
||||
|
||||
|
||||
# From Django
|
||||
|
||||
def slugify(value):
|
||||
"""
|
||||
Converts to lowercase, removes non-word characters (alphanumerics and
|
||||
underscores) and converts spaces to hyphens. Also strips leading and
|
||||
trailing whitespace.
|
||||
"""
|
||||
value = re.sub('[^\w\s-]', '', value).strip()
|
||||
return re.sub('[-\s]+', '-', value)
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue