Skip to content

fix: Inferred return type of Never when a method body contains a for loop #4815

fix: Inferred return type of Never when a method body contains a for loop

fix: Inferred return type of Never when a method body contains a for loop #4815

Triggered via pull request January 12, 2026 20:54
Status Success
Total duration 28m 35s
Artifacts

pyrefly.yml

on: pull_request
Matrix: test
Fit to window
Zoom out
Zoom in

Annotations

30 errors
Pyrefly parse-error: /tmp/.tmpxU9okn/test.py#L5
Parse error: Expected a statement
Pyrefly parse-error: /tmp/.tmpxU9okn/test.py#L2
Parse error: Unexpected indentation
Pyrefly parse-error: /tmp/.tmpclgjJV/test.py#L4
Parse error: Expected a statement
Pyrefly parse-error: /tmp/.tmpclgjJV/test.py#L2
Parse error: Unexpected indentation
Pyrefly parse-error: /tmp/.tmpcJN4Zi/test.py#L5
Parse error: Expected a statement
Pyrefly parse-error: /tmp/.tmpcJN4Zi/test.py#L2
Parse error: Unexpected indentation
Pyrefly parse-error: /tmp/.tmprZbII6/test.py#L7
Parse error: Expected a statement
Pyrefly parse-error: /tmp/.tmprZbII6/test.py#L2
Parse error: Unexpected indentation
Pyrefly parse-error: /tmp/.tmpCeP3os/test.py#L4
Parse error: Expected a statement
Pyrefly parse-error: /tmp/.tmpCeP3os/test.py#L2
Parse error: Unexpected indentation
Pyrefly missing-import: C:/Users/RUNNER~1/AppData/Local/Temp/pyrefly_infer_testJECvjV/file_one.py#L2
Could not find import of `file_two` Looked in these locations (from default config for project root marked by `D:\a\pyrefly\pyrefly\pyrefly\pyproject.toml`): Import root (inferred from project layout): "D:\\a\\pyrefly\\pyrefly\\pyrefly" Site package path queried from interpreter: ["C:\\hostedtoolcache\\windows\\Python\\3.9.13\\x64\\DLLs", "C:\\hostedtoolcache\\windows\\Python\\3.9.13\\x64\\lib", "C:\\hostedtoolcache\\windows\\Python\\3.9.13\\x64", "C:\\hostedtoolcache\\windows\\Python\\3.9.13\\x64\\lib\\site-packages"]
Pyrefly parse-error: C:/Users/RUNNER~1/AppData/Local/Temp/.tmpwsEZ4R/test.py#L7
Parse error: Expected a statement
Pyrefly parse-error: C:/Users/RUNNER~1/AppData/Local/Temp/.tmpwsEZ4R/test.py#L2
Parse error: Unexpected indentation
Pyrefly parse-error: C:/Users/RUNNER~1/AppData/Local/Temp/.tmpdPBCEA/test.py#L4
Parse error: Expected a statement
Pyrefly parse-error: C:/Users/RUNNER~1/AppData/Local/Temp/.tmpdPBCEA/test.py#L2
Parse error: Unexpected indentation
Pyrefly parse-error: C:/Users/RUNNER~1/AppData/Local/Temp/.tmp0oPOyJ/test.py#L5
Parse error: Expected a statement
Pyrefly parse-error: C:/Users/RUNNER~1/AppData/Local/Temp/.tmp0oPOyJ/test.py#L2
Parse error: Unexpected indentation
Pyrefly parse-error: C:/Users/RUNNER~1/AppData/Local/Temp/.tmpAgRDl2/test.py#L4
Parse error: Expected a statement
Pyrefly parse-error: C:/Users/RUNNER~1/AppData/Local/Temp/.tmpAgRDl2/test.py#L2
Parse error: Unexpected indentation