Coder Social home page Coder Social logo

Comments (2)

krassowski avatar krassowski commented on June 14, 2024

The default settings come from three places:

  1. Defaults of the language server
  2. Overrides set by workspace_configuration in jupyter_server_config.py or similar (see here for an example)
  3. Overrides set via overrides.json

Additionally all of these settings can be set using dotted or nested conventions.

The error dialog that you see is saying that after combining the language server defaults and the two overrides there is both a dotted and nested convention. I will try to reproduce the issue to assess what place this is coming from; does changing the overrides.json5 to use the nested convention (like below) help?

{
"@jupyter-lsp/jupyterlab-lsp:plugin": {
    language_servers: {
      pyright: {
        priority: 200,
        serverSettings: {
          "python.analysis.extraPaths": ["/prod/tools/base/lib/python"],
          python: {
            analysis: {
              diagnosticSeverityOverrides: {
                reportMissingImports: "none"
              },
            },
          },
        },
      },
    },
  },
}

from jupyterlab-lsp.

divyansshhh avatar divyansshhh commented on June 14, 2024

That doesn't help either, this was resovled to -

Settings
 "pyright": {
            "priority": 200,
            "serverSettings": {
                "python.analysis.autoImportCompletions": true,
                "python.analysis.autoSearchPaths": true,
                "python.analysis.extraPaths": [
                    "/prod/tools/base/lib/python"
                ],
                "python.analysis.stubPath": "typings",
                "python.analysis.diagnosticMode": "openFilesOnly",
                "python.analysis.diagnosticSeverityOverrides": {
                    "reportGeneralTypeIssues": "error",
                    "reportPropertyTypeMismatch": "none",
                    "reportFunctionMemberAccess": "none",
                    "reportMissingImports": "error",
                    "reportMissingModuleSource": "warning",
                    "reportMissingTypeStubs": "none",
                    "reportImportCycles": "none",
                    "reportUnusedImport": "none",
                    "reportUnusedClass": "none",
                    "reportUnusedFunction": "none",
                    "reportUnusedVariable": "none",
                    "reportDuplicateImport": "none",
                    "reportWildcardImportFromLibrary": "warning",
                    "reportOptionalSubscript": "error",
                    "reportOptionalMemberAccess": "error",
                    "reportOptionalCall": "error",
                    "reportOptionalIterable": "error",
                    "reportOptionalContextManager": "error",
                    "reportOptionalOperand": "error",
                    "reportTypedDictNotRequiredAccess": "error",
                    "reportUntypedFunctionDecorator": "none",
                    "reportUntypedClassDecorator": "none",
                    "reportUntypedBaseClass": "none",
                    "reportUntypedNamedTuple": "none",
                    "reportPrivateUsage": "none",
                    "reportTypeCommentUsage": "none",
                    "reportPrivateImportUsage": "error",
                    "reportConstantRedefinition": "none",
                    "reportDeprecated": "none",
                    "reportIncompatibleMethodOverride": "none",
                    "reportIncompatibleVariableOverride": "none",
                    "reportInconsistentConstructor": "none",
                    "reportOverlappingOverload": "none",
                    "reportMissingSuperCall": "none",
                    "reportUninitializedInstanceVariable": "none",
                    "reportInvalidStringEscapeSequence": "warning",
                    "reportUnknownParameterType": "none",
                    "reportUnknownArgumentType": "none",
                    "reportUnknownLambdaType": "none",
                    "reportUnknownVariableType": "none",
                    "reportUnknownMemberType": "none",
                    "reportMissingParameterType": "none",
                    "reportMissingTypeArgument": "none",
                    "reportInvalidTypeVarUse": "warning",
                    "reportCallInDefaultInitializer": "none",
                    "reportUnnecessaryIsInstance": "none",
                    "reportUnnecessaryCast": "none",
                    "reportUnnecessaryComparison": "none",
                    "reportUnnecessaryContains": "none",
                    "reportAssertAlwaysTrue": "warning",
                    "reportSelfClsParameterName": "warning",
                    "reportImplicitStringConcatenation": "none",
                    "reportInvalidStubStatement": "none",
                    "reportIncompleteStub": "none",
                    "reportUndefinedVariable": "error",
                    "reportUnboundVariable": "error",
                    "reportUnsupportedDunderAll": "warning",
                    "reportUnusedCallResult": "none",
                    "reportUnusedCoroutine": "error",
                    "reportUnusedExpression": "warning",
                    "reportUnnecessaryTypeIgnoreComment": "none",
                    "reportMatchNotExhaustive": "none",
                    "reportShadowedImports": "none",
                    "reportImplicitOverride": "none"
                },
                "python.analysis.logLevel": "Information",
                "python.analysis.typeCheckingMode": "basic",
                "python.analysis.typeshedPaths": [],
                "python.analysis.useLibraryCodeForTypes": true,
                "pyright.disableLanguageServices": false,
                "pyright.disableOrganizeImports": false,
                "python.pythonPath": "python",
                "python.venvPath": ""
            },
            "configuration": {
                "python.analysis.autoImportCompletions": true,
                "python.analysis.autoSearchPaths": true,
                "python.analysis.extraPaths": [
                    "/prod/tools/base/lib/python"
                ],
                "python.analysis.stubPath": "typings",
                "python.analysis.diagnosticMode": "openFilesOnly",
                "python.analysis.logLevel": "Information",
                "python.analysis.typeCheckingMode": "basic",
                "python.analysis.typeshedPaths": [],
                "python.analysis.useLibraryCodeForTypes": true,
                "pyright.disableLanguageServices": false,
                "pyright.disableOrganizeImports": false,
                "python.pythonPath": "python",
                "python.venvPath": ""
            },
            "rank": 200
        },

from jupyterlab-lsp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.