From b9f31621e4abaf57c32859b5dd54ec4406c035a8 Mon Sep 17 00:00:00 2001 From: w0rp Date: Thu, 10 Aug 2017 09:58:32 +0100 Subject: Move --format=default in the flake8 command to the return value, and remove extra spaces in the tests --- ale_linters/python/flake8.vim | 2 +- test/command_callback/test_flake8_command_callback.vader | 8 ++++---- 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): -- cgit v1.2.3