Skip to content

Commit

Permalink
Typing
Browse files Browse the repository at this point in the history
  • Loading branch information
kenodegard committed Oct 18, 2023
1 parent b48cb38 commit 73bf6d0
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions conda_build/os_utils/pyldd.py
Original file line number Diff line number Diff line change
Expand Up @@ -1081,11 +1081,12 @@ def is_codefile(path: str | os.PathLike | Path, skip_symlinks: bool = True) -> b
"4.0.0",
addendum="Use `conda_build.os_utils.pyldd.codefile_class` instead.",
)
def codefile_type(filename, skip_symlinks=True):
klass = codefile_class(filename, skip_symlinks=skip_symlinks)
if not klass:
return None
return klass.__name__
def codefile_type(
path: str | os.PathLike | Path,
skip_symlinks: bool = True,
) -> str | None:
codefile = codefile_class(path, skip_symlinks=skip_symlinks)
return codefile.__name__ if codefile else None


def _trim_sysroot(sysroot):
Expand Down

0 comments on commit 73bf6d0

Please sign in to comment.