Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Changelog

## [Unreleased]
### Fixed
- Handle parsing empty line ([#23](https://github.com/daizutabi/mkapi/pull/23)). Thanks to [tony](https://github.com/tony).


## [1.0.12] - 2020-07-29
### Changed
Expand Down
2 changes: 1 addition & 1 deletion examples/google_style.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def message(self, n: int) -> List[str]:
"""Returns a message list.

Args:
n: Repeatation.
n: Repetition.
"""
return [self.a] * n

Expand Down
2 changes: 1 addition & 1 deletion examples/numpy_style.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def message(self, n: int) -> List[str]:
Parameters
----------
n
Repeatation.
Repetition.
"""
return [self.a] * n

Expand Down
3 changes: 3 additions & 0 deletions mkapi/core/object.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ def get_fullname(obj: Any, name: str) -> str:
return ""
obj = getattr(obj, name)

if isinstance(obj, property):
return ""

return ".".join(split_prefix_and_name(obj))


Expand Down
2 changes: 1 addition & 1 deletion mkapi/core/postprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def sourcelink(object: Object) -> str:
link = f'<span id="{object.id}"></span>'
else:
link = ""
link += f'<a class="mkapi-src-link" href="../source/{object.module}'
link += f'<a class="mkapi-src-link" href="../source/{object.module}/'
link += f'#{object.id}" title="Source for {object.id}">&lt;/&gt;</a>'
return link

Expand Down
2 changes: 1 addition & 1 deletion mkapi/templates/object.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</div>
{% if 'sourcelink' in filters or 'link' in filters or 'apilink' in filters -%}
<div class="mkapi-src-link">
<a class="mkapi-src-link" href="../source/{{ object.module }}#{{ object.id }}" title="Source for {{ object.id }}">&lt;/&gt;</a>
<a class="mkapi-src-link" href="../source/{{ object.module }}/#{{ object.id }}" title="Source for {{ object.id }}">&lt;/&gt;</a>
</div>
{%- endif %}
</div>
2 changes: 2 additions & 0 deletions mkapi/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ def get_indent(line: str) -> int:


def join(lines):
if not len(lines):
return ''
indent = get_indent(lines[0])
return "\n".join(line[indent:] for line in lines).strip()

Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ def publish():


setup(
name="mkapi",
name="mkapi-git-pull",
version=get_version("mkapi"),
description="An Auto API Documentation tool.",
description="Fork of mkapi since poetry fails with git + python verson constraint",
long_description=long_description,
url="https://mkapi.daizutabi.net",
author="daizutabi",
Expand Down