Jonathan H
Jonathan H

Reputation: 7953

Sublime Text 3 - Disable Python Checker warning "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?

Upvotes: 15

Views: 24363

Answers (4)

drct
drct

Reputation: 361

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"]
        }
    }
}

Upvotes: 1

Solomon
Solomon

Reputation: 103

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

Upvotes: 6

Martijn Pieters
Martijn Pieters

Reputation: 1122142

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.

Upvotes: 22

hieutran89
hieutran89

Reputation: 21

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!!! ^^

Upvotes: 2

Related Questions