-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add_full_prefix
will also add the __init__
path to its title
#276
Labels
Comments
Hey @kemingy , unfortunately I could not replicate the behaviour. diff --git a/examples/mkdocs/pyproject.toml b/examples/mkdocs/pyproject.toml
index 5291e54..6dce064 100644
--- a/examples/mkdocs/pyproject.toml
+++ b/examples/mkdocs/pyproject.toml
@@ -5,6 +5,9 @@ search_path = [ "../src" ]
[tool.pydoc-markdown.renderer]
type = "mkdocs"
+[tool.pydoc-markdown.renderer.markdown]
+add_full_prefix = true
+
[[tool.pydoc-markdown.renderer.pages]]
title = "API Documentation"
name = "index"
diff --git a/examples/src/school/__init__.py b/examples/src/school/__init__.py
index 9818a23..8f7fe4f 100644
--- a/examples/src/school/__init__.py
+++ b/examples/src/school/__init__.py
@@ -8,3 +8,8 @@ from ._pupil import Pupil
from ._teacher import Teacher
from ._school import School
from ._api._v1 import SchoolApiV1
+
+
+def demo():
+ "Hello"
+ pass
Can you still reproduce the issue? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Environment
Describe the bug
When using the
MarkdownRenderer
withadd_full_prefix
enabled, if there are functions defined in the__init__.py
file, the prefix will also contain__init__.
. Refer topydoc-markdown/src/pydoc_markdown/contrib/renderers/markdown.py
Lines 47 to 48 in 3aa2fa9
Expected behavior
I think
__init__
should be ignored in thedotted_name
function. Let's say you have ademo
function inmy_package/__init__.py
, its title should bemy_package.demo
instead ofmy_package.__init__.demo
.The text was updated successfully, but these errors were encountered: