Skip to content

[typing] add assertion to avoid pyrefly error - #5546

Merged
copybara-service[bot] merged 1 commit into
mainfrom
test_960258175
Aug 6, 2026
Merged

copybara-service[bot] merged 1 commit into
mainfrom
test_960258175

Conversation

@copybara-service

Copy link
Copy Markdown

[typing] add assertion to avoid pyrefly error

sampling_state.logits_buffer is annotated as jnp.ndarray | None, so strict typing requires this assertion. This is not an issue at runtime, because the None case would result in an uncaught AttributeError in the next line.

@copybara-service
copybara-service Bot force-pushed the test_960258175 branch 2 times, most recently from b74d6ba to f871f84 Compare August 6, 2026 13:40
`sampling_state.logits_buffer` is annotated as `jnp.ndarray | None`, so strict typing requires this assertion. This is not an issue at runtime, because the `None` case would result in an uncaught `AttributeError` in the next line.

PiperOrigin-RevId: 960267676
@copybara-service
copybara-service Bot merged commit 6d224f1 into main Aug 6, 2026
@copybara-service
copybara-service Bot deleted the test_960258175 branch August 6, 2026 13:41
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.

0 participants