pax_global_header00006660000000000000000000000064147266012610014517gustar00rootroot0000000000000052 comment=485d9fa45acb69974ae410ba19c3a996346bca55 pdoc-15.0.1/000077500000000000000000000000001472660126100125305ustar00rootroot00000000000000pdoc-15.0.1/.github/000077500000000000000000000000001472660126100140705ustar00rootroot00000000000000pdoc-15.0.1/.github/ISSUE_TEMPLATE/000077500000000000000000000000001472660126100162535ustar00rootroot00000000000000pdoc-15.0.1/.github/ISSUE_TEMPLATE/bug_report.md000066400000000000000000000004551472660126100207510ustar00rootroot00000000000000--- name: Bug report about: Create a report to help us improve title: '' labels: bug assignees: '' --- #### Problem Description A clear and concise description of what the bug is. #### Steps to reproduce the behavior: 1. 2. 3. #### System Information Paste the output of "pdoc --version" here. pdoc-15.0.1/.github/ISSUE_TEMPLATE/config.yml000066400000000000000000000000341472660126100202400ustar00rootroot00000000000000blank_issues_enabled: false pdoc-15.0.1/.github/ISSUE_TEMPLATE/feature_request.md000066400000000000000000000007401472660126100220010ustar00rootroot00000000000000--- name: Proposal about: Suggest an idea for this project title: '' labels: enhancement assignees: '' --- #### Problem Description A clear and concise description of the problem you are trying to solve. #### Proposal A clear and concise description of what you want to happen. #### Alternatives A clear and concise description of any alternative solutions or features you've considered. #### Additional context Add any other context or screenshots about the proposal here. pdoc-15.0.1/.github/dependabot.yml000066400000000000000000000005171472660126100167230ustar00rootroot00000000000000version: 2 updates: - package-ecosystem: github-actions directory: "/" schedule: interval: "monthly" groups: dependencies: patterns: - "*" - package-ecosystem: pip directory: "/" schedule: interval: "monthly" groups: dependencies: patterns: - "*" pdoc-15.0.1/.github/python-version.txt000066400000000000000000000000051472660126100176300ustar00rootroot000000000000003.13 pdoc-15.0.1/.github/release000077500000000000000000000010651472660126100154400ustar00rootroot00000000000000#!/usr/bin/env -S python3 -u import logging from releasetool import branch from releasetool import get_next_dev_version from releasetool import git_commit from releasetool import git_push from releasetool import git_tag from releasetool import status_check from releasetool import update_changelog from releasetool import update_python_version logger = logging.getLogger(__name__) if __name__ == "__main__": status_check() update_python_version() update_changelog() git_commit() git_tag() git_push() logger.info("✅ All done. 🥳") pdoc-15.0.1/.github/workflows/000077500000000000000000000000001472660126100161255ustar00rootroot00000000000000pdoc-15.0.1/.github/workflows/autofix.yml000066400000000000000000000011651472660126100203320ustar00rootroot00000000000000name: autofix.ci on: pull_request: push: branches: [ "main", "ci" ] permissions: contents: read concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: autofix: runs-on: ubuntu-latest steps: - uses: mhils/workflows/checkout@v11 - uses: mhils/workflows/setup-python@v11 - uses: mhils/workflows/setup-uv@v11 - run: uv run ruff check --fix-only . - run: uv run ruff format . - run: uv run test/test_snapshot.py - uses: mhils/add-pr-ref-in-changelog@v1 - uses: autofix-ci/action@ff86a557419858bb967097bfc916833f5647fa8c pdoc-15.0.1/.github/workflows/docs.yml000066400000000000000000000024161472660126100176030ustar00rootroot00000000000000name: website # build the documentation whenever there are new commits on main on: push: branches: - main # Alternative: only build for tags. # tags: # - '*' # security: restrict permissions for CI jobs. permissions: contents: read jobs: # Build the documentation and upload the static HTML files as an artifact. build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: python-version: '3.13' # ADJUST THIS: install all dependencies (including pdoc) - run: pip install -e . # ADJUST THIS: build your documentation into docs/. # We use a custom build script for pdoc itself, ideally you just run `pdoc -o docs/ ...` here. - run: python docs/make.py - uses: actions/upload-pages-artifact@v3 with: path: docs/ # Deploy the artifact to GitHub pages. # This is a separate job so that only actions/deploy-pages has the necessary permissions. deploy: needs: build runs-on: ubuntu-latest permissions: pages: write id-token: write environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} steps: - id: deployment uses: actions/deploy-pages@v4 pdoc-15.0.1/.github/workflows/main.yml000066400000000000000000000050551472660126100176010ustar00rootroot00000000000000name: ci on: pull_request: push: branches-ignore: - 'dependabot/**' tags: - 'v[0-9]+.[0-9]+.[0-9]+' permissions: contents: read concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: lint: runs-on: ubuntu-latest steps: - uses: mhils/workflows/checkout@v11 - uses: mhils/workflows/setup-python@v11 - uses: mhils/workflows/setup-uv@v11 - run: uv run tox -e lint old-dependencies: runs-on: ubuntu-latest steps: - uses: mhils/workflows/checkout@v11 - uses: mhils/workflows/setup-python@v11 - uses: mhils/workflows/setup-uv@v11 - run: uv run tox -e old-dependencies test: strategy: fail-fast: false matrix: include: - os: windows-latest py: 3.13.0 args: --cov-fail-under=100 - os: macos-latest py: 3.13.0 args: --cov-fail-under=100 - os: ubuntu-latest py: 3.13.0 args: --cov-fail-under=100 - os: ubuntu-latest py: 3.12.4 - os: ubuntu-latest py: 3.11.5 - os: ubuntu-latest py: 3.10.13 - os: ubuntu-latest py: 3.9.18 runs-on: ${{ matrix.os }} steps: - uses: mhils/workflows/checkout@v11 - uses: mhils/workflows/setup-python@v11 with: python-version: ${{ matrix.py }} - uses: mhils/workflows/setup-uv@main - run: uv run tox -e py -- -vvv ${{ matrix.args }} build: uses: mhils/workflows/.github/workflows/python-build.yml@v11 permissions: contents: read id-token: write attestations: write attest: needs: build if: github.event_name != 'pull_request' permissions: contents: read id-token: write attestations: write runs-on: ubuntu-latest steps: - uses: actions/download-artifact@v4 with: name: wheels path: dist/ - uses: actions/attest-build-provenance@v1 with: subject-path: 'dist/*' check: if: always() needs: - lint - test - build - attest uses: mhils/workflows/.github/workflows/alls-green.yml@v11 with: jobs: ${{ toJSON(needs) }} allowed-skips: '["attest"]' deploy: uses: mhils/workflows/.github/workflows/python-deploy.yml@v11 with: artifact-name: wheels needs: check if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') secrets: password: ${{ secrets.TWINE_PASSWORD }} pdoc-15.0.1/.github/workflows/release.yml000066400000000000000000000013441472660126100202720ustar00rootroot00000000000000name: Release on: workflow_dispatch: inputs: version: description: 'Version (major.minor.patch)' required: true type: string skip-branch-status-check: description: 'Skip CI status check.' default: false required: false type: boolean permissions: {} jobs: release: environment: deploy runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: token: ${{ secrets.GH_PUSH_TOKEN }} # this token works to push to the protected main branch. - uses: mhils/releasetool@v1 - run: ./.github/release env: PROJECT_VERSION: ${{ inputs.version }} STATUS_CHECK_SKIP_GIT: ${{ inputs.skip-branch-status-check }}pdoc-15.0.1/.gitignore000066400000000000000000000003051472660126100145160ustar00rootroot00000000000000.*.swp tags build MANIFEST dist *.egg-info *.pyc *.pyo venv .pytest_cache .coverage .tox/ .mypy_cache tmp .tox-linux/ coverage.xml .render/ .hypothesis/ docs/docs/ docs/index.html docs/sitemap.xml pdoc-15.0.1/CHANGELOG.md000066400000000000000000001146071472660126100143520ustar00rootroot00000000000000# Release History ## Unreleased: pdoc next ## 2024-12-12: pdoc 15.0.1 - Update Mermaid.js version. ([#763](https://github.com/mitmproxy/pdoc/pull/763), @CodeMelted) ## 2024-10-11: pdoc 15.0.0 - Remove support for Python 3.8, which has reached end-of-life on 2024-10-07. ([#747](https://github.com/mitmproxy/pdoc/pull/747), @mhils) - Inherited members are now hidden by default if the base class is not part of the documentation. Please provide feedback in the PR if you relied on the old behavior. ([#748](https://github.com/mitmproxy/pdoc/pull/748), @mhils) - Python 3.13: `@deprecated` decorators are now rendered with visual emphasis. ([#750](https://github.com/mitmproxy/pdoc/pull/750), @mhils) - Improve mocking of `sys.stdin`, `sys.stdout`, and `sys.stderr` to fix runtime errors with some packages. ([#751](https://github.com/mitmproxy/pdoc/pull/751), @mhils) ## 2024-09-11: pdoc 14.7.0 - Do not shorten `current_module.func` to `func` in docstrings when linking. This prevents logical errors in code examples with imports. ([#740](https://github.com/mitmproxy/pdoc/pull/740), @mhils) - Add support for Python 3.13. ([#730](https://github.com/mitmproxy/pdoc/pull/730), @mhils) - pdoc now strips `collections.abc.` from type annotations to make them more concise. ([#736](https://github.com/mitmproxy/pdoc/pull/736), @mhils) ## 2024-08-27: pdoc 14.6.1 - Fix a bug where entire modules would be excluded by `--no-include-undocumented`. To exclude modules, see https://pdoc.dev/docs/pdoc.html#exclude-submodules-from-being-documented. ([#728](https://github.com/mitmproxy/pdoc/pull/728), @mhils) - Fix a bug where pdoc would crash when importing pyi files. ([#732](https://github.com/mitmproxy/pdoc/pull/732), @mhils) - Fix a bug where subclasses of TypedDict subclasses would not render correctly. ([#729](https://github.com/mitmproxy/pdoc/pull/729), @mhils) ## 2024-07-24: pdoc 14.6.0 - If `example.data.Data` is also exposed as `example.Data`, pdoc now links to `example.Data` in documentation. ([#670](https://github.com/mitmproxy/pdoc/pull/670), @nathanthorpe, @mhils) - Add support for [GitHub Markdown Alerts](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#alerts). ([#718](https://github.com/mitmproxy/pdoc/pull/718), @mhils) - Improve rendering of enums on Python 3.12+. ([#708](https://github.com/mitmproxy/pdoc/pull/708), @mhils) - Fix a bug where hyperlinks would get parsed as docstring references. ([#709](https://github.com/mitmproxy/pdoc/pull/709), @mhils) - Fix a TypeError when trying to parse modules that implement `__dir__` incorrectly. ([#710](https://github.com/mitmproxy/pdoc/pull/710), @mhils) - Fix a bug where a combination of `@dataclass` and `ctypes.Structure` would crash pdoc. ([#711](https://github.com/mitmproxy/pdoc/pull/711), @mhils) - Update bundled version of markdown2. ([#717](https://github.com/mitmproxy/pdoc/pull/717), @mhils) ## 2024-06-25: pdoc 14.5.1 - **[CVE-2024-38526](https://github.com/mitmproxy/pdoc/security/advisories/GHSA-5vgj-ggm4-fg62):** Documentation generated with math mode (`pdoc --math`) does not include scripts from polyfill.io anymore. Users who produce documentation with math mode should update immediately. All other users are unaffected. ([#703](https://github.com/mitmproxy/pdoc/pull/703), @adhintz) ## 2024-05-16: pdoc 14.5.0 - The `.. include:` rST directive now supports start-line, end-line, start-after, end-before options. ([#684](https://github.com/mitmproxy/pdoc/pull/684), @frankharkins) - Fix image embedding in included rST files. ([#692](https://github.com/mitmproxy/pdoc/pull/692), @meghprkh) - Support type-hints from stub-only packages. E.g: `scipy-stubs` ([#671](https://github.com/mitmproxy/pdoc/pull/671), @erikdesmedt) - Modify css styles for MathJax to remove unnessesary scroll bars ([#675](https://github.com/mitmproxy/pdoc/pull/675), @thehappycheese) ## 2024-01-18: pdoc 14.4.0 - Private methods can now be included in the documentation by adding `@public` to the docstring. This complements the existing `@private` annotation. ([#655](https://github.com/mitmproxy/pdoc/pull/655), @tmeyier) - pdoc now correctly detects the source file for wrapped functions. ([#657](https://github.com/mitmproxy/pdoc/pull/657), @tmeyier) - Fixed a bug where memory addresses were not removed from output. ([#663](https://github.com/mitmproxy/pdoc/pull/663), @mhils) ## 2023-12-22: pdoc 14.3.0 - Improve rendering of `.pyi` type stubs containing `@typing.overload`. ([#652](https://github.com/mitmproxy/pdoc/pull/652), @mhils) - `@property` and `@cached_property` attributes now have a "View Source" button. ([#654](https://github.com/mitmproxy/pdoc/pull/654), @tmeyier) ## 2023-12-13: pdoc 14.2.0 - pdoc now documents PyO3 or pybind11 submodules that are not picked up by Python's builtin pkgutil module. ([#633](https://github.com/mitmproxy/pdoc/issues/633), @mhils) - pdoc now supports Python 3.12's `type` statements and has improved `TypeAlias` rendering. ([#651](https://github.com/mitmproxy/pdoc/pull/651), @mhils) - Imports in a TYPE_CHECKING section that reference members defined in another module's TYPE_CHECKING section now work correctly. ([#649](https://github.com/mitmproxy/pdoc/pull/649), @mhils) - Add support for `code-block` ReST directives ([#624](https://github.com/mitmproxy/pdoc/pull/624), @JCGoran) - If a variable's value meets certain entropy criteria and matches an environment variable value, pdoc will now emit a warning and display the variable's name as a placeholder instead. This heuristic is meant to prevent accidental leakage of environment secrets and can be disabled by setting `PDOC_DISPLAY_ENV_VARS=1`. ([#622](https://github.com/mitmproxy/pdoc/pull/622), @mhils) ## 2023-09-10: pdoc 14.1.0 - Add compatibility with Python 3.12 ([#620](https://github.com/mitmproxy/pdoc/pull/620), @mhils) - Add support for relative links. Instead of explicitly referring to `mypackage.helpers.foo`, one can now also refer to `.helpers.foo` within the `mypackage` module, or `..helpers.foo` in a submodule. ([#544](https://github.com/mitmproxy/pdoc/pull/544), @Crozzers) - Function signatures will now display "Foo" instead "demo.Foo" if the function is in the same module. ([#544](https://github.com/mitmproxy/pdoc/pull/544), @mhils) - pdoc now also picks up docstrings from `.pyi` stub files. ([#619](https://github.com/mitmproxy/pdoc/pull/619), @mhils) - Fix horizontal scroll navigation z-index issue. ([#616](https://github.com/mitmproxy/pdoc/pull/616), @Domi04151309) - Be more strict about parsing URLs in pdoc's web server. ([#617](https://github.com/mitmproxy/pdoc/pull/617), @mhils) ## 2023-06-19: pdoc 14.0.0 - Functions, classes and variables can now be hidden from documentation by adding `@private` to their docstring. ([#578](https://github.com/mitmproxy/pdoc/pull/578), @mhils) - pdoc can now be configured to skip classes/functions/variables without docstrings by passing `--no-include-undocumented`. ([#578](https://github.com/mitmproxy/pdoc/pull/578), @mhils) - pdoc now documents variables by default, even if they have no docstring or type annotation. Please make yourself heard in [#574](https://github.com/mitmproxy/pdoc/issues/574) if that introduces significant issues for your use case. ([#575](https://github.com/mitmproxy/pdoc/pull/575), @mhils) - Add support for Python 3.12. ([#570](https://github.com/mitmproxy/pdoc/pull/570), @mhils) - Remove support for Python 3.7, which has reached end-of-life on 2023-06-27. ([#569](https://github.com/mitmproxy/pdoc/pull/569), @mhils) ## 2023-04-24: pdoc 13.1.1 - Fix rendering of dynamically modified docstrings. ([#537](https://github.com/mitmproxy/pdoc/pull/537), @mhils) - Updated bundled markdown2 version to fix a bug with empty code blocks. ([#537](https://github.com/mitmproxy/pdoc/pull/537), @mhils) - `pdoc.doc_ast.AstInfo` now has separate `func_docstrings` and `var_docstrings` attributes instead of one combined one. ([#537](https://github.com/mitmproxy/pdoc/pull/537), @mhils) ## 2023-03-31: pdoc 13.1.0 - Add support for rendering [Mermaid diagrams](https://mermaid.js.org/) by passing `--mermaid`. ([#525](https://github.com/mitmproxy/pdoc/pull/525), @thearchitector, @mhils) - Add rudimentary support for `typing_extensions.Literal` on Python 3.7. ([#527](https://github.com/mitmproxy/pdoc/pull/527), @mhils) ## 2023-03-21: pdoc 13.0.1 - Add additional Jinja2 blocks to allow a more fine-grained customization of the menu. ([#521](https://github.com/mitmproxy/pdoc/pull/521), @mikkelakromann) - Fix a crash in pdoc 13.0.0 when `__init__.py` is passed as a file to pdoc. ([#522](https://github.com/mitmproxy/pdoc/pull/522), @mhils) ## 2023-02-19: pdoc 13.0.0 - pdoc now skips constructors if they neither have a docstring nor any parameters. This improves display of classes that are not meant to be instantiated manually, for example when using PyO3. ([#510](https://github.com/mitmproxy/pdoc/pull/510), @mhils) - Automatically fold a variable's default value if it exceeds 100 characters. Feedback on this cutoff is welcome! ([#511](https://github.com/mitmproxy/pdoc/pull/511), @mhils) - Add a workaround to support inherited TypedDicts. ([#504](https://github.com/mitmproxy/pdoc/issues/504), @mhils) - `Variable.default_value_str` does not include the ` = ` prefix anymore. It will now emit a warning and return an empty string if `repr(value)` crashes. ([#510](https://github.com/mitmproxy/pdoc/pull/510), @mhils) - Fix a CSS issue where the lower half of the navigation toggle would be unresponsive on mobile. ([#510](https://github.com/mitmproxy/pdoc/pull/510), @mhils) ## 2023-01-06: pdoc 12.3.1 - Switch from `setup.py` to `pyproject.toml` for pdoc itself. Please file an issue if that causes any problems. ([#474](https://github.com/mitmproxy/pdoc/issues/474), @mhils) - Fix broken links for inherited methods if both parent and subclass have the same name. ([#493](https://github.com/mitmproxy/pdoc/pull/493), @mhils) - "Parameters", "Params" and "Arguments" are now also accepted as headings for argument lists in Google-style docstrings. ([#489](https://github.com/mitmproxy/pdoc/pull/489), @ntamas) ## 2022-11-15: pdoc 12.3.0 - Docstrings can now include local images which will be embedded into the page, e.g. `![image](./image.png)`. ([#282](https://github.com/mitmproxy/pdoc/issues/282), @mhils) - Fix a bug in parsing Google-style docstrings with extraneous whitespace. ([#459](https://github.com/mitmproxy/pdoc/pull/459), @vsajip, @mhils) - `pdoc.doc.Doc.members` now includes variables without type annotation and docstring. They continue to not be documented in the default HTML template. ([#107](https://github.com/mitmproxy/pdoc/issues/107), @mhils) - Improve the conversion of reStructuredText to Markdown for function and method references. ([#463](https://github.com/mitmproxy/pdoc/pull/463), @vsajip) - Static class attributes that point to a class are now rendered as variables, not as separate classes. ([#465](https://github.com/mitmproxy/pdoc/pull/465), @mhils) ## 2022-11-10: pdoc 12.2.2 - Fix a CSS issue for overflowing math equations. ([#456](https://github.com/mitmproxy/pdoc/pull/456), @mhils) - Fix a regression from pdoc 12.2: Enum members are now always documented even if they do not have a docstring. ([#457](https://github.com/mitmproxy/pdoc/pull/457), @mhils) ## 2022-11-05: pdoc 12.2.1 - Fix handling of type annotations in nested classes. ([#440](https://github.com/mitmproxy/pdoc/issues/440), [@mhils](https://github.com/mhils)) - `Doc.type` is now `Doc.kind` to avoid confusion with `builtins.type`. - The new `PDOC_ALLOW_EXEC` environment variable provides an escape hatch for modules that cannot be imported without executing subprocesses. ([#450](https://github.com/mitmproxy/pdoc/issues/450), [@mhils](https://github.com/mhils)) ## 2022-09-20: pdoc 12.2.0 - Make documentation of variables more consistent. Variables with a default value and no docstring are now hidden, matching the behavior of variables with a type annotation only. ([#411](https://github.com/mitmproxy/pdoc/issues/411), [@mhils](https://github.com/mhils)) - Remove `format` argument from `pdoc.pdoc()`. For the forseeable future, pdoc will only support HTML export. ([#308](https://github.com/mitmproxy/pdoc/issues/308), [@mhils](https://github.com/mhils)) - Update vendored copy of markdown2. ([#429](https://github.com/mitmproxy/pdoc/issues/429), [@mhils](https://github.com/mhils)) - Fix "View Source" button when a function has the same name as the module it is in. ([#431](https://github.com/mitmproxy/pdoc/issues/431), [@mhils](https://github.com/mhils)) - Improve display of dataclasses. ([#411](https://github.com/mitmproxy/pdoc/issues/411), [@mhils](https://github.com/mhils)) - Do not execute or document `__main__.py` files. `__main__` submodules can still be documented by explicitly passing them when invoking pdoc. ([#438](https://github.com/mitmproxy/pdoc/issues/438), [@mhils](https://github.com/mhils)) ## 2022-06-08: pdoc 12.1.0 - Add compatibility with Python 3.11 ([#394](https://github.com/mitmproxy/pdoc/issues/394), [@mhils](https://github.com/mhils)) - Make sure that docstrings are picked up for functions that have been turned into non-function objects by decorators. ([#416](https://github.com/mitmproxy/pdoc/issues/416), [@jeamland](https://github.com/jeamland)) - Update vendored copy of markdown2. ([#421](https://github.com/mitmproxy/pdoc/issues/421), [@mhils](https://github.com/mhils)) - Apply syntax highlighting to search results as well. ([@mhils](https://github.com/mhils)) - Fix display of `@classmethod @property` instances without docstrings. ([@mhils](https://github.com/mhils)) - Add support for `@functools.singledispatchmethod`. ([#428](https://github.com/mitmproxy/pdoc/issues/428), [@mhils](https://github.com/mhils)) - pdoc now terminates if a module cannot be imported instead of raising a warning. You may need to preemptively [exclude submodules](https://pdoc.dev/docs/pdoc.html#exclude-submodules-from-being-documented) that fail to import anyway. ([#407](https://github.com/mitmproxy/pdoc/issues/407), [@mhils](https://github.com/mhils)) - Fix compatibility with GitPython. ([#430](https://github.com/mitmproxy/pdoc/issues/430), [@mhils](https://github.com/mhils)) ## 2022-06-08: pdoc 12.0.2 - Extend auto-linking of URLs in Markdown. ([#401](https://github.com/mitmproxy/pdoc/issues/401), [@mhils](https://github.com/mhils)) - Mention which implementation of Markdown is supported, with what extras enabled ([#403](https://github.com/mitmproxy/pdoc/issues/403), [@f3ndot](https://github.com/f3ndot)) - Fix a bug where function signatures had weird line breaks. ([#404](https://github.com/mitmproxy/pdoc/issues/404), [@mhils](https://github.com/mhils)) - Exclude line numbers from text selection. ([#405](https://github.com/mitmproxy/pdoc/issues/405), [@mhils](https://github.com/mhils)) ## 2022-06-03: pdoc 12.0.1 - Fix linking of some function return annotations. - Refine rendering of function signatures. Syntax errors are now handled more gracefully. - Gracefully handle the case when users specify objects instead of strings in `__all__`. ## 2022-05-15: pdoc 12.0.0 - Improve rendering of function signatures. Annotations are now syntax-highlighted! ✨ - Change the implementation of *View Source* to not use an HTML `
` element. Recent versions of Chrome started to auto-expand source code blocks on search, which made it difficult to search in docstrings. - Line numbers now start at 1, not at 0. - The aforementioned template improvements may require minor adjustments to custom templates. Users who do not use custom templates are unaffected. - Users who customized the `view_source` macro: This macro has been split into three smaller macros, please check [`module.html.jinja2`](https://github.com/mitmproxy/pdoc/blob/main/pdoc/templates/default/module.html.jinja2). This change was necessary to make sure that the button does not overflow function signatures. - Users who customized the `member`, `class`, `function`, `submodule` or `variable` macros: Common parts have been combined in the `member` macro, please check [`module.html.jinja2`](https://github.com/mitmproxy/pdoc/blob/main/pdoc/templates/default/module.html.jinja2). - Fix: Hide the nav menu checkbox in Firefox. ## 2022-05-04: pdoc 11.2.0 - pdoc now picks up type annotations from `.pyi` stub files (PEP-561). This greatly improves support for native modules where no Python source code is available, for example when using PyO3. ([#390](https://github.com/mitmproxy/pdoc/issues/390), [@mhils](https://github.com/mhils)) - Template Style Improvements: The size of headings within docstrings has been reduced. Docstrings are now slightly indented on wide screens. ([#383](https://github.com/mitmproxy/pdoc/issues/383), [@jacksund](https://github.com/jacksund) and [@mhils](https://github.com/mhils)) - Improve rendering of `typing.TypedDict` subclasses. ([#389](https://github.com/mitmproxy/pdoc/issues/389), [@mhils](https://github.com/mhils)) ## 2022-04-24: pdoc 11.1.0 - Display line numbers when viewing source code. ([#328](https://github.com/mitmproxy/pdoc/issues/328), [@mhils](https://github.com/mhils)) - Fix catastrophic backtracking in a markdown2 regex that processes pyshell examples. ([#376](https://github.com/mitmproxy/pdoc/issues/376), [@Andrew-Sheridan](https://github.com/Andrew-Sheridan) and [@mhils](https://github.com/mhils)) - pdoc now uses the submodule name in the rendered sidebar, rather than the full import path. ([#374](https://github.com/mitmproxy/pdoc/issues/374), [@jacksund](https://github.com/jacksund)) - Fix a bug where explicit links were rendered incorrectly. ([#382](https://github.com/mitmproxy/pdoc/issues/382), [@mhils](https://github.com/mhils)) - Fix compatibility with Pygments 2.12. ([#384](https://github.com/mitmproxy/pdoc/issues/384), [@mhils](https://github.com/mhils)) ## 2022-04-06: pdoc 11.0.0 - pdoc now picks up reStructuredText syntax in docstrings by default. We still prefer plain Markdown, but this change makes it possible to seamlessly include directives like `.. include:: README.md` or admonitions, which have no Markdown equivalent. reStructuredText processing can be disabled by explicitly setting the docstring format to Markdown. ([#373](https://github.com/mitmproxy/pdoc/issues/373), [@mhils](https://github.com/mhils)) - pdoc's documentation has been revised, it now also includes [a simple recipe for using pdoc with GitHub Pages ](https://pdoc.dev/docs/pdoc.html#deploying-to-github-pages). ([#373](https://github.com/mitmproxy/pdoc/issues/373), [@mhils](https://github.com/mhils)) - Improve display of reStructuredText admonitions. ([#372](https://github.com/mitmproxy/pdoc/issues/372), [@mhils](https://github.com/mhils)) - Add support for reStructuredText field lists: `:param foo: text`. ([#275](https://github.com/mitmproxy/pdoc/issues/275), [@mhils](https://github.com/mhils)) ## 2022-03-23: pdoc 10.0.4 - Include `typing.TypeVar` variables in documentation if they have an explicit docstring. ([#361](https://github.com/mitmproxy/pdoc/issues/361), [@ktbarrett](https://github.com/ktbarrett)) - Make sure that new-style type aliases like `dict[str,str]` are rendered like their old-style `typing.Dict[str,str]` equivalents. ([#363](https://github.com/mitmproxy/pdoc/issues/363), [@hriebl](https://github.com/hriebl)) - Fix a bug in markdown2 where code snippets interfere with latex expressions ([#340](https://github.com/mitmproxy/pdoc/issues/340), [@Crozzers](https://github.com/Crozzers)) ## 2022-03-08: pdoc 10.0.3 - Fix linking of modules. ([#360](https://github.com/mitmproxy/pdoc/issues/360), [@vlad-nn](https://github.com/vlad-nn)) ## 2022-03-01: pdoc 10.0.2 - When determining the docstring for a constructor, prefer `Class.__init__.__doc__` over `Metaclass.__call__.__doc__` over `Class.__new__.__doc__`. ([#352](https://github.com/mitmproxy/pdoc/issues/352), [@denised](https://github.com/denised)) - Improve linking of classes that are re-exported in a common top-level namespace. - Make it more clear that Markdown ist the default docformat. ([@Dliwk](https://github.com/Dliwk)) - Fix compatiblity with code using `ctypes.util.find_library`. ([#358](https://github.com/mitmproxy/pdoc/issues/358), [@bubalis](https://github.com/bubalis)) ## 2022-02-14: pdoc 10.0.1 - Fix a bug where pdoc would crash after executing `TYPE_CHECKING` blocks. ([#351](https://github.com/mitmproxy/pdoc/issues/351), [@Dliwk](https://github.com/Dliwk)) - Add ability to specify custom CSS rules in `custom.css`. The migration instructions in the 10.0.0 changelog entry have been updated accordingly. ## 2022-02-14: pdoc 10.0.0 - Template improvements may require minor adjustments to custom templates. Users who do not use custom templates are unaffected. ([#346](https://github.com/mitmproxy/pdoc/issues/346)) - Users who embed pdoc's output into other systems: The main layout (sidebar/content) is now part of [`frame.html.jinja2`](https://github.com/mitmproxy/pdoc/blob/main/pdoc/templates/default/frame.html.jinja2) instead of [`module.html.jinja2`](https://github.com/mitmproxy/pdoc/blob/main/pdoc/templates/default/module.html.jinja2). This allows [`index.html.jinja2`](https://github.com/mitmproxy/pdoc/blob/main/pdoc/templates/default/index.html.jinja2) to cleanly extend `frame.html.jinja2` instead of patching `module.html.jinja2`. See [`examples/mkdocs`](https://github.com/mitmproxy/pdoc/tree/main/examples/mkdocs) for an updated example. If you defined a custom `{% block nav %}` block, you need to remove the outermost `