File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ def main() -> None:
36
36
print (fname )
37
37
38
38
39
- def _get_cli_opts ():
39
+ def _get_cli_opts () -> argparse . Namespace :
40
40
prog = "python -m setuptools_scm"
41
41
desc = "Print project version according to SCM metadata"
42
42
parser = argparse .ArgumentParser (prog , description = desc )
@@ -67,13 +67,15 @@ def _get_cli_opts():
67
67
return parser .parse_args ()
68
68
69
69
70
- def _find_pyproject (parent ) :
70
+ def _find_pyproject (parent : str ) -> str :
71
71
for directory in walk_potential_roots (os .path .abspath (parent )):
72
72
pyproject = os .path .join (directory , "pyproject.toml" )
73
- if os .path .exists (pyproject ):
73
+ if os .path .isfile (pyproject ):
74
74
return pyproject
75
75
76
- raise FileNotFoundError ("'pyproject.toml' was not found" )
76
+ return os .path .abspath (
77
+ "pyproject.toml"
78
+ ) # use default name to trigger the default errors
77
79
78
80
79
81
if __name__ == "__main__" :
You can’t perform that action at this time.
0 commit comments