facebook / facebook/pyrefly

Triton code mistrakenly treated as unreachable

Open
#2,565 4 comments 0 reactions 0 assignees View on GitHub
language-server question
Dominant language
Rust
Stars
7k
Forks
519
PR merge metrics
No merged PRs in 30d

Description

### Describe the Bug

While I am writing code for sglang, I met the following code treated as unreachable code by pyrefly, which annoys me a lot.

https://github.com/sgl-project/sglang/blob/main/python/sglang/srt/layers/attention/triton_ops/extend_attention.py#L220

It happens in almost all the long triton code I read or write.

### Sandbox Link

_No response_

### (Only applicable for extension issues) IDE Information

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.