Skip to content

fix: handle multiple handler's envs on same the doc#507

Merged
pawamoy merged 1 commit intomkdocstrings:masterfrom
jdpatt:bugfix/502-dual-handlers-in-doc
Jan 11, 2023
Merged

fix: handle multiple handler's envs on same the doc#507
pawamoy merged 1 commit intomkdocstrings:masterfrom
jdpatt:bugfix/502-dual-handlers-in-doc

Conversation

@jdpatt
Copy link
Copy Markdown
Contributor

@jdpatt jdpatt commented Jan 6, 2023

Didn't want to take the full performance hit of doing it every time, so it now tracks if this autodoc instance has seen this handler before and if not; updates the handler's env.

Additionally, add a doc string to _update_env just a breadcrumb.

References: #201
Fixes: #502


I had issues with the instructions in contributing.md and had to manually install pdm on both windows/osx. I got format working but check_types and test failed in locations not associated with this change.

Copy link
Copy Markdown
Member

@pawamoy pawamoy left a comment

Choose a reason for hiding this comment

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

Thanks a lot! I didn't think of using a list, that's clever 🙂

@pawamoy
Copy link
Copy Markdown
Member

pawamoy commented Jan 6, 2023

And yeah CI breaks from time to time, I'll handle it.

@pawamoy
Copy link
Copy Markdown
Member

pawamoy commented Jan 8, 2023

CI is fixed on master, you can rebase on it 🙂

Instead of a boolean of has any env been updated, track by handle name
which env has been updated.

References: mkdocstrings#201
Fixes: 502
@jdpatt jdpatt force-pushed the bugfix/502-dual-handlers-in-doc branch from 4cf5dd0 to 3850d86 Compare January 9, 2023 15:26
Copy link
Copy Markdown
Member

@pawamoy pawamoy left a comment

Choose a reason for hiding this comment

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

Thanks!

@pawamoy pawamoy merged commit a6ea80c into mkdocstrings:master Jan 11, 2023
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.

If two different handlers are used in one document, the jinja env is not updated

2 participants