mirror of
https://github.com/dense-analysis/ale.git
synced 2026-02-05 17:37:47 +08:00
Remove pytest.ini from project detection files
This breaks detecting the project root when editing tests with a nested pytest.ini file where other project files are available. The other files are so common we can just removes this entirely and test that we ignore it in one case.
This commit is contained in:
@@ -26,7 +26,6 @@ function! ale#python#FindProjectRootIni(buffer) abort
|
||||
" If you change this, update ale-python-root documentation.
|
||||
if filereadable(l:path . '/MANIFEST.in')
|
||||
\|| 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')
|
||||
@@ -55,11 +54,12 @@ endfunction
|
||||
" Given a buffer number, find the project root directory for Python.
|
||||
" The root directory is defined as the first directory found while searching
|
||||
" upwards through paths, including the current directory, until a path
|
||||
" containing an init file (one from MANIFEST.in, setup.cfg, pytest.ini,
|
||||
" tox.ini) is found. If it is not possible to find the project root directory
|
||||
" via init file, then it will be defined as the first directory found
|
||||
" searching upwards through paths, including the current directory, until no
|
||||
" __init__.py files is found.
|
||||
" containing an configuration file is found. (See list above)
|
||||
"
|
||||
" If it is not possible to find the project root directory via configuration
|
||||
" file, then it will be defined as the first directory found searching upwards
|
||||
" through paths, including the current directory, until no __init__.py files
|
||||
" is found.
|
||||
function! ale#python#FindProjectRoot(buffer) abort
|
||||
let l:ini_root = ale#python#FindProjectRootIni(a:buffer)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user