You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add Ruff formatter integration for Python code formatting support
- Implemented downloading and extraction of the Ruff binary in build scripts for Linux and macOS.
- Enhanced pyright-bridge.ts to handle formatting requests using Ruff, with support for Unix platforms only.
- Updated README.md to document the new formatting feature and its platform limitations.
- Introduced formatter.ts for managing Ruff execution and formatting logic.
The Pyright language server is configured via `pyrightconfig.json`. The bridge automatically deploys this configuration file to the bot root directory specified by `--bot-root` on startup. You can customize type checking behavior, Python version, include/exclude patterns, and more.
86
86
87
+
### Formatting Support
88
+
89
+
The bridge includes Python code formatting using Ruff (bundled binary). **Formatting is only available on Unix platforms (Linux, macOS)**, not Windows.
90
+
91
+
-**Unix (Linux/macOS)**: Formatting is automatically available via `textDocument/formatting` LSP requests
92
+
-**Windows**: Formatting requests are not supported (will return "not supported")
93
+
94
+
Ruff formatting options can be configured via `pyproject.toml` or `ruff.toml` in the project root.
95
+
87
96
## Features
88
97
89
98
- ✅ Bundled Node.js runtime (no system dependencies)
@@ -92,6 +101,7 @@ The Pyright language server is configured via `pyrightconfig.json`. The bridge a
0 commit comments