chore: format code

This commit is contained in:
GitHub Action
2025-12-18 19:38:25 +00:00
parent ab9ac7c87a
commit 67cfd7f06b
2 changed files with 15 additions and 7 deletions

View File

@@ -364,9 +364,17 @@ export namespace LSPServer {
export const Ty: Info = {
id: "ty",
extensions: [".py", ".pyi"],
root: NearestRoot(["pyproject.toml", "ty.toml", "setup.py", "setup.cfg", "requirements.txt", "Pipfile", "pyrightconfig.json"]),
root: NearestRoot([
"pyproject.toml",
"ty.toml",
"setup.py",
"setup.cfg",
"requirements.txt",
"Pipfile",
"pyrightconfig.json",
]),
async spawn(root) {
if(!Flag.OPENCODE_EXPERIMENTAL_LSP_TY) {
if (!Flag.OPENCODE_EXPERIMENTAL_LSP_TY) {
return undefined
}
@@ -388,7 +396,7 @@ export namespace LSPServer {
}
}
if(!binary) {
if (!binary) {
for (const venvPath of potentialVenvPaths) {
const isWindows = process.platform === "win32"
const potentialTyPath = isWindows
@@ -401,7 +409,7 @@ export namespace LSPServer {
}
}
if(!binary) {
if (!binary) {
log.error("ty not found, please install ty first")
return
}
@@ -409,7 +417,7 @@ export namespace LSPServer {
const proc = spawn(binary, ["server"], {
cwd: root,
})
return {
process: proc,
initialization,