The diagnosticSeverityOverrides setting of pyright has no effect

Overwriting the level of default diagnostic information can be common, but unfortunately it has no effect in neovim.

The setting item of diagnosticSeverityOverrides has no effect at all.

What is the reason? How to solve it? This is really important

{
    root_dir = function()
        return vim.fn.getcwd()
    end,
    settings = {
        python = {
            analysis = {
                typeCheckingMode = "basic",
                diagnosticSeverityOverrides = {
                    strictListInference = "warning",
                    strictDictionaryInference = "warning",
                    strictSetInference = "warning",
                    reportDuplicateImport = "warning"
                }
            }
        }
    }
}

Don’t any of you have this problem? Why didn’t anyone respond. I think it’s important

I don’t use this, but the documentation implies that only reportXXX rules are supported?

python.analysis.diagnosticSeverityOverrides [map]: Allows a user to override the severity levels for individual diagnostic rules. “reportXXX” rules in the type check diagnostics settings in configuration are supported. Use the rule name as a key and one of “error,” “warning,” “information,” “true,” “false,” or “none” as value.

Maybe double check with pyright folks exactly what you’re seeing and what’s the expected behavior? x)

You can try using a pyrightconfig.json instead, I think that the key is diagnosticRuleSet not diagnosticSeverityOverrides looking through the pyright source code: