Answer a question

I am using Visual Studio Code and pylama linter.

Currently I am added # noqa to every long line to avoid the following linter message:

line too long (100 > 79 characters) [pycodestyle]pylama(E501)

I've added "--disable=E501" to VSCODE's workspace settings.json file as shown below:

{
    "editor.tabSize": 2,
    "editor.detectIndentation": false,
    "python.linting.enabled": true,
    "python.linting.pylintEnabled": false,
    "python.linting.flake8Enabled": false,
    "python.linting.pycodestyleEnabled": false,
    "python.linting.pylamaEnabled": true,
   
    "[python]": {
      "editor.tabSize": 4
    },
    "python.linting.pylama": [
      "--disable=E501"
    ]    
}

but still I get E501.

How can I disable E501 in my VSCODE workspace for good?

Answers

For other linters, the .settings file seems to be looking for

python.linting.<linter>Args

so I recommend trying:

"python.linting.pylamaArgs": [
  "--ignore=E501"
]    

or potentially

python.linting.pylamaArgs": ["--disable=E501"]

See also: https://code.visualstudio.com/docs/python/settings-reference#_pylama

that seems to suggest the same:

pylamaArgs  []  Additional arguments for pylama, where each top-level element that's separated by a space is a separate item in the list.
Logo

开发云社区提供前沿行业资讯和优质的学习知识,同时提供优质稳定、价格优惠的云主机、数据库、网络、云储存等云服务产品

更多推荐