facebook / facebook/pyrefly

lsp diagnostics does not work for scripts without an extension

Open
#4,397 2 comments 0 reactions 1 assignee Claimed by @nitishagar View on GitHub
language-server
Dominant language
Rust
Stars
7k
Forks
516
PR merge metrics
No merged PRs in 30d

Description

### Describe the Bug

Pyrefly language server does not provide any diagnostics for python scripts using shebang instead of .py extension.

For comparison, some other language servers, such as pyright and ty, were able to provide diagnostics for such files.

### Example
In vscode when `python.pyrefly.typeCheckingMode` is set to `default`, the language server will provide diagnostics for a python file named `script.py` but not for a python file named `script`.

Image

### 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.