diff --git a/internal/inspect/detectors/pyshiny.go b/internal/inspect/detectors/pyshiny.go index fb5df666c..55485d25f 100644 --- a/internal/inspect/detectors/pyshiny.go +++ b/internal/inspect/detectors/pyshiny.go @@ -85,6 +85,8 @@ func (d *pyShinyDetector) InferType(base util.AbsolutePath, entrypoint util.Rela } else { cfg.Entrypoint = relEntrypoint.String() } + cfg.Files = append(cfg.Files, relEntrypoint.String()) + cfg.Type = config.ContentTypePythonShiny // indicate that Python inspection is needed cfg.Python = &config.Python{} diff --git a/internal/inspect/detectors/pyshiny_test.go b/internal/inspect/detectors/pyshiny_test.go index 1c5110bb3..00c40575c 100644 --- a/internal/inspect/detectors/pyshiny_test.go +++ b/internal/inspect/detectors/pyshiny_test.go @@ -41,7 +41,7 @@ func (s *PyShinySuite) TestInferType() { Type: config.ContentTypePythonShiny, Entrypoint: filename, Validate: true, - Files: []string{}, + Files: []string{filename}, Python: &config.Python{}, }, configs[0]) } @@ -66,7 +66,7 @@ func (s *PyShinySuite) TestInferTypeShinyExpress() { Type: config.ContentTypePythonShiny, Entrypoint: "shiny.express.app:app_2e_py", Validate: true, - Files: []string{}, + Files: []string{filename}, Python: &config.Python{}, }, configs[0]) } @@ -95,7 +95,7 @@ func (s *PyShinySuite) TestInferTypeWithEntrypoint() { Type: config.ContentTypePythonShiny, Entrypoint: filename, Validate: true, - Files: []string{}, + Files: []string{filename}, Python: &config.Python{}, }, configs[0]) } @@ -123,7 +123,7 @@ func (s *PyShinySuite) TestInferTypeWithExtraFile() { Type: config.ContentTypePythonShiny, Entrypoint: filename, Validate: true, - Files: []string{}, + Files: []string{filename}, Python: &config.Python{}, }, configs[0]) }