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

Raise error if user uses 'name' in bridge module setup #4555

Merged
merged 1 commit into from
Feb 20, 2025

Conversation

IvyZX
Copy link
Collaborator

@IvyZX IvyZX commented Feb 19, 2025

No description provided.

@IvyZX IvyZX requested a review from cgarciae February 19, 2025 22:12
@@ -253,7 +256,6 @@ def variable( # type: ignore[invalid-annotation]
name: str,
init_fn: tp.Callable[..., A] | None = None,
*init_args,
unbox: bool = True,
Copy link
Collaborator

Choose a reason for hiding this comment

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

we should leave this for compatibility?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

@@ -123,7 +123,7 @@ def _module_meta_call(cls: type[M], *args, **kwargs) -> M:
parent = None
module: M

if parent_ctx is not None and parent_ctx.in_compact:
if parent_ctx is not None:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not sure we should go into this path when we're not inside compact. Maybe we could do the check bellow outside?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

@copybara-service copybara-service bot merged commit 88ea291 into google:main Feb 20, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants