@@ -120,14 +120,16 @@ requires-python = "~=3.10"
120120 if err := executeCommand ("uv" , "add" , "--dev" , "mypy" ); err != nil {
121121 return nil , fmt .Errorf ("failed installing mypy: %w" , err )
122122 }
123-
123+
124124 // Create __init__.py files in feature directories to make them proper Python packages
125- if err := executeCommand ("find" , "../features" , "-type" , "d" , "-exec" , "touch" , "{}/__init__.py" , ";" ); err != nil {
126- return nil , fmt .Errorf ("failed creating __init__.py files: %w" , err )
127- }
128-
129- if err := executeCommand ("uv" , "run" , "mypy" , "--explicit-package-bases" , "../features" ); err != nil {
130- return nil , fmt .Errorf ("failed type checking: %w" , err )
125+ if _ , err := os .Stat (filepath .Join (dir , "../features" )); err == nil {
126+ if err := executeCommand ("find" , "../features" , "-type" , "d" , "-exec" , "touch" , "{}/__init__.py" , ";" ); err != nil {
127+ return nil , fmt .Errorf ("failed creating __init__.py files: %w" , err )
128+ }
129+
130+ if err := executeCommand ("uv" , "run" , "mypy" , "--explicit-package-bases" , "../features" ); err != nil {
131+ return nil , fmt .Errorf ("failed type checking: %w" , err )
132+ }
131133 }
132134
133135 success = true
0 commit comments