ctrl+shift+p filters: :st2 :st3 :win :osx :linux

更新时间:2021-04-15 13:39:31

Browse

Sublime​Linter-flake​8

by SublimeLinter ST3

SublimeLinter plugin for python, using flake8.

Details

Installs

  • Total 103K
  • Win 42K
  • Mac 34K
  • Linux 26K
Apr 15 Apr 14 Apr 13 Apr 12 Apr 11 Apr 10 Apr 9 Apr 8 Apr 7 Apr 6 Apr 5 Apr 4 Apr 3 Apr 2 Apr 1 Mar 31 Mar 30 Mar 29 Mar 28 Mar 27 Mar 26 Mar 25 Mar 24 Mar 23 Mar 22 Mar 21 Mar 20 Mar 19 Mar 18 Mar 17 Mar 16 Mar 15 Mar 14 Mar 13 Mar 12 Mar 11 Mar 10 Mar 9 Mar 8 Mar 7 Mar 6 Mar 5 Mar 4 Mar 3 Mar 2 Mar 1
Windows 11 15 21 14 16 12 15 22 24 27 18 13 13 16 22 20 18 22 18 17 24 16 28 22 12 16 9 17 22 21 18 27 13 5 34 23 22 22 15 9 11 26 24 31 24 21
Mac 3 22 20 84 7 26 11 10 19 17 30 6 11 9 8 15 10 27 12 19 27 18 11 17 19 12 8 14 13 18 11 16 14 16 27 19 18 16 17 8 13 15 13 17 16 12
Linux 0 16 9 19 15 8 7 6 20 10 14 11 7 12 17 12 9 9 11 10 15 11 22 11 12 9 4 7 15 5 23 7 10 2 15 6 8 18 16 10 7 15 18 10 16 12

Readme

Source
raw.​githubusercontent.​com

SublimeLinter-flake8

Build Status

This linter plugin for SublimeLinter provides an interface to flake8.

Installation

SublimeLinter must be installed in order to use this plugin.

Install via Package Control or git clone as usual.

Ensure that a flake8 is actually installed somewhere on your system. Typically, pip install flake8 on the command line will do that.

If you want to use a globally installed flake, make sure that it is available on the PATH. Before going any further, please read and follow the steps in “Finding a linter executable” through “Validating your PATH” in the documentation.

Otherwise configure “executable” or the “python” setting.

If you use pipenv, and you're working on a project with a Pipfile, everything should be automatic.

Settings

Additional settings:

  • ignore_fixables (default: True): filter warnings that Sublime can fix automatically (e.g. trailing white-space) on save.

SublimeLinter-flake8 works with common flake8 configuration files and inline overrides. Note that by default the working dir is set to an open folder attached to the current window of Sublime. Edit this setting if your config files are located in a subfolder, for example.

Use “args” if you want to pass additional command line arguments to flake8.

Compatibility with --per-file-ignores and other flake8 plugins

SublimeLinter-flake8 is compatible with most flake8 plugins out of the box. However, plugins that rely on selecting or ignoring certain files based on filename may appear to be “broken” due to the way SublimeLinter runs during linting. This includes flake8's own --per-file-ignores option introduced in 3.7.0, as well as plugins such as flake8-aaa and flake8-pyi.

To make the source filename available to the flake8 executable again, pass the --stdin-display-name option using SublimeLinter's “args” setting:

"args": ["--stdin-display-name", "${file:stdin}"]

Including the :stdin fallback ensures that files that have yet to be saved are still linted.