Fully disable the linting

Here is a link that explain how to do it : Disable Linting on VsCode.

To do so, type Command + Shift + P (or Ctrl + Shift + P on PC) in VsCode. This will open a command prompt at the top of the window. Then type the command Python: Enable Linting, and select off.

Another option is to choose no linter. To do so, open the command prompt with Command + Shift + P (or Ctrl + Shift + P on PC), type Python: Select Linter, and choose the option Disable Linting.


Disable warnings, but keep errors :

If you want to keep the errors, but disable only the warnings, you can also configure pylint directly from VsCode. Go to the menu File -> Preferences -> Settings (Or open directly with Command + , or Ctrl + ,). Then in the search box at the top of the window, search for pylint Args. Click on the button Add item and add the line --disable=W.

Answer from Lescurel on Stack Overflow
🌐
Reddit
reddit.com › r/vscode › disable python linting in vs code
r/vscode on Reddit: Disable Python Linting in VS Code
July 27, 2020 -

So I'm trying not to rely on IDE's error checking and am wanting to disable linting entirely.

I include:

"python.linting.pylintEnabled": false,
"python.linting.pylintUseMinimalCheckers": false,
"python.linting.lintOnSave": false,
"python.linting.enabled": false,

all in the settings.json file but even with these changed I am still getting error underlining in the editor.

Does anyone know how to get rid of all the error checking in the editor despite the language? I've heard that it's a good idea not to become reliant on IDE's for error checking and such so I would like to get rid of error checking entirely.

I'd also like to have it as an option that's easily accessible like the command >Python: Enable Linting: on/off but when I do that command nothing happens

🌐
GitHub
github.com › microsoft › pylance-release › issues › 929
Is there a setting to turn off specific errors displayed by Pylance? · Issue #929 · microsoft/pylance-release
February 9, 2021 - Is there a setting to turn off specific errors displayed by Pylance? When we use the Pylance language service, sometimes it will display some errors or warnings in the code. Is it possible to turn ...
Author   Jill-Cheng
🌐
Visual Studio Marketplace
marketplace.visualstudio.com › items
Pylance - Visual Studio Marketplace
2 weeks ago - Extension for Visual Studio Code - A performant, feature-rich language server for Python in VS Code
Find elsewhere
🌐
Reddit
reddit.com › r/learnpython › disable python type checking
r/learnpython on Reddit: Disable Python Type Checking
July 8, 2025 -

I coach a robotics team of middle school kids and it is important that all of the laptops are configured the same. When we clone our repo, VS Code will prompt them to enable type checking. I'd rather keep type checking off for now, so I really much prefer the warning to not come up at all. The kids are kind of quick to hit the default "Yes", which enables type checking. I have in my pyproject.toml

```

[tool.pyright]
typeCheckingMode = "off"

```

And that is included in the repo. And even so, I still get the warning/suggestion

"Pylance has detected type annotations in your code and recommends enabling type checking. Would you like to change this setting?"

Sure, I can click "No" at that point, and it seems to keep pylance happy and it doesn't ask again, but I'd rather it not ask at all in the first place. Ideally I'd like to figure out a way to suppress the warning at the project level, so I can push the setting to everyone as part of the repo.

🌐
Pydantic
docs.pydantic.dev › latest › integrations › visual_studio_code
Visual Studio Code - Pydantic Validation
You can disable the errors for a specific line using a comment of: ... from pydantic import BaseModel class Knight(BaseModel): title: str age: int color: str = 'blue' lancelot = Knight(title='Sir Lancelot', age='23') # pyright: ignore · that way Pylance and mypy will ignore errors in that line.
🌐
Readthedocs
micropython-stubs.readthedocs.io › en › main › 22_vscode.html
Configuring VSCode, Pylance or Pyright — Micropython-Stubs 1.23.0 documentation
With MicroPython these are part of the firmware image, and not directly available as source files. Therefore it makes sense to ignore these warnings. To suppress these warnings add the following to your VSCode configuration. ... Pylance (and Pyright) do not by default allow you to override the stdlib stubs.
Top answer
1 of 3
13

Pylance supports PEP 484

A number of existing or potential use cases for function annotations exist, which are incompatible with type hinting. These may confuse a static type checker. However, since type hinting annotations have no runtime behavior (other than evaluation of the annotation expression and storing annotations in the _annotations_ attribute of the function object), this does not make the program incorrect -- it just may cause a type checker to emit spurious warnings or errors.

To mark portions of the program that should not be covered by type hinting, you can use one or more of the following:

a # type: ignore comment;
a @no_type_check decorator on a class or function;
a custom class or function decorator marked with @no_type_check_decorator.

