mirror of
https://github.com/powerline/powerline.git
synced 2025-07-28 00:04:39 +02:00
Make sure flake8 does not show any errors in powerline/lint/**/*.py files
This commit is contained in:
parent
b5f051f71c
commit
9446ac91f8
@ -1,2 +1,3 @@
|
||||
setlocal noexpandtab
|
||||
let g:syntastic_python_flake8_args = '--ignore=W191,E501,E121,E122,E123,E128,E225,W291'
|
||||
let g:syntastic_python_flake8_args = '--ignore=W191,E501,E121,E122,E123,E128,E225,W291,E126'
|
||||
let b:syntastic_checkers = ['flake8']
|
||||
|
@ -6,7 +6,6 @@ from powerline.lib.config import load_json_config
|
||||
from powerline.lint.markedjson.error import echoerr, MarkedError
|
||||
from powerline.segments.vim import vim_modes
|
||||
from powerline.lint.inspect import getconfigargspec
|
||||
from powerline.lint.markedjson.markedvalue import gen_marked_value
|
||||
from powerline.lib.threaded import ThreadedSegment
|
||||
import itertools
|
||||
import sys
|
||||
|
@ -4,6 +4,7 @@ from inspect import ArgSpec, getargspec
|
||||
from powerline.lib.threaded import ThreadedSegment, KwThreadedSegment
|
||||
from itertools import count
|
||||
|
||||
|
||||
def getconfigargspec(obj):
|
||||
if isinstance(obj, ThreadedSegment):
|
||||
args = ['interval']
|
||||
|
@ -53,13 +53,13 @@ class Mark:
|
||||
break
|
||||
snippet = [self.buffer[start:self.pointer], self.buffer[self.pointer], self.buffer[self.pointer + 1:end]]
|
||||
snippet = [strtrans(s) for s in snippet]
|
||||
return ' ' * indent + head + ''.join(snippet) + tail + '\n' \
|
||||
+ ' ' * (indent + len(head) + len(snippet[0])) + '^'
|
||||
return (' ' * indent + head + ''.join(snippet) + tail + '\n'
|
||||
+ ' ' * (indent + len(head) + len(snippet[0])) + '^')
|
||||
|
||||
def __str__(self):
|
||||
snippet = self.get_snippet()
|
||||
where = " in \"%s\", line %d, column %d" \
|
||||
% (self.name, self.line + 1, self.column + 1)
|
||||
where = (" in \"%s\", line %d, column %d"
|
||||
% (self.name, self.line + 1, self.column + 1))
|
||||
if snippet is not None:
|
||||
where += ":\n" + snippet
|
||||
if type(where) is str:
|
||||
|
@ -71,8 +71,8 @@ class BaseResolver:
|
||||
return
|
||||
if index_check is True and current_index is not None:
|
||||
return
|
||||
if (index_check is False or index_check is None) \
|
||||
and current_index is None:
|
||||
if ((index_check is False or index_check is None)
|
||||
and current_index is None):
|
||||
return
|
||||
if isinstance(index_check, str):
|
||||
if not (isinstance(current_index, ScalarNode)
|
||||
|
Loading…
x
Reference in New Issue
Block a user