pdoc 15.0.3__tar.gz → 15.0.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. {pdoc-15.0.3 → pdoc-15.0.4}/CHANGELOG.md +7 -0
  2. {pdoc-15.0.3/pdoc.egg-info → pdoc-15.0.4}/PKG-INFO +1 -1
  3. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc/__init__.py +1 -1
  4. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc/extract.py +1 -1
  5. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc/render_helpers.py +1 -1
  6. {pdoc-15.0.3 → pdoc-15.0.4/pdoc.egg-info}/PKG-INFO +1 -1
  7. {pdoc-15.0.3 → pdoc-15.0.4}/test/test_extract.py +4 -0
  8. {pdoc-15.0.3 → pdoc-15.0.4}/test/test_render_helpers.py +16 -0
  9. {pdoc-15.0.3 → pdoc-15.0.4}/LICENSE +0 -0
  10. {pdoc-15.0.3 → pdoc-15.0.4}/MANIFEST.in +0 -0
  11. {pdoc-15.0.3 → pdoc-15.0.4}/README.md +0 -0
  12. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc/__main__.py +0 -0
  13. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc/_compat.py +0 -0
  14. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc/doc.py +0 -0
  15. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc/doc_ast.py +0 -0
  16. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc/doc_pyi.py +0 -0
  17. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc/doc_types.py +0 -0
  18. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc/docstrings.py +0 -0
  19. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc/markdown2/LICENSE +0 -0
  20. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc/markdown2/README.md +0 -0
  21. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc/markdown2/__init__.py +0 -0
  22. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc/py.typed +0 -0
  23. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc/render.py +0 -0
  24. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc/search.py +0 -0
  25. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc/templates/README.md +0 -0
  26. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc/templates/build-search-index.js +0 -0
  27. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc/templates/content.css +0 -0
  28. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc/templates/custom.css +0 -0
  29. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc/templates/default/error.html.jinja2 +0 -0
  30. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc/templates/default/frame.html.jinja2 +0 -0
  31. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc/templates/default/index.html.jinja2 +0 -0
  32. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc/templates/default/module.html.jinja2 +0 -0
  33. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc/templates/deprecated/README.md +0 -0
  34. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc/templates/deprecated/bootstrap-reboot.min.css +0 -0
  35. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc/templates/deprecated/box-arrow-in-left.svg +0 -0
  36. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc/templates/deprecated/elasticlunr.min.js +0 -0
  37. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc/templates/deprecated/favicon.svg +0 -0
  38. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc/templates/deprecated/navtoggle.svg +0 -0
  39. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc/templates/deprecated/pdoc-logo.svg +0 -0
  40. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc/templates/deprecated/resources/favicon.svg +0 -0
  41. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc/templates/layout.css +0 -0
  42. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc/templates/livereload.html.jinja2 +0 -0
  43. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc/templates/math.html.jinja2 +0 -0
  44. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc/templates/mermaid.html.jinja2 +0 -0
  45. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc/templates/resources/bootstrap-reboot.min.css +0 -0
  46. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc/templates/resources/box-arrow-in-left.svg +0 -0
  47. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc/templates/resources/elasticlunr.min.js +0 -0
  48. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc/templates/resources/exclamation-octagon-fill.svg +0 -0
  49. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc/templates/resources/exclamation-square-fill.svg +0 -0
  50. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc/templates/resources/exclamation-triangle-fill.svg +0 -0
  51. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc/templates/resources/info-circle-fill.svg +0 -0
  52. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc/templates/resources/lightbulb.svg +0 -0
  53. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc/templates/resources/lightning-fill.svg +0 -0
  54. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc/templates/resources/navtoggle.svg +0 -0
  55. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc/templates/resources/pdoc-logo.svg +0 -0
  56. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc/templates/search.html.jinja2 +0 -0
  57. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc/templates/search.js.jinja2 +0 -0
  58. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc/templates/syntax-highlighting.css +0 -0
  59. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc/templates/theme.css +0 -0
  60. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc/web.py +0 -0
  61. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc.egg-info/SOURCES.txt +0 -0
  62. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc.egg-info/dependency_links.txt +0 -0
  63. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc.egg-info/entry_points.txt +0 -0
  64. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc.egg-info/requires.txt +0 -0
  65. {pdoc-15.0.3 → pdoc-15.0.4}/pdoc.egg-info/top_level.txt +0 -0
  66. {pdoc-15.0.3 → pdoc-15.0.4}/pyproject.toml +0 -0
  67. {pdoc-15.0.3 → pdoc-15.0.4}/setup.cfg +0 -0
  68. {pdoc-15.0.3 → pdoc-15.0.4}/test/test_doc.py +0 -0
  69. {pdoc-15.0.3 → pdoc-15.0.4}/test/test_doc_ast.py +0 -0
  70. {pdoc-15.0.3 → pdoc-15.0.4}/test/test_doc_pyi.py +0 -0
  71. {pdoc-15.0.3 → pdoc-15.0.4}/test/test_doc_types.py +0 -0
  72. {pdoc-15.0.3 → pdoc-15.0.4}/test/test_docstrings.py +0 -0
  73. {pdoc-15.0.3 → pdoc-15.0.4}/test/test_main.py +0 -0
  74. {pdoc-15.0.3 → pdoc-15.0.4}/test/test_search.py +0 -0
  75. {pdoc-15.0.3 → pdoc-15.0.4}/test/test_smoke.py +0 -0
  76. {pdoc-15.0.3 → pdoc-15.0.4}/test/test_snapshot.py +0 -0
  77. {pdoc-15.0.3 → pdoc-15.0.4}/test/test_web.py +0 -0