Alternatively you can create a pyrightconfig.json for Pyright (as that's what Pylance is using underneath) or a pyproject.toml in project's root directory, and specify which types of errors to ignore. You can see the error type in the hover widget where error messages appear.

pyrightconfig.json example:

{
        "reportGeneralTypeIssues": false,
}

pyproject.toml example:

[tool.pyright]
reportGeneralTypeIssues = false

See Type Check Diagnostics Settings for more.

2 of 3
11

The top-voted answer is great but it may not solve the problem (it just ignores the type checker, right?). My answer does not solve the problem either, but I think it's helpful.

I suggest you modify your .vscode/settings.json (Workspace settings or User settings) as described here and here and shown below. (Notice the use of "none" instead of false)

(Maybe this is preferable if you already have Workspace settings and you don't want to add another settings file as shown in the top-voted answer (like pyrightconfig.json or pyproject.toml))

{
  "python.analysis.typeCheckingMode": "basic",
  "python.analysis.diagnosticSeverityOverrides": {
    "reportGeneralTypeIssues": "none"
  }
}

I think the OP is correct with this comment, this error is not a reportGeneralTypeIssues type issue.

I've tried both solutions but the error still exists. Maybe it's not a reportGeneralTypeIssues?

If you reset your Pylance settings (flag all diagnostic codes as errors (remove settings.json, or use the "error" diagnostic setting)), and you type the OP's code below

def example() -> [str]:
    return ["hi"]

VSCode/Pylance/Pyright shows an error squiggly, and when you hover it lists two error reasons.

  • The first error says "List expression not allowed in type annotation Use List[T]..." and is tagged only as "Pylance" (no diagnostic code)
  • The second error says "Expected type expression but received "list[Type[str]]" and is tagged as Pylance(reportGeneralTypeIssues), (note there is a diagnostic code)

If you modify your settings.json as described above:

...

  "python.analysis.diagnosticSeverityOverrides": {
    "reportGeneralTypeIssues": "none"
  }
...

... then the second Pylance(reportGeneralTypeIssues) type error goes away, but the original Pylance error (without the diagnostic code) is still there:

The top-voted answerer suggests trying other diagnostic codes, but it seems like this error is more a "core error" than any diagnostic code describes?

I think it's tempting to blame the editor (VSCode), but I don't think it's VSCode's fault, VSCode is just using Pylance, and Pylance is just trying to implement the Python standards/PEPs, right?

I still think [str] is invalid/nonstandard type hinting syntax, as this commenter said .

I agree with OP, [str] is "shorter and does the trick", but it's not standard is it? Not defined in any PEP? Not in PEP 484, not in PEP 585. Doesn't this mean PyCharm is supporting something nonstandard?

🌐
Reddit
reddit.com › r/vscode › how to calm done pylance
r/vscode on Reddit: How to calm done Pylance
December 17, 2023 -

I am switching from Pycharm to VSC to try.

I forked a repo to try, and already Pylances is throwing me a lot of errors that would not be displayed in Pycharm. How can I calm down Pylance to have a similar error as in Pycharm?

I forked a repo to try, and already Pylances is throwing me a lot or errors that would not be displayed in Pycharm. How can I calm down Pylance to have a similar error as in Pycharm?

For example, in this snippet from VSC, the errors are bothering the eyes. The same code in Pycharm does not display anything particular.

For me, it's a little too much.

🌐
GitHub
github.com › microsoft › pylance-release › issues › 196
Allow line level suppression of specific errors · Issue #196 · microsoft/pylance-release
August 3, 2020 - from airflow.models import BaseOperator # pylint: disable=import-error · I can't find a way to do the same using PyLance.
Author   MrJoosh
🌐
Visual Studio Code
code.visualstudio.com › docs › python › settings-reference
Python settings reference
November 3, 2021 - The language server settings apply when python.languageServer is Pylance or Default. If you have difficulties with the language server, see Troubleshooting in the language server repository. ... This section details all the available rules that can be customized using the python.analysis.diagnosticSeverityOverrides setting as shown in the following example. { "python.analysis.diagnosticSeverityOverrides": { "reportUnboundVariable": "information", "reportImplicitStringConcatenation": "warning" } }
🌐
GitHub
github.com › microsoft › pylance-release › discussions › 7236
how can I disable pylance analysis in vscode? · microsoft/pylance-release · Discussion #7236
yeah seems that was the issue, I'll update this if it turns out to not be the case. I think it's quite unintuitive / should be addressed. I was setting the exclusions to **/.venv which I would expect to match all the .venv folders in the packages but ti seems pylance was still indexing / reading those packages
Author   microsoft
🌐
Visual Studio Code
code.visualstudio.com › docs › python › linting
Linting Python in Visual Studio Code
November 3, 2021 - You can disable them by disabling the extension per workspace. Linting will automatically run when a Python file is opened or saved. Errors and warnings are shown in the Problems panel (⇧⌘M (Windows, Linux Ctrl+Shift+M)) for open files, ...
🌐
Stack Overflow
stackoverflow.com › questions › 70347887 › how-to-disable-all-stylistic-warnings-in-pylance-in-vs-code
python - How to disable all stylistic warnings in Pylance in VS Code? - Stack Overflow
December 14, 2021 - Can't fully disable python linting Pylance VSCODE · 6 · VSCode settings for Pylance · 0 · In VSCode, prevent PyLance warning: Invalid character in identifier · 19 · Suppress Pylance type annotation warning in VS Code · 46 · Disable specific Pylance linting messages in VS Code settings.json like with "python.linting.pylintArgs" 3 ·
Top answer
1 of 10
63

As others have said, you can provide a disable argument to disable a specific message. I wanted to elaborate on that.

  1. Here is the syntax for disabling multiple messages and for providing multiple arguments, which was not immediately obvious to me from googling it:

    "python.linting.pylintArgs": [
        "--max-line-length=80",
        "--disable=W0142,W0403,W0613,W0232,R0903,R0913,C0103,R0914,C0304,F0401,W0402,E1101,W0614,C0111,C0301"
    ]
    
  2. You stated that you started seeing way more errors once you disabled that one message. That actually might make sense according to the documentation:

    Python in Visual Studio code is configured by default to use a set of linting rules that are friendly to the largest number of Python developers:

    • Enable all Error (E) and Fatal (F) messages.
    • Disable all Convention (C) and Refactor (R) messages.
    • Disable all Warning (W) messages except the following:
      • unreachable (W0101): Unreachable code
      • duplicate-key (W0109): Duplicate key %r in dictionary
      • unnecessary-semicolon (W0301): Unnecessary semicolon
      • global-variable-not-assigned (W0602): Using global for %r but no assignment is done
      • unused-variable (W0612): Unused variable %r
      • binary-op-exception (W0711): Exception to catch is the result of a binary "%s" operation
      • bad-format-string (W1302): Invalid format string
      • anomalous-backslash-in-string (W1401): Anomalous backslash in string
      • bad-open-mode (W1501): "%s" is not a valid mode for open

    These rules are applied through the following default arguments passed to Pylint:

    --disable=all
    --enable=F,E,unreachable,duplicate-key,unnecessary-semicolon,global-variable-not-assigned,unused-variable,binary-op-exception,bad-format-string,anomalous-backslash-in-string,bad-open-mode
    

    These arguments are passed whenever the python.linting.pylintUseMinimalCheckers is set to true (the default). If you specify a value in pylintArgs or use a Pylint configuration file (see the next section), then pylintUseMinimalCheckers is implicitly set to false.

    In other words, PyLint is supposedly pretty lax by default in VS Code, only showing you messages for errors and a few hand-picked warnings. But when you manually set pylintArgs to something, pylintUseMinimalCheckers is ignored, opening the floodgates to all messages. That might be why disabling one message resulted in way more messages being shown. Then again, I'm not sure why you were seeing unused-import messages in the first place since it should have been suppressed by default according to the documentation.

  3. Actually, this currently doesn't work: python.linting.pylintUseMinimalCheckers": true (for me, at this particular moment in time, but hopefully it works fine for you, future reader). To get the same effect, I had to manually set pylintArgs to the value it was supposed to be setting automatically:

    "python.linting.pylintArgs": [
        "--disable=all",
        "--enable=F,E,unreachable,duplicate-key,unnecessary-semicolon,global-variable-not-assigned,unused-variable,binary-op-exception,bad-format-string,anomalous-backslash-in-string,bad-open-mode"
    ]
    
  4. BONUS: Here's an explanation of the list of disabled messages I use, as shown above in point 1. It's mostly taken from here:

    # Disabled messages
    #    Pointless
    #       W0142 = *args and **kwargs support
    #       W0403 = Relative imports
    #       W0613 = Unused argument
    #       W0232 = Class has no __init__ method
    #       R0903 = Too few public methods
    #       R0913 = Too many arguments
    #       C0103 = Invalid name
    #       R0914 = Too many local variables
    #       C0304 = Final newline missing
    #
    #    PyLint's module importation is unreliable
    #       F0401 = Unable to import module
    #       W0402 = Uses of a deprecated module
    #       E1101 = Module x has no y member
    #
    #    Already an error when wildcard imports are used
    #       W0614 = Unused import from wildcard
    #
    #    Stricter messages that can be disabled until everything else has been fixed
    #       C0111 = Missing docstring
    #       C0301 = Line too long
    
2 of 10
10
"python.linting.pylintArgs": [
    "--disable=C0111"
],

You can also disable by message type, e.g., --disable=W.

A good reference is www.pylintcode.info, with a list of message ids and message types.