microsoft / pyright

Static Type Checker for Python
Other
13.53k stars 1.5k forks source link

Ignores configuation #9304

Closed eyalk11 closed 1 month ago

eyalk11 commented 1 month ago

Note: if you are reporting a wrong signature of a function or a class in the standard library, then the typeshed tracker is better suited for this report: https://github.com/python/typeshed/issues.

If you have a question about typing or a behavior that you’re seeing in Pyright (as opposed to a bug report or enhancement request), consider posting to the Pyright discussion forum.

Describe the bug A clear and concise description of the behavior you are seeing and the expected behavior along with steps to reproduce it.

Pyright ignores my configuation regarding treating general type errors as warnings .

Code or Screenshots

I couldn't provide minimal example

This is my configuration of pyright in nvim

{
  "typeCheckingMode": "basic",
  "reportGeneralTypeIssues": "warning",
  "reportOptionalMemberAccess" : "warning"
}

You can see in the log that it provides:

reportGeneralTypeIssues = "warning"

to pyright

However, I still see GeneralTypeIssues as errrors.

Attached lsp log.

[START][2024-10-24 03:31:53] LSP logging initiated
[INFO][2024-10-24 03:31:53] .../vim/lsp/rpc.lua:733 "Starting RPC client"   {  cmd = { "C:\\Users\\ekarni\\AppData\\Local\\nvim-data\\mason\\bin\\pylsp.CMD" },  extra = {    cwd = "C:/gitproj/chess_analyzer"  }}
[DEBUG][2024-10-24 03:31:53] .../vim/lsp/rpc.lua:286    "rpc.send"  {  id = 1,  jsonrpc = "2.0",  method = "initialize",  params = {    capabilities = {      general = {        positionEncodings = { "utf-16" }      },      textDocument = {        callHierarchy = {          dynamicRegistration = false        },        codeAction = {          codeActionLiteralSupport = {            codeActionKind = {              valueSet = { "", "quickfix", "refactor", "refactor.extract", "refactor.inline", "refactor.rewrite", "source", "source.organizeImports" }            }          },          dataSupport = true,          dynamicRegistration = true,          isPreferredSupport = true,          resolveSupport = {            properties = { "edit" }          }        },        completion = {          completionItem = {            commitCharactersSupport = true,            deprecatedSupport = true,            documentationFormat = { "markdown", "plaintext" },            insertReplaceSupport = true,            insertTextModeSupport = {              valueSet = { 1, 2 }            },            labelDetailsSupport = true,            preselectSupport = true,            resolveSupport = {              properties = { "documentation", "detail", "additionalTextEdits", "sortText", "filterText", "insertText", "textEdit", "insertTextFormat", "insertTextMode" }            },            snippetSupport = true,            tagSupport = {              valueSet = { 1 }            }          },          completionItemKind = {            valueSet = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 }          },          completionList = {            itemDefaults = { "commitCharacters", "editRange", "insertTextFormat", "insertTextMode", "data" }          },          contextSupport = true,          dynamicRegistration = false,          insertTextMode = 1        },        declaration = {          linkSupport = true        },        definition = {          dynamicRegistration = true,          linkSupport = true        },        diagnostic = {          dynamicRegistration = false        },        documentHighlight = {          dynamicRegistration = false        },        documentSymbol = {          dynamicRegistration = false,          hierarchicalDocumentSymbolSupport = true,          symbolKind = {            valueSet = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 }          }        },        formatting = {          dynamicRegistration = true        },        hover = {          contentFormat = { "markdown", "plaintext" },          dynamicRegistration = true        },        implementation = {          linkSupport = true        },        inlayHint = {          dynamicRegistration = true,          resolveSupport = {            properties = { "textEdits", "tooltip", "location", "command" }          }        },        publishDiagnostics = {          dataSupport = true,          relatedInformation = true,          tagSupport = {            valueSet = { 1, 2 }          }        },        rangeFormatting = {          dynamicRegistration = true        },        references = {          dynamicRegistration = false        },        rename = {          dynamicRegistration = true,          prepareSupport = true        },        semanticTokens = {          augmentsSyntaxTokens = true,          dynamicRegistration = false,          formats = { "relative" },          multilineTokenSupport = false,          overlappingTokenSupport = true,          requests = {            full = {              delta = true            },            range = false          },          serverCancelSupport = false,          tokenModifiers = { "declaration", "definition", "readonly", "static", "deprecated", "abstract", "async", "modification", "documentation", "defaultLibrary" },          tokenTypes = { "namespace", "type", "class", "enum", "interface", "struct", "typeParameter", "parameter", "variable", "property", "enumMember", "event", "function", "method", "macro", "keyword", "modifier", "comment", "string", "number", "regexp", "operator", "decorator" }        },        signatureHelp = {          dynamicRegistration = false,          signatureInformation = {            activeParameterSupport = true,            documentationFormat = { "markdown", "plaintext" },            parameterInformation = {              labelOffsetSupport = true            }          }        },        synchronization = {          didSave = true,          dynamicRegistration = false,          willSave = true,          willSaveWaitUntil = true        },        typeDefinition = {          linkSupport = true        }      },      window = {        showDocument = {          support = true        },        showMessage = {          messageActionItem = {            additionalPropertiesSupport = false          }        },        workDoneProgress = true      },      workspace = {        applyEdit = true,        configuration = true,        didChangeConfiguration = {          dynamicRegistration = false        },        didChangeWatchedFiles = {          dynamicRegistration = true,          relativePatternSupport = true        },        inlayHint = {          refreshSupport = true        },        semanticTokens = {          refreshSupport = true        },        symbol = {          dynamicRegistration = false,          symbolKind = {            valueSet = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 }          }        },        workspaceEdit = {          resourceOperations = { "rename", "create", "delete" }        },        workspaceFolders = true      }    },    clientInfo = {      name = "Neovim",      version = "0.11.0-dev+g61aabe073"    },    initializationOptions = vim.empty_dict(),    processId = 130760,    rootPath = "C:\\gitproj\\chess_analyzer",    rootUri = "file:///C:/gitproj/chess_analyzer",    trace = "off",    workDoneToken = "1",    workspaceFolders = { {        name = "C:/gitproj/chess_analyzer",        uri = "file:///C:/gitproj/chess_analyzer"      } }  }}
[INFO][2024-10-24 03:31:53] .../vim/lsp/rpc.lua:733 "Starting RPC client"   {  cmd = { "C:\\Users\\ekarni\\AppData\\Local\\nvim-data\\mason\\bin\\pyright-langserver.CMD", "--stdio" },  extra = {    cwd = "C:/gitproj/chess_analyzer"  }}
[DEBUG][2024-10-24 03:31:53] .../vim/lsp/rpc.lua:286    "rpc.send"  {  id = 1,  jsonrpc = "2.0",  method = "initialize",  params = {    capabilities = {      general = {        positionEncodings = { "utf-16" }      },      textDocument = {        callHierarchy = {          dynamicRegistration = false        },        codeAction = {          codeActionLiteralSupport = {            codeActionKind = {              valueSet = { "", "quickfix", "refactor", "refactor.extract", "refactor.inline", "refactor.rewrite", "source", "source.organizeImports" }            }          },          dataSupport = true,          dynamicRegistration = true,          isPreferredSupport = true,          resolveSupport = {            properties = { "edit" }          }        },        completion = {          completionItem = {            commitCharactersSupport = true,            deprecatedSupport = true,            documentationFormat = { "markdown", "plaintext" },            insertReplaceSupport = true,            insertTextModeSupport = {              valueSet = { 1, 2 }            },            labelDetailsSupport = true,            preselectSupport = true,            resolveSupport = {              properties = { "documentation", "detail", "additionalTextEdits", "sortText", "filterText", "insertText", "textEdit", "insertTextFormat", "insertTextMode" }            },            snippetSupport = true,            tagSupport = {              valueSet = { 1 }            }          },          completionItemKind = {            valueSet = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 }          },          completionList = {            itemDefaults = { "commitCharacters", "editRange", "insertTextFormat", "insertTextMode", "data" }          },          contextSupport = true,          dynamicRegistration = false,          insertTextMode = 1        },        declaration = {          linkSupport = true        },        definition = {          dynamicRegistration = true,          linkSupport = true        },        diagnostic = {          dynamicRegistration = false        },        documentHighlight = {          dynamicRegistration = false        },        documentSymbol = {          dynamicRegistration = false,          hierarchicalDocumentSymbolSupport = true,          symbolKind = {            valueSet = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 }          }        },        formatting = {          dynamicRegistration = true        },        hover = {          contentFormat = { "markdown", "plaintext" },          dynamicRegistration = true        },        implementation = {          linkSupport = true        },        inlayHint = {          dynamicRegistration = true,          resolveSupport = {            properties = { "textEdits", "tooltip", "location", "command" }          }        },        publishDiagnostics = {          dataSupport = true,          relatedInformation = true,          tagSupport = {            valueSet = { 1, 2 }          }        },        rangeFormatting = {          dynamicRegistration = true        },        references = {          dynamicRegistration = false        },        rename = {          dynamicRegistration = true,          prepareSupport = true        },        semanticTokens = {          augmentsSyntaxTokens = true,          dynamicRegistration = false,          formats = { "relative" },          multilineTokenSupport = false,          overlappingTokenSupport = true,          requests = {            full = {              delta = true            },            range = false          },          serverCancelSupport = false,          tokenModifiers = { "declaration", "definition", "readonly", "static", "deprecated", "abstract", "async", "modification", "documentation", "defaultLibrary" },          tokenTypes = { "namespace", "type", "class", "enum", "interface", "struct", "typeParameter", "parameter", "variable", "property", "enumMember", "event", "function", "method", "macro", "keyword", "modifier", "comment", "string", "number", "regexp", "operator", "decorator" }        },        signatureHelp = {          dynamicRegistration = false,          signatureInformation = {            activeParameterSupport = true,            documentationFormat = { "markdown", "plaintext" },            parameterInformation = {              labelOffsetSupport = true            }          }        },        synchronization = {          didSave = true,          dynamicRegistration = false,          willSave = true,          willSaveWaitUntil = true        },        typeDefinition = {          linkSupport = true        }      },      window = {        showDocument = {          support = true        },        showMessage = {          messageActionItem = {            additionalPropertiesSupport = false          }        },        workDoneProgress = true      },      workspace = {        applyEdit = true,        configuration = true,        didChangeConfiguration = {          dynamicRegistration = false        },        didChangeWatchedFiles = {          dynamicRegistration = true,          relativePatternSupport = true        },        inlayHint = {          refreshSupport = true        },        semanticTokens = {          refreshSupport = true        },        symbol = {          dynamicRegistration = false,          symbolKind = {            valueSet = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 }          }        },        workspaceEdit = {          resourceOperations = { "rename", "create", "delete" }        },        workspaceFolders = true      }    },    clientInfo = {      name = "Neovim",      version = "0.11.0-dev+g61aabe073"    },    initializationOptions = vim.empty_dict(),    processId = 130760,    rootPath = "C:\\gitproj\\chess_analyzer",    rootUri = "file:///C:/gitproj/chess_analyzer",    trace = "off",    workDoneToken = "1",    workspaceFolders = { {        name = "C:/gitproj/chess_analyzer",        uri = "file:///C:/gitproj/chess_analyzer"      } }  }}
[INFO][2024-10-24 03:31:53] .../vim/lsp/rpc.lua:733 "Starting RPC client"   {  cmd = { "C:\\Users\\ekarni\\AppData\\Local\\nvim-data\\mason\\bin\\jedi-language-server.CMD" },  extra = {    cwd = "C:/gitproj/chess_analyzer"  }}
[DEBUG][2024-10-24 03:31:53] .../vim/lsp/rpc.lua:286    "rpc.send"  {  id = 1,  jsonrpc = "2.0",  method = "initialize",  params = {    capabilities = {      general = {        positionEncodings = { "utf-16" }      },      textDocument = {        callHierarchy = {          dynamicRegistration = false        },        codeAction = {          codeActionLiteralSupport = {            codeActionKind = {              valueSet = { "", "quickfix", "refactor", "refactor.extract", "refactor.inline", "refactor.rewrite", "source", "source.organizeImports" }            }          },          dataSupport = true,          dynamicRegistration = true,          isPreferredSupport = true,          resolveSupport = {            properties = { "edit" }          }        },        completion = {          completionItem = {            commitCharactersSupport = true,            deprecatedSupport = true,            documentationFormat = { "markdown", "plaintext" },            insertReplaceSupport = true,            insertTextModeSupport = {              valueSet = { 1, 2 }            },            labelDetailsSupport = true,            preselectSupport = true,            resolveSupport = {              properties = { "documentation", "detail", "additionalTextEdits", "sortText", "filterText", "insertText", "textEdit", "insertTextFormat", "insertTextMode" }            },            snippetSupport = true,            tagSupport = {              valueSet = { 1 }            }          },          completionItemKind = {            valueSet = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 }          },          completionList = {            itemDefaults = { "commitCharacters", "editRange", "insertTextFormat", "insertTextMode", "data" }          },          contextSupport = true,          dynamicRegistration = false,          insertTextMode = 1        },        declaration = {          linkSupport = true        },        definition = {          dynamicRegistration = true,          linkSupport = true        },        diagnostic = {          dynamicRegistration = false        },        documentHighlight = {          dynamicRegistration = false        },        documentSymbol = {          dynamicRegistration = false,          hierarchicalDocumentSymbolSupport = true,          symbolKind = {            valueSet = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 }          }        },        formatting = {          dynamicRegistration = true        },        hover = {          contentFormat = { "markdown", "plaintext" },          dynamicRegistration = true        },        implementation = {          linkSupport = true        },        inlayHint = {          dynamicRegistration = true,          resolveSupport = {            properties = { "textEdits", "tooltip", "location", "command" }          }        },        publishDiagnostics = {          dataSupport = true,          relatedInformation = true,          tagSupport = {            valueSet = { 1, 2 }          }        },        rangeFormatting = {          dynamicRegistration = true        },        references = {          dynamicRegistration = false        },        rename = {          dynamicRegistration = true,          prepareSupport = true        },        semanticTokens = {          augmentsSyntaxTokens = true,          dynamicRegistration = false,          formats = { "relative" },          multilineTokenSupport = false,          overlappingTokenSupport = true,          requests = {            full = {              delta = true            },            range = false          },          serverCancelSupport = false,          tokenModifiers = { "declaration", "definition", "readonly", "static", "deprecated", "abstract", "async", "modification", "documentation", "defaultLibrary" },          tokenTypes = { "namespace", "type", "class", "enum", "interface", "struct", "typeParameter", "parameter", "variable", "property", "enumMember", "event", "function", "method", "macro", "keyword", "modifier", "comment", "string", "number", "regexp", "operator", "decorator" }        },        signatureHelp = {          dynamicRegistration = false,          signatureInformation = {            activeParameterSupport = true,            documentationFormat = { "markdown", "plaintext" },            parameterInformation = {              labelOffsetSupport = true            }          }        },        synchronization = {          didSave = true,          dynamicRegistration = false,          willSave = true,          willSaveWaitUntil = true        },        typeDefinition = {          linkSupport = true        }      },      window = {        showDocument = {          support = true        },        showMessage = {          messageActionItem = {            additionalPropertiesSupport = false          }        },        workDoneProgress = true      },      workspace = {        applyEdit = true,        configuration = true,        didChangeConfiguration = {          dynamicRegistration = false        },        didChangeWatchedFiles = {          dynamicRegistration = true,          relativePatternSupport = true        },        inlayHint = {          refreshSupport = true        },        semanticTokens = {          refreshSupport = true        },        symbol = {          dynamicRegistration = false,          symbolKind = {            valueSet = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 }          }        },        workspaceEdit = {          resourceOperations = { "rename", "create", "delete" }        },        workspaceFolders = true      }    },    clientInfo = {      name = "Neovim",      version = "0.11.0-dev+g61aabe073"    },    initializationOptions = vim.empty_dict(),    processId = 130760,    rootPath = "C:\\gitproj\\chess_analyzer",    rootUri = "file:///C:/gitproj/chess_analyzer",    trace = "off",    workDoneToken = "1",    workspaceFolders = { {        name = "C:/gitproj/chess_analyzer",        uri = "file:///C:/gitproj/chess_analyzer"      } }  }}
[DEBUG][2024-10-24 03:31:53] .../vim/lsp/rpc.lua:408    "rpc.receive"   {  jsonrpc = "2.0",  method = "window/logMessage",  params = {    message = "Pyright language server 1.1.326 starting",    type = 3  }}
[DEBUG][2024-10-24 03:31:53] .../vim/lsp/rpc.lua:408    "rpc.receive"   {  jsonrpc = "2.0",  method = "window/logMessage",  params = {    message = "Server root directory: C:\\Users\\ekarni\\AppData\\Local\\nvim-data\\mason\\packages\\pyright\\node_modules\\pyright/dist/",    type = 3  }}
[DEBUG][2024-10-24 03:31:53] .../vim/lsp/rpc.lua:408    "rpc.receive"   {  jsonrpc = "2.0",  method = "window/logMessage",  params = {    message = 'Starting service instance "C:/gitproj/chess_analyzer"',    type = 3  }}
[DEBUG][2024-10-24 03:31:53] .../vim/lsp/rpc.lua:408    "rpc.receive"   {  id = 1,  jsonrpc = "2.0",  result = {    capabilities = {      callHierarchyProvider = true,      codeActionProvider = {        codeActionKinds = { "quickfix", "source.organizeImports" },        workDoneProgress = true      },      completionProvider = {        completionItem = {          labelDetailsSupport = true        },        resolveProvider = true,        triggerCharacters = { ".", "[", '"', "'" },        workDoneProgress = true      },      declarationProvider = {        workDoneProgress = true      },      definitionProvider = {        workDoneProgress = true      },      documentHighlightProvider = {        workDoneProgress = true      },      documentSymbolProvider = {        workDoneProgress = true      },      executeCommandProvider = {        commands = {},        workDoneProgress = true      },      hoverProvider = {        workDoneProgress = true      },      referencesProvider = {        workDoneProgress = true      },      renameProvider = {        prepareProvider = true,        workDoneProgress = true      },      signatureHelpProvider = {        triggerCharacters = { "(", ",", ")" },        workDoneProgress = true      },      textDocumentSync = 2,      typeDefinitionProvider = {        workDoneProgress = true      },      workspace = {        workspaceFolders = {          changeNotifications = true,          supported = true        }      },      workspaceSymbolProvider = {        workDoneProgress = true      }    }  }}
[INFO][2024-10-24 03:31:54] ...m/lsp/client.lua:620 "LSP[null-ls]"  "server_capabilities"   {  server_capabilities = {    codeActionProvider = {      resolveProvider = false    },    completionProvider = {      allCommitCharacters = {},      completionItem = {        labelDetailsSupport = true      },      resolveProvider = false,      triggerCharacters = { ".", ":", "-" }    },    documentFormattingProvider = true,    documentRangeFormattingProvider = true,    executeCommandProvider = {      commands = { "NULL_LS_CODE_ACTION" }    },    hoverProvider = true,    textDocumentSync = {      change = 1,      openClose = true,      save = {        includeText = true      }    }  }}
[INFO][2024-10-24 03:31:54] .../vim/lsp/rpc.lua:733 "Starting RPC client"   {  cmd = { "node", "C:\\Users\\ekarni\\.vim\\plugged\\copilot.vim/dist/agent.js", "--stdio" },  extra = {    cwd = "C:\\Users\\ekarni"  }}
[DEBUG][2024-10-24 03:31:54] .../vim/lsp/rpc.lua:286    "rpc.send"  {  id = 1,  jsonrpc = "2.0",  method = "initialize",  params = {    capabilities = {      general = {        positionEncodings = { "utf-16" }      },      textDocument = {        callHierarchy = {          dynamicRegistration = false        },        codeAction = {          codeActionLiteralSupport = {            codeActionKind = {              valueSet = { "", "quickfix", "refactor", "refactor.extract", "refactor.inline", "refactor.rewrite", "source", "source.organizeImports" }            }          },          dataSupport = true,          dynamicRegistration = true,          isPreferredSupport = true,          resolveSupport = {            properties = { "edit" }          }        },        completion = {          completionItem = {            commitCharactersSupport = false,            deprecatedSupport = false,            documentationFormat = { "markdown", "plaintext" },            preselectSupport = false,            resolveSupport = {              properties = { "additionalTextEdits" }            },            snippetSupport = true          },          completionItemKind = {            valueSet = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 }          },          completionList = {            itemDefaults = { "editRange", "insertTextFormat", "insertTextMode", "data" }          },          contextSupport = false,          dynamicRegistration = false        },        declaration = {          linkSupport = true        },        definition = {          dynamicRegistration = true,          linkSupport = true        },        diagnostic = {          dynamicRegistration = false        },        documentHighlight = {          dynamicRegistration = false        },        documentSymbol = {          dynamicRegistration = false,          hierarchicalDocumentSymbolSupport = true,          symbolKind = {            valueSet = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 }          }        },        formatting = {          dynamicRegistration = true        },        hover = {          contentFormat = { "markdown", "plaintext" },          dynamicRegistration = true        },        implementation = {          linkSupport = true        },        inlayHint = {          dynamicRegistration = true,          resolveSupport = {            properties = { "textEdits", "tooltip", "location", "command" }          }        },        publishDiagnostics = {          dataSupport = true,          relatedInformation = true,          tagSupport = {            valueSet = { 1, 2 }          }        },        rangeFormatting = {          dynamicRegistration = true        },        references = {          dynamicRegistration = false        },        rename = {          dynamicRegistration = true,          prepareSupport = true        },        semanticTokens = {          augmentsSyntaxTokens = true,          dynamicRegistration = false,          formats = { "relative" },          multilineTokenSupport = false,          overlappingTokenSupport = true,          requests = {            full = {              delta = true            },            range = false          },          serverCancelSupport = false,          tokenModifiers = { "declaration", "definition", "readonly", "static", "deprecated", "abstract", "async", "modification", "documentation", "defaultLibrary" },          tokenTypes = { "namespace", "type", "class", "enum", "interface", "struct", "typeParameter", "parameter", "variable", "property", "enumMember", "event", "function", "method", "macro", "keyword", "modifier", "comment", "string", "number", "regexp", "operator", "decorator" }        },        signatureHelp = {          dynamicRegistration = false,          signatureInformation = {            activeParameterSupport = true,            documentationFormat = { "markdown", "plaintext" },            parameterInformation = {              labelOffsetSupport = true            }          }        },        synchronization = {          didSave = true,          dynamicRegistration = false,          willSave = true,          willSaveWaitUntil = true        },        typeDefinition = {          linkSupport = true        }      },      window = {        showDocument = {          support = true        },        showMessage = {          messageActionItem = {            additionalPropertiesSupport = false          }        },        workDoneProgress = true      },      workspace = {        applyEdit = true,        configuration = true,        didChangeConfiguration = {          dynamicRegistration = false        },        didChangeWatchedFiles = {          dynamicRegistration = true,          relativePatternSupport = true        },        inlayHint = {          refreshSupport = true        },        semanticTokens = {          refreshSupport = true        },        symbol = {          dynamicRegistration = false,          symbolKind = {            valueSet = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 }          }        },        workspaceEdit = {          resourceOperations = { "rename", "create", "delete" }        },        workspaceFolders = true      }    },    clientInfo = {      name = "Neovim",      version = "0.11.0-dev+g61aabe073"    },    initializationOptions = {      editorInfo = {        name = "Neovim",        version = "0.11.0-dev-250+g61aabe073"      },      editorPluginInfo = {        name = "copilot.vim",        version = "1.31.0"      }    },    processId = 130760,    rootPath = vim.NIL,    rootUri = vim.NIL,    trace = "off",    workDoneToken = "1",    workspaceFolders = vim.NIL  }}
[DEBUG][2024-10-24 03:31:54] .../vim/lsp/rpc.lua:286    "rpc.send"  {  jsonrpc = "2.0",  method = "textDocument/didFocus",  params = {    textDocument = {      uri = "file:///C:/gitproj/chess_analyzer/calc.py"    }  }}
[INFO][2024-10-24 03:31:54] ...lsp/handlers.lua:628 "Pyright language server 1.1.326 starting"
[INFO][2024-10-24 03:31:54] ...lsp/handlers.lua:628 "Server root directory: C:\\Users\\ekarni\\AppData\\Local\\nvim-data\\mason\\packages\\pyright\\node_modules\\pyright/dist/"
[INFO][2024-10-24 03:31:54] ...lsp/handlers.lua:628 'Starting service instance "C:/gitproj/chess_analyzer"'
[DEBUG][2024-10-24 03:31:54] .../vim/lsp/rpc.lua:286    "rpc.send"  {  jsonrpc = "2.0",  method = "initialized",  params = vim.empty_dict()}
[DEBUG][2024-10-24 03:31:54] .../vim/lsp/rpc.lua:286    "rpc.send"  {  jsonrpc = "2.0",  method = "workspace/didChangeConfiguration",  params = {    settings = {      python = {        analysis = {          autoSearchPaths = true,          diagnosticMode = "openFilesOnly",          useLibraryCodeForTypes = true        }      },      reportGeneralTypeIssues = "warning",      reportOptionalMemberAccess = "warning",      typeCheckingMode = "basic",      <metatable> = {        __tostring = <function 1>      }    }  }}
[DEBUG][2024-10-24 03:31:54] .../vim/lsp/rpc.lua:286    "rpc.send"  {  jsonrpc = "2.0",  method = "textDocument/didOpen",  params = {    textDocument = {      languageId = "python",      text = "from collections import namedtuple\r\nimport math\r\nimport threading\r\nfrom functools import partial\r\nfrom copy import deepcopy \r\nimport os,re,sys\r\nfrom multiprocessing import Pool\r\nimport multiprocessing\r\nfrom concurrent.futures import ProcessPoolExecutor, ThreadPoolExecutor\r\nimport concurrent.futures\r\nimport time\r\nfrom collections import defaultdict\r\nfrom queue import Queue\r\nimport io\r\n\r\nimport chess.engine\r\nimport numpy as np\r\nfrom chess import Board\r\nfrom 
....

VS Code extension or command-line Are you running pyright as a VS Code extension, a language server in another editor, integrated into Pylance, or the command-line tool? Which version?

I use neovim 0.11 pyright installed version 1.1.386 / 1.1.326 (later I tried on 1.1.386)

lspconfig.nvim + nlspsettings.nvim

erictraut commented 1 month ago

You probably have a pyrightconfig.json file or a pyproject.toml file with a [tools.pyright] section. If you have a config file, this overrides the LSP settings. See this documentation for details.