Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: expose the full config to handlers #509

Conversation

jdpatt
Copy link
Contributor

@jdpatt jdpatt commented Jan 11, 2023

Instead of just passing only the handler_config on initialization pass the full dictionary of extension_config directly to the handler. Refactors items that were pulled from the full configuration to point directly to that object.

References: #501

Instead of just passing the handler_config on initialization pass the
full dictionary of `extension_config` directly to the handler.

References: mkdocstrings#501
@jdpatt jdpatt marked this pull request as ready for review January 22, 2023 14:49
@jdpatt
Copy link
Contributor Author

jdpatt commented Jan 22, 2023

I'll have to think a bit more about the change, as it could allow us to clean up a lot of the underlying code.

@pawamoy interested to see where else you would see/want refactoring from having access to the full configuration object. Keeping the same interfaces/backwards compatibility limited a few other places that I saw. Namely in the get_handler call. Would still need options passed to collect and render since the global options may have been overridden locally.

@pawamoy pawamoy self-assigned this Mar 4, 2023
@pawamoy
Copy link
Member

pawamoy commented Mar 4, 2023

Hey sorry, I forgot about this PR. Just so you know, it is fine to ping me if I don't answer 🙂
I'll try to review this shortly.

@jdpatt
Copy link
Contributor Author

jdpatt commented Mar 4, 2023

Hey sorry, I forgot about this PR. Just so you know, it is fine to ping me if I don't answer 🙂 I'll try to review this shortly.

No worries, we are all busy!

@jdpatt
Copy link
Contributor Author

jdpatt commented Mar 29, 2023

@pawamoy , I'll ping you this time. Did you get a chance to review?

docs/handlers/overview.md Outdated Show resolved Hide resolved
docs/handlers/overview.md Outdated Show resolved Hide resolved
Copy link
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.

OK lets start with that and I'll see later if there's a way to push it even further. Thanks!

@pawamoy pawamoy merged commit 15dacf6 into mkdocstrings:master Apr 2, 2023
15 of 16 checks passed
@jdpatt
Copy link
Contributor Author

jdpatt commented Apr 3, 2023

Sounds great, thanks!

@jdpatt jdpatt deleted the feature/501-expose-mkdocs-config-to-handler branch April 3, 2023 13:06
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.

None yet

2 participants