mirror of
https://github.com/starship/starship.git
synced 2026-06-23 02:05:51 +07:00
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:
committed by
Matan Kushner
parent
36354aaa79
commit
653def05f0
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user