summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-08-10 09:58:32 +0100
committerw0rp <devw0rp@gmail.com>2017-08-10 09:58:32 +0100
commitb9f31621e4abaf57c32859b5dd54ec4406c035a8 (patch)
tree42dab629a68769ca7f250223a92a798c4e8e2a96
parentabcf2909e63840af81149761c6daf08e5caac01c (diff)
downloadale-b9f31621e4abaf57c32859b5dd54ec4406c035a8.zip
Move --format=default in the flake8 command to the return value, and remove extra spaces in the tests
-rw-r--r--ale_linters/python/flake8.vim2
-rw-r--r--test/command_callback/test_flake8_command_callback.vader8
2 files changed, 5 insertions, 5 deletions
diff --git a/ale_linters/python/flake8.vim b/ale_linters/python/flake8.vim
index e16090d4..8aa4c4df 100644
--- a/ale_linters/python/flake8.vim
+++ b/ale_linters/python/flake8.vim
@@ -80,10 +80,10 @@ function! ale_linters#python#flake8#GetCommand(buffer, version_output) abort
\ : ''
let l:options = ale#Var(a:buffer, 'python_flake8_options')
- \ . ' --format=default'
return ale#Escape(ale_linters#python#flake8#GetExecutable(a:buffer))
\ . (!empty(l:options) ? ' ' . l:options : '')
+ \ . ' --format=default'
\ . l:display_name_args . ' -'
endfunction
diff --git a/test/command_callback/test_flake8_command_callback.vader b/test/command_callback/test_flake8_command_callback.vader
index e41c4752..c36fe4f5 100644
--- a/test/command_callback/test_flake8_command_callback.vader
+++ b/test/command_callback/test_flake8_command_callback.vader
@@ -19,12 +19,12 @@ Execute(The flake8 callbacks should return the correct default values):
\ '''flake8'' --version',
\ ale_linters#python#flake8#VersionCheck(bufnr(''))
AssertEqual
- \ '''flake8'' --format=default --stdin-display-name %s -',
+ \ '''flake8'' --format=default --stdin-display-name %s -',
\ ale_linters#python#flake8#GetCommand(bufnr(''), ['3.0.0'])
" Try with older versions.
call ale_linters#python#flake8#ClearVersionCache()
AssertEqual
- \ '''flake8'' --format=default -',
+ \ '''flake8'' --format=default -',
\ ale_linters#python#flake8#GetCommand(bufnr(''), ['2.9.9'])
Execute(The flake8 command callback should let you set options):
@@ -48,7 +48,7 @@ Execute(You should be able to set a custom executable and it should be escaped):
\ '''executable with spaces'' --version',
\ ale_linters#python#flake8#VersionCheck(bufnr(''))
AssertEqual
- \ '''executable with spaces'' --format=default --stdin-display-name %s -',
+ \ '''executable with spaces'' --format=default --stdin-display-name %s -',
\ ale_linters#python#flake8#GetCommand(bufnr(''), ['3.0.0'])
Execute(The flake8 callbacks should detect virtualenv directories):
@@ -62,7 +62,7 @@ Execute(The flake8 callbacks should detect virtualenv directories):
\ ale_linters#python#flake8#VersionCheck(bufnr(''))
AssertEqual
\ '''' . g:dir . '/python_paths/with_virtualenv/env/bin/flake8'''
- \ . ' --format=default --stdin-display-name %s -',
+ \ . ' --format=default --stdin-display-name %s -',
\ ale_linters#python#flake8#GetCommand(bufnr(''), ['3.0.0'])
Execute(The FindProjectRoot should detect the project root directory for namespace package via Manifest.in):