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

Add get_path_to_page_configs #928

Merged
merged 1 commit into from
Sep 6, 2024

Conversation

richard-to
Copy link
Collaborator

Adding this method for downstream usage integration.

Adding this method for downstream usage integration.
@@ -123,6 +124,9 @@ def register_page(self, *, path: str, page_config: PageConfig) -> None:
def get_page_config(self, *, path: str) -> PageConfig | None:
return self._path_to_page_config.get(path)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm wondering if we should also add a deepcopy to this method, but that's a bit orthogonal to this PR.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think the page config object is small enough that the deepcopy probably wouldn't be noticeable performance-wise. And doesn't seem like it's called a lot. I can add it as a follow up.

@richard-to richard-to merged commit 688f3f8 into google:main Sep 6, 2024
5 checks passed
@richard-to richard-to deleted the runtime-path-config branch September 28, 2024 18:24
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