NiklasRosenstein / pydoc-markdown

Create Python API documentation in Markdown format.
http://niklasrosenstein.github.io/pydoc-markdown/
Other
449 stars 104 forks source link

Fix #291, #292 and add unit tests for deserializing Mkdocs/Hugo example configuration #294

Closed NiklasRosenstein closed 1 year ago

NiklasRosenstein commented 1 year ago

Users that use Pydoc-Markdown as a library and implement their own Page subclass like so:

from pydoc_markdown.util.pages import Page

class MyPage(Page["MyPage"]):
  ...

Should update their code to read:

from pydoc_markdown.util.pages import GenericPage

class MyPage(GenericPage["MyPage"]):
  ...

This will avoid Mypy errors like this below:

error: "Page" expects no type arguments, but 1 given  [type-arg]

The type stays compatible with the old semantics at runtime, so this is not a breaking change.

Introducing the GenericPage is the fix for #291.

292 is fixed by upgrading Databind to ^4.4.0.