@@ -5,6 +5,13 @@
5
5
  ## Unreleased: pdoc next
6
6
 
7
7
 
8
+ ## 2025-06-04: pdoc 15.0.4
9
+
10
+ - Include included HTML headers in the ToC by default by enabling markdown2's `mixed=True` option of the `header-ids` extra
11
+ (#806, @mrossinek)
12
+ - Make `pdoc .` work to document the module in the current directory.
13
+ ([#813](https://github.com/mitmproxy/pdoc/pull/813), @mhils)
14
+
8
15
  ## 2025-04-21: pdoc 15.0.3
9
16
 
10
17
  - Add missing styles for Github's markdown alerts.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pdoc
3
- Version: 15.0.3
3
+ Version: 15.0.4
4
4
  Summary: API Documentation for Python Projects
5
5
  Author-email: Maximilian Hils <pdoc@maximilianhils.com>
6
6
  License: MIT-0
@@ -481,7 +481,7 @@ You can find an example in [`examples/library-usage`](https://github.com/mitmpro
481
481
  from __future__ import annotations
482
482
 
483
483
  __docformat__ = "markdown" # explicitly disable rST processing in the examples above.
484
- __version__ = "15.0.3" # this is read from setup.py
484
+ __version__ = "15.0.4" # this is read from setup.py
485
485
 
486
486
  from pathlib import Path
487
487
  from typing import overload
@@ -112,7 +112,7 @@ def parse_spec(spec: Path | str) -> str:
112
112
  raise ModuleNotFoundError
113
113
  except pdoc.docstrings.AnyException:
114
114
  # Module does not exist, use local file.
115
- spec = pspec
115
+ spec = pspec.resolve()
116
116
  else:
117
117
  # Module does exist. We now check if the local file/directory is the same (e.g. after pip install -e),
118
118
  # and emit a warning if that's not the case.
@@ -61,7 +61,7 @@ markdown_extensions = {
61
61
  "cuddled-lists": None,
62
62
  "fenced-code-blocks": {"cssclass": formatter.cssclass},
63
63
  "footnotes": None,
64
- "header-ids": None,
64
+ "header-ids": {"mixed": True, "prefix": None, "reset-count": True},
65
65
  "link-patterns": None,
66
66
  "markdown-in-html": None,
67
67
  "mermaid": None,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pdoc
3
- Version: 15.0.3
3
+ Version: 15.0.4
4
4
  Summary: API Documentation for Python Projects
5
5
  Author-email: Maximilian Hils <pdoc@maximilianhils.com>
6
6
  License: MIT-0
@@ -100,6 +100,10 @@ def test_parse_spec(monkeypatch):
100
100
  assert str(here / "testdata") in sys.path
101
101
  sys.path = p
102
102
 
103
+ monkeypatch.chdir(here / "testdata" / "demopackage" / "subpackage")
104
+ assert parse_spec(".") == "demopackage.subpackage"
105
+ assert parse_spec("..") == "demopackage"
106
+
103
107
 
104
108
  def test_parse_spec_mod_and_dir(tmp_path, monkeypatch):
105
109
  """Test that we display a warning when both a module and a local directory exist with the provided name."""
@@ -110,6 +110,22 @@ def test_markdown_toc():
110
110
  assert to_html("#foo\n#bar").toc_html # type: ignore
111
111
 
112
112
 
113
+ def test_mixed_toc():
114
+ """
115
+ markdown2 can handle mixed markdown and HTML headings.
116
+
117
+ Let's test that this works as expected.
118
+ """
119
+ expected = [
120
+ "<ul>",
121
+ ' <li><a href="#foo">foo</a></li>',
122
+ ' <li><a href="#bar">bar</a></li>',
123
+ "</ul>",
124
+ "",
125
+ ]
126
+ assert to_html("#foo\n<h1>bar</h1>").toc_html == "\n".join(expected)
127
+
128
+
113
129
  @pytest.mark.parametrize(
114
130
  "md,html",
115
131
  [
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes