mirror of https://github.com/dense-analysis/ale
Merge pull request #2502 from ericvw/flake8-config
Change Python project root dir detection for flake8 configuration
This commit is contained in:
commit
89db85121c
|
@ -25,7 +25,7 @@ function! ale#python#FindProjectRootIni(buffer) abort
|
|||
\|| filereadable(l:path . '/tox.ini')
|
||||
\|| filereadable(l:path . '/mypy.ini')
|
||||
\|| filereadable(l:path . '/pycodestyle.cfg')
|
||||
\|| filereadable(l:path . '/flake8.cfg')
|
||||
\|| filereadable(l:path . '/.flake8')
|
||||
\|| filereadable(l:path . '/.flake8rc')
|
||||
\|| filereadable(l:path . '/pylama.ini')
|
||||
\|| filereadable(l:path . '/pylintrc')
|
||||
|
|
|
@ -29,7 +29,7 @@ ALE will look for configuration files with the following filenames. >
|
|||
tox.ini
|
||||
mypy.ini
|
||||
pycodestyle.cfg
|
||||
flake8.cfg
|
||||
.flake8
|
||||
.flake8rc
|
||||
pylama.ini
|
||||
pylintrc
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
Before:
|
||||
call ale#test#SetDirectory('/testplugin/test')
|
||||
|
||||
After:
|
||||
call ale#test#RestoreDirectory()
|
||||
|
||||
Execute(Detect root of Python project with .flake8 correctly):
|
||||
call ale#test#SetFilename('python-test-files/python-package-project/package-name/module.py')
|
||||
AssertEqual
|
||||
\ ale#path#Simplify(g:dir . '/python-test-files/python-package-project'),
|
||||
\ ale#python#FindProjectRoot(bufnr(''))
|
Loading…
Reference in New Issue