[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:
Oliver Albertini 2021-09-15 05:07:45 -07:00 committed by GitHub
parent 19437e25d0
commit f769f64c07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 9 additions and 0 deletions

View File

@ -24,6 +24,7 @@ function! ale#python#FindProjectRootIni(buffer) abort
\|| filereadable(l:path . '/setup.cfg')
\|| filereadable(l:path . '/pytest.ini')
\|| filereadable(l:path . '/tox.ini')
\|| filereadable(l:path . '/.pyre_configuration.local')
\|| filereadable(l:path . '/mypy.ini')
\|| filereadable(l:path . '/pycodestyle.cfg')
\|| filereadable(l:path . '/.flake8')

View File

@ -35,6 +35,7 @@ ALE will look for configuration files with the following filenames. >
setup.cfg
pytest.ini
tox.ini
.pyre_configuration.local
mypy.ini
pycodestyle.cfg
.flake8

View File

@ -57,3 +57,10 @@ Execute(Poetry is detected when python_pyre_auto_poetry is set):
AssertLinter 'poetry',
\ 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(''))