Skip to content

Commit

Permalink
Comment on paths
Browse files Browse the repository at this point in the history
  • Loading branch information
mdrachuk committed Aug 22, 2019
1 parent 7b65d3f commit 3c07ea8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lightweight/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ def create_file(path: Path, *, content: str):
f.write(content)


def paths(path: str) -> Iterator[Path]:
return map(Path, iglob(path, recursive=True))
def paths(glob_path: str) -> Iterator[Path]:
"""An iterator of paths matching the provided `glob`_ pattern.
_glob: https://en.wikipedia.org/wiki/Glob_(programming)"""
return map(Path, iglob(glob_path, recursive=True))


def strip_extension(file_name: str):
Expand Down

0 comments on commit 3c07ea8

Please sign in to comment.