Redefine signatures parameter for function
This commit is contained in:
parent
4181d339df
commit
7c00a7580c
@ -7,13 +7,13 @@ PKGEXT = 'pkg.tar.xz'
|
|||||||
SIGEXT = f"{PKGEXT}.sig"
|
SIGEXT = f"{PKGEXT}.sig"
|
||||||
|
|
||||||
# ========== Functions ==========
|
# ========== Functions ==========
|
||||||
def get_pkgfiles(query, directory=None, signatures=False):
|
def get_pkgfiles(query, directory=None, signatures_only=False):
|
||||||
"""Return a list of package files in the current working directory.
|
"""Return a list of package files in the current working directory.
|
||||||
|
|
||||||
:param directory: a directory to search in
|
:param directory: a directory to search in
|
||||||
:type directory: str, bytes, or path-like object
|
:type directory: str, bytes, or path-like object
|
||||||
:param signatures: include only signature files
|
:param signatures_only: include only signature files
|
||||||
:type signatures: bool
|
:type signatures_only: bool
|
||||||
:returns: paths of package files
|
:returns: paths of package files
|
||||||
:rtype: list
|
:rtype: list
|
||||||
"""
|
"""
|
||||||
@ -22,7 +22,7 @@ def get_pkgfiles(query, directory=None, signatures=False):
|
|||||||
else:
|
else:
|
||||||
path = pathlib.Path.cwd()
|
path = pathlib.Path.cwd()
|
||||||
|
|
||||||
if signatures:
|
if signatures_only:
|
||||||
return list(path.glob(f"{query}*.{SIGEXT}"))
|
return list(path.glob(f"{query}*.{SIGEXT}"))
|
||||||
|
|
||||||
return list(path.glob(f"{query}*.{PKGEXT}"))
|
return list(path.glob(f"{query}*.{PKGEXT}"))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user