backing up sublime settings

This commit is contained in:
2014-04-04 11:21:58 -04:00
commit 2cbece8593
274 changed files with 23793 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
import sublime
import sys
from lint import Linter
from lint.util import which
class Python(Linter):
language = 'python'
cmd = 'pyflakes'
regex = r'^.+:(?P<line>\d+):\s*(?P<error>.+)'
def run(self, cmd, code):
python3 = False
if (self.filename or '').startswith(sublime.packages_path()):
if sys.version_info >= (3, 0):
python3 = True
first_line = code.split('\n', 1)[0]
if first_line.startswith('#!') and 'python3' in first_line:
python3 = True
if python3 and which('python3'):
# python 3
pyflakes = which('pyflakes')
cmd = ('python3', pyflakes)
return self.communicate(cmd, code)
else:
return self.communicate(cmd, code)