Skip to content

Remove old renderer#81

Merged
rich-iannone merged 6 commits intoposit-dev:mainfrom
has2k1:merge-renderer
Apr 13, 2026
Merged

Remove old renderer#81
rich-iannone merged 6 commits intoposit-dev:mainfrom
has2k1:merge-renderer

Conversation

@has2k1
Copy link
Copy Markdown
Collaborator

@has2k1 has2k1 commented Apr 2, 2026

While core modular functions introduced by qrenderer replaced the original renderer, they were applied through a subclass of the old renderer. This PR makes qrenderer the first-class renderer, and completes the transition from the original renderer.

has2k1 added 3 commits April 1, 2026 21:47
The three-layer renderer hierarchy (Renderer → MdRenderer → bridge
Renderer →
assets Renderer) existed only to satisfy the old class structure. The
new
_render/ subpackage only uses the renderer as a config holder (3
properties).
RenderConfig was a pass-through dataclass threaded through every Render
object but only consumed in two places. Move its properties to their
natural homes:

- display_name_format, signature_name_format → RenderDoc fields
- header_level, typing_module_paths → Builder attributes
- show_signature → already a RenderDoc field (redundant override removed)

Delete _render_config.py and remove config from RenderBase.
The "q" prefix was a historical artifact. Rename the private subpackage
to the simpler _renderer name, updating all 138 references across
source, tests, and configuration.
@has2k1 has2k1 mentioned this pull request Apr 2, 2026
@has2k1 has2k1 requested a review from rich-iannone April 3, 2026 00:17
has2k1 and others added 3 commits April 3, 2026 15:14
Narrow pyright scope to _render subpackage, add proper type aliases
(Annotation, DocstringDefinitionType), replace untyped lists/signatures
with specific types, and add Stringable protocol for html_table.
Merge branch 'main' into pr/81 to integrate PR posit-dev#81 from has2k1.

Conflict resolution in core.py: kept both the PR's new import path
(_renderer instead of _qrenderer) and main's _patch_griffe() call
for griffe compatibility.
The Builder now filters out 'renderer' and 'style' keys, so this
config dict was being silently discarded. Remove it for clarity.
@rich-iannone
Copy link
Copy Markdown
Member

@has2k1 sorry again that this took so long to get to. I merged main into the branch, resolved the one conflict in core.py (kept both your _renderer import path and the _patch_griffe() call added since), and removed the now-dead renderer_config dict that the Builder was silently filtering out. Will review again after CI passes and merge shortly after that.

Copy link
Copy Markdown
Member

@rich-iannone rich-iannone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@rich-iannone rich-iannone merged commit 2f13142 into posit-dev:main Apr 13, 2026
7 checks passed
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.

2 participants