Skip to content

Commit

Permalink
Merge pull request #96 from dkrautha/main
Browse files Browse the repository at this point in the history
Add pyproject.toml detection
  • Loading branch information
lucperkins authored Feb 14, 2024
2 parents cc7b832 + 2d144cf commit 7fd6bfd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/cli/cmd/init/handlers/python.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ pub(crate) struct Python;

impl Handler for Python {
fn handle(project: &Project, flake: &mut Flake) {
if project.has_one_of(&["setup.py", "requirements.txt"]) && Prompt::for_language("Python") {
if project.has_one_of(&["setup.py", "requirements.txt", "pyproject.toml"])
&& Prompt::for_language("Python")
{
let python_version = Prompt::select("Select a version of Python", PYTHON_VERSIONS);
let python_version_attr = version_as_attr_default(&python_version);
flake
Expand Down

0 comments on commit 7fd6bfd

Please sign in to comment.