Skip to content

Commit 48a0125

Browse files
committed
Minor changes related to Flask
1 parent 5cc29c4 commit 48a0125

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: v2/run.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,9 @@ func (e *Editor) Run() (string, bool, error) {
124124
cmd = exec.Command(filepath.Join(sourceDir, efn))
125125
}
126126
case mode.Python:
127+
// Special support for Poetry and Flask
127128
if (files.Exists("pyproject.toml") || files.Exists("poetry.lock")) && files.WhichCached("poetry") != "" {
128-
// Special support for Flask
129-
if strings.Contains(e.String(), "from flask import Flask") {
129+
if strings.Contains(e.String(), "import Flask") {
130130
cmd = exec.Command("poetry", "run", "python", "-m", "flask", "--app", sourceFilename, "run")
131131
if isDarwin {
132132
cmd.Args[2] = "python3"

0 commit comments

Comments
 (0)