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 @@ -393,16 +393,18 @@ def _in_build(path: Path) -> bool:
393393 if not path .is_dir ():
394394 return False
395395
396+ setup_cfg = path .parent / "setup.cfg"
397+ if not setup_cfg .is_file ():
398+ return False
399+
396400 if any (fnmatch_ex (pat , path ) for pat in ("build" , "dist" )):
397- setup_cfg = path .parent / "setup.cfg"
398- if (setup_cfg ).is_file ():
399- setup_py = path .parent / "setup.py"
400- if setup_py .is_file ():
401- return True
402-
403- toml = path .parent / "pyproject.toml"
404- if toml .is_file () and _is_setuptools_in_pyproject_toml (toml ):
405- return True
401+ setup_py = path .parent / "setup.py"
402+ if setup_py .is_file ():
403+ return True
404+
405+ toml = path .parent / "pyproject.toml"
406+ if toml .is_file () and _is_setuptools_in_pyproject_toml (toml ):
407+ return True
406408
407409 return False
408410
You can’t perform that action at this time.
0 commit comments