mirror of
https://github.com/dense-analysis/ale.git
synced 2026-05-19 23:09:58 +08:00
Merge pull request #2502 from ericvw/flake8-config
Change Python project root dir detection for flake8 configuration
This commit is contained in:
@@ -25,7 +25,7 @@ function! ale#python#FindProjectRootIni(buffer) abort
|
|||||||
\|| filereadable(l:path . '/tox.ini')
|
\|| filereadable(l:path . '/tox.ini')
|
||||||
\|| filereadable(l:path . '/mypy.ini')
|
\|| filereadable(l:path . '/mypy.ini')
|
||||||
\|| filereadable(l:path . '/pycodestyle.cfg')
|
\|| filereadable(l:path . '/pycodestyle.cfg')
|
||||||
\|| filereadable(l:path . '/flake8.cfg')
|
\|| filereadable(l:path . '/.flake8')
|
||||||
\|| filereadable(l:path . '/.flake8rc')
|
\|| filereadable(l:path . '/.flake8rc')
|
||||||
\|| filereadable(l:path . '/pylama.ini')
|
\|| filereadable(l:path . '/pylama.ini')
|
||||||
\|| filereadable(l:path . '/pylintrc')
|
\|| filereadable(l:path . '/pylintrc')
|
||||||
|
|||||||
+1
-1
@@ -29,7 +29,7 @@ ALE will look for configuration files with the following filenames. >
|
|||||||
tox.ini
|
tox.ini
|
||||||
mypy.ini
|
mypy.ini
|
||||||
pycodestyle.cfg
|
pycodestyle.cfg
|
||||||
flake8.cfg
|
.flake8
|
||||||
.flake8rc
|
.flake8rc
|
||||||
pylama.ini
|
pylama.ini
|
||||||
pylintrc
|
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(''))
|
||||||
Reference in New Issue
Block a user