-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change indentation size for Pylint #130
Comments
Pylint is a separate python package. You will need to configure pylint using the relevant configuration files. |
From @1st on June 13, 2017 7:41 But it adds complexity. In each my project I need to add a file with config fot pylint and other libs? It's unreal if I have 10 projects. In Sublime I change indentation size and it automatically pass this parameter to the pylint. I need nothing to configure. I know that it's extra work that you need to do to initialize the pylint with the correct parameters- but I think that it worth it. PS. I don't know which parameter I need to pass to pylint as a custom argument to change the indentation size. Can you help with it? |
From @egabrum on June 14, 2017 0:0 @1st I include a pylintrc file in the root of my workspace with these lines:
|
From @1st on July 4, 2017 15:34 I finally decided to execute command It's what I found there:
@DonJayamanne can you please adopt this option to the current size of indentation that set by the configuration option Currently I solved my problem with 2 spaces in my project with this configuration option:
|
Dear developers. As you can see - I've proposed a solution for the problem. But it's manual solution.
As for me it looks very easy to implement. The problem that I didn't make any change in |
Propagating individual settings as arguments has side effects. For example, team may have standard set to 4 and yet we will not flag incorrect formatting since we'll be passing 2 instead and git commit hooks will then reject the code. TS Lint does not follow editor settings. It follows its tsfmt.json configuration file so formatting would be consisted with the team settings checked in into the source control. Similarly, in big Visual Studio linting rules are typically separate from the editor settings. |
In the upcoming release default (simplified) pylint rules exclude formatting and styling so it won't be complaining about tab sizes, see #554. However, we do not want to tie linter rules to edit settings since it would be inconsistent with behavior of other languages and editors. |
From @1st on June 12, 2017 14:0
Hello.
I set a setting
"editor.tabSize": 2,
but pythonVSCode doesn't recognize this settings. I see the error message from thepylint
about wrong indentation, something like this:Tried to find the proper option to pass to the
"python.linting.pylintArgs": []
but found nothing. Can you please let me know how to pushpylint
to check syntax based on the two-space indentation instead of four? Also it will be good to use theeditor.tabSize
setting in thepythonVSCode
to pass through to thepylint
.Thanks.
Copied from original issue: DonJayamanne/pythonVSCode#1015
The text was updated successfully, but these errors were encountered: