0

I'm new at python and i downloaded program today. I tried to say hello world but i got this problem after run and debug:

Missing module docstring Pylint(C0114:missing-module-docstring)

so in this question @ikhvjs is said that he used this code. But i don't know where and how do i need to write this code in a code line in my user settings. I tried to find videos on the net but i couldn't.

"python.linting.pylintArgs": [
      "--disable=missing-module-docstring",
      "--disable=missing-class-docstring",
      "--disable=missing-function-docstring"
    ]

my user settings in vscode:

{
    "editor.tokenColorCustomizations": {
        "textMateRules": [
            {
                "name": "One Dark italic",
                "scope": [
                    "comment",
                    "entity.other.attribute-name",
                    "keyword",
                    "markup.underline.link",
                    "storage.modifier",
                    "storage.type",
                    "string.url",
                    "variable.language.super",
                    "variable.language.this"
                ],
                "settings": {
                    "fontStyle": "italic"
                }
            },
            {
                "name": "One Dark italic reset",
                "scope": [
                    "keyword.operator",
                    "keyword.other.type",
                    "storage.modifier.import",
                    "storage.modifier.package",
                    "storage.type.built-in",
                    "storage.type.function.arrow",
                    "storage.type.generic",
                    "storage.type.java",
                    "storage.type.primitive"
                ],
                "settings": {
                    "fontStyle": ""
                }
            }
        ]
    },
    "liveServer.settings.donotShowInfoMsg": true,
    "workbench.colorTheme": "Dark SynthWave '84",
    "[python]": {
        "editor.formatOnType": true
    }
}

I tried to wrote after "[python]" like this:

"[python]": {
        "editor.formatOnType": true ,
        "python.linting.pylintArgs": [
        "--disable=missing-module-docstring",
        "--disable=missing-class-docstring",
        "--disable=missing-function-docstring"
        ]
    }
}

but it didn't work. Now vs code PROBLEMS saying "Unknown editor configuration setting" how can i disable this missing module docstring? Do i need to uninstall pylint?

  • 1
    is it valid to use `--disable` like that? (`--disable=foo --disable=bar --disable=baz`) Is it not `--disable=foo,bar,baz`? [From the docs](https://pylint.readthedocs.io/en/latest/user_guide/usage/run.html#command-line-options): "_You can disable a specific checker or some of its messages or message categories by specifying --disable=. \[...\] with being a comma-separated list of checker names and message symbols._" – starball Mar 16 '23 at 03:36

2 Answers2

1

This setting cannot be applied because it is not registered as language override setting.

This setting cannot be set within a language. You can add it at the end of your settings, like this:

    "liveServer.settings.donotShowInfoMsg": true,
    "workbench.colorTheme": "Dark SynthWave '84",
    "[python]": {
        "editor.formatOnType": true
    },
    "python.linting.pylintEnabled": true,
    "python.linting.enabled": true,
    "python.linting.pylintArgs": [
        "--disable=missing-module-docstring",
        "--disable=missing-class-docstring",
        "--disable=missing-function-docstring"
    ]
JialeDu
  • 6,021
  • 2
  • 5
  • 24
0

You can open the settings.json under .vscode folder.

enter image description here

Add these codes to the settings.json:

"python.linting.pylintEnabled": true,
"python.linting.pylintArgs": [
      "--disable=missing-module-docstring",
      "--disable=missing-class-docstring",
      "--disable=missing-function-docstring"
    ]

Another way is trying to use Pylance as the language Server:

"python.languageServer": "Pylance",
MingJie-MSFT
  • 5,569
  • 1
  • 2
  • 13