Skip to content

Feature: add signature exposure for static inference - #808

Draft
cvanelteren wants to merge 6 commits into
mainfrom
fix/static-parsing
Draft

Feature: add signature exposure for static inference#808
cvanelteren wants to merge 6 commits into
mainfrom
fix/static-parsing

Conversation

@cvanelteren

Copy link
Copy Markdown
Collaborator

Ultraplot does a lot of runtime composition (lazy loading, dynamic dispatch, and shared doc merging), which makes static analysis difficult because analyzers see only source-level declarations, not the final runtime-expanded API. The lazy loader compounds this by delaying object/materialization of the public surface. On top of that, _obfuscate_parameters historically replaced visible signatures with compact (**kwargs) forms to keep docs manageable, which also removed concrete parameter metadata from inspect.signature, so tools like Pylance had less to work with for hovers/call tips.

So the concrete problem was a combo of:

  1. runtime indirection (lazy loading),
  2. runtime signature/docstring composition, and
  3. signature obfuscation for docs at the callable object level.

This PR separates the two processes by keeping a copy for the docs themselves while using a process that static analysers like Pylance can work with.

@codecov

codecov Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.00000% with 5 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
ultraplot/tests/test_docstring_helpers.py 92.30% 3 Missing ⚠️
ultraplot/internals/docstring.py 92.30% 0 Missing and 1 partial ⚠️
ultraplot/tests/test_kwargs_helpers.py 87.50% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

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

Labels

None yet

1 participant