Skip to content

fix(docs): preserve inherited method types and overloads - #1241

Open
sylvesterkaczmarek wants to merge 1 commit into
gchq:mainfrom
sylvesterkaczmarek:bugfix/795-inherited-type-documentation
Open

sylvesterkaczmarek wants to merge 1 commit into
gchq:mainfrom
sylvesterkaczmarek:bugfix/795-inherited-type-documentation

Conversation

@sylvesterkaczmarek

Copy link
Copy Markdown
Contributor

Fixes #795.

Complete the type documentation for unannotated method overrides from compatible base methods. Preserve explicit subclass annotations and overloads, follow the method resolution order, and leave changed parameter lists alone. Runtime methods and numerical code are unchanged.

The current type-hint extension already renders directly declared overloads. This adds the missing inherited annotations and overloads for concrete kernels through a documentation-only hook.

Validation: 10 Sphinx regression tests passed, including real kernel methods and inheritance edge cases. Five fail without the new hook. The full HTML documentation build passed with -E -n -W; applicable pre-commit checks passed. Tested in the locked Python 3.12 environment.

The numerical unit suite was not rerun because no numerical code changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Overloaded type annotations not compiled by Sphinx

1 participant