File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -399,16 +399,18 @@ def _in_build(path: Path) -> bool:
399
399
if not path .is_dir ():
400
400
return False
401
401
402
+ setup_cfg = path .parent / "setup.cfg"
403
+ if not setup_cfg .is_file ():
404
+ return False
405
+
402
406
if any (fnmatch_ex (pat , path ) for pat in ("build" , "dist" )):
403
- setup_cfg = path .parent / "setup.cfg"
404
- if (setup_cfg ).is_file ():
405
- setup_py = path .parent / "setup.py"
406
- if setup_py .is_file ():
407
- return True
408
-
409
- toml = path .parent / "pyproject.toml"
410
- if toml .is_file () and _is_setuptools_in_pyproject_toml (toml ):
411
- return True
407
+ setup_py = path .parent / "setup.py"
408
+ if setup_py .is_file ():
409
+ return True
410
+
411
+ toml = path .parent / "pyproject.toml"
412
+ if toml .is_file () and _is_setuptools_in_pyproject_toml (toml ):
413
+ return True
412
414
413
415
return False
414
416
You can’t perform that action at this time.
0 commit comments