Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: McCoy Patiño <39780829+mccoyp@users.noreply.github.com>
  • Loading branch information
scbedd and mccoyp authored Oct 21, 2024
1 parent 95e1f29 commit d57f79d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tools/azure-sdk-tools/ci_tools/parsing/parse_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,10 @@ def parse_pyproject(
# fmt: on


def get_version_py(setup_path: str):
def get_version_py(setup_path: str) -> Optional[str]:
"""
Given the path to pyproject.toml or setup.py, attempts to find a (_)version.py file and return its location.
"""
file_path, _ = os.path.split(setup_path)
# Find path to _version.py recursively in azure folder of package
azure_root_path = os.path.join(file_path, "azure")
Expand Down Expand Up @@ -430,7 +433,7 @@ def parse_setup(
setup_filename_or_folder: str,
):
"""
Used to evaluate a setup.py (or a directory containing a setup.py) and return a tuple containing:
Used to evaluate a pyproject.toml or setup.py (or a directory containing either) and return a tuple containing:
(
<package-name>,
<package_version>,
Expand Down

0 comments on commit d57f79d

Please sign in to comment.