@@ -69,7 +69,7 @@ func (r *Resolver) DetectPackageRoots() ([]PackageRoot, error) {
6969 if fileExists (filepath .Join (absSubdir , "pyproject.toml" )) || fileExists (filepath .Join (absSubdir , "setup.py" )) {
7070 roots = appendIfNewPath (roots , PackageRoot {Path : subdir , DetectionMethod : "monorepo_subdir" })
7171 if dirExists (filepath .Join (absSubdir , "src" )) {
72- roots = appendIfNewPath (roots , PackageRoot {Path : filepath .Join (subdir , "src" ), DetectionMethod : "src_layout" })
72+ roots = appendIfNewPath (roots , PackageRoot {Path : filepath .ToSlash ( filepath . Join (subdir , "src" ) ), DetectionMethod : "src_layout" })
7373 }
7474 }
7575 }
@@ -177,7 +177,7 @@ func (r *Resolver) resolveRelative(srcFile string, fact model.ImportFact) model.
177177 }
178178 }
179179 // Check for __init__.py in the base dir itself.
180- initPath := filepath .Join (baseDir , "__init__.py" )
180+ initPath := filepath .ToSlash ( filepath . Join (baseDir , "__init__.py" ) )
181181 if fileExists (filepath .Join (r .repoRoot , initPath )) {
182182 return model.ResolveResult {
183183 ResolvedPath : initPath ,
@@ -273,13 +273,13 @@ func resolveModulePath(repoRoot, base, modulePath string) string {
273273 relPath := strings .ReplaceAll (modulePath , "." , string (filepath .Separator ))
274274
275275 // Try as .py file.
276- pyFile := filepath .Join (base , relPath + ".py" )
276+ pyFile := filepath .ToSlash ( filepath . Join (base , relPath + ".py" ) )
277277 if fileExists (filepath .Join (repoRoot , pyFile )) {
278278 return pyFile
279279 }
280280
281281 // Try as package __init__.py.
282- initFile := filepath .Join (base , relPath , "__init__.py" )
282+ initFile := filepath .ToSlash ( filepath . Join (base , relPath , "__init__.py" ) )
283283 if fileExists (filepath .Join (repoRoot , initFile )) {
284284 return initFile
285285 }
0 commit comments