mirror of
https://github.com/dense-analysis/ale.git
synced 2026-05-24 17:28:42 +08:00
[ale-python-root] add .pyre_configuration.local to list of files (#3900)
Without this, we have one `pyre` process running across different pyre projects. With this change, files in different projects can be linted with pyre at the same time. Co-authored-by: Oliver Ruben Albertini <ora@fb.com>
This commit is contained in:
@@ -24,6 +24,7 @@ function! ale#python#FindProjectRootIni(buffer) abort
|
|||||||
\|| filereadable(l:path . '/setup.cfg')
|
\|| filereadable(l:path . '/setup.cfg')
|
||||||
\|| filereadable(l:path . '/pytest.ini')
|
\|| filereadable(l:path . '/pytest.ini')
|
||||||
\|| filereadable(l:path . '/tox.ini')
|
\|| filereadable(l:path . '/tox.ini')
|
||||||
|
\|| filereadable(l:path . '/.pyre_configuration.local')
|
||||||
\|| filereadable(l:path . '/mypy.ini')
|
\|| filereadable(l:path . '/mypy.ini')
|
||||||
\|| filereadable(l:path . '/pycodestyle.cfg')
|
\|| filereadable(l:path . '/pycodestyle.cfg')
|
||||||
\|| filereadable(l:path . '/.flake8')
|
\|| filereadable(l:path . '/.flake8')
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ ALE will look for configuration files with the following filenames. >
|
|||||||
setup.cfg
|
setup.cfg
|
||||||
pytest.ini
|
pytest.ini
|
||||||
tox.ini
|
tox.ini
|
||||||
|
.pyre_configuration.local
|
||||||
mypy.ini
|
mypy.ini
|
||||||
pycodestyle.cfg
|
pycodestyle.cfg
|
||||||
.flake8
|
.flake8
|
||||||
|
|||||||
@@ -57,3 +57,10 @@ Execute(Poetry is detected when python_pyre_auto_poetry is set):
|
|||||||
|
|
||||||
AssertLinter 'poetry',
|
AssertLinter 'poetry',
|
||||||
\ ale#Escape('poetry') . ' run pyre persistent'
|
\ ale#Escape('poetry') . ' run pyre persistent'
|
||||||
|
|
||||||
|
Execute(The FindProjectRoot should detect the project root directory for namespace package via .pyre_configuration.local):
|
||||||
|
silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/pyre_configuration_dir/foo/bar.py')
|
||||||
|
|
||||||
|
AssertEqual
|
||||||
|
\ ale#path#Simplify(g:dir . '/../test-files/python/pyre_configuration_dir'),
|
||||||
|
\ ale#python#FindProjectRoot(bufnr(''))
|
||||||
|
|||||||
Reference in New Issue
Block a user