The project uses the standard pycodestyle (formerly pep8
) configuration files; just add an ignore
line:
[pycodestyle]
ignore = W191
where W191
is the error code for indentation contains tabs
.
Вопрос
I didn't find an answer to this question on the web, so I'll say it up front; this is NOT a question about SublimeLinter, and I do NOT want to format my python code according to the PEP8 standards.
How to disable the warning "Indentation contains tabs" in the Python Checker package?
Решение
The project uses the standard pycodestyle (formerly pep8
) configuration files; just add an ignore
line:
[pycodestyle]
ignore = W191
where W191
is the error code for indentation contains tabs
.
Другие советы
You can use set sublime as: view -> Indentation -> Convert indentation to spaces
This will enable your tabs to be converted to 4(according your setting) spaces. It works on my machine.
And modify the existing tabs in the file to spaces: View -> Indentation -> Convert Indentation to Spaces
in sublime 2 select Prefences > Package setting > Python Fake8 Lint. Chose Setting-default. At this opened file, find line 81.
// skip errors and warnings (e.g. ["E303", "E4", "W"])
"ignore": [],`
then add "W191" in square brackets [] and save.
Good luck!!! ^^
For SublimeText 3 & pycodestyle:
Select Preferences > Package Settings > SublimeLinter > Settings and add / change to this:
// SublimeLinter Settings - User
{
"linters": {
// The name of the linter you installed
"pycodestyle": {
"ignore": ["W191"]
}
}
}