Enable the python module for tox files (#369)

Enable the python module if the current directory contains a `tox.ini`
file.
This commit is contained in:
Thomas O'Donnell
2019-09-15 18:21:40 +02:00
committed by Matan Kushner
parent 36354aaa79
commit 653def05f0
3 changed files with 20 additions and 0 deletions
+2
View File
@@ -14,6 +14,7 @@ use super::{Context, Module};
/// - Current directory contains a `pyproject.toml` file
/// - Current directory contains a file with the `.py` extension
/// - Current directory contains a `Pipfile` file
/// - Current directory contains a `tox.ini` file
pub fn module<'a>(context: &'a Context) -> Option<Module<'a>> {
let is_py_project = context
.try_begin_scan()?
@@ -22,6 +23,7 @@ pub fn module<'a>(context: &'a Context) -> Option<Module<'a>> {
".python-version",
"pyproject.toml",
"Pipfile",
"tox.ini",
])
.set_extensions(&["py"])
.is_match();