Skip to content

Commit

Permalink
feat(utils): add types to ensure_existing_dir
Browse files Browse the repository at this point in the history
  • Loading branch information
BradenM committed Dec 11, 2022
1 parent 63f65b9 commit e8e6ea8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion micropy/utils/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
"get_class_that_defined_method",
]

from .types import PathStr


def is_url(url):
"""Check if provided string is a url.
Expand Down Expand Up @@ -87,7 +89,7 @@ def ensure_valid_url(url):
return url


def ensure_existing_dir(path):
def ensure_existing_dir(path: PathStr) -> Path:
"""Ensure path exists and is a directory.
If path does exist, it will be returned as
Expand Down

0 comments on commit e8e6ea8

Please sign in to comment.