Skip to content

Commit

Permalink
Minor typing and coverage tweaks.
Browse files Browse the repository at this point in the history
  • Loading branch information
Julian committed Nov 29, 2023
1 parent 9a2b3bb commit c1ca345
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 2 additions & 2 deletions referencing/loaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ def from_path(path: Path) -> Iterable[tuple[URI, Resource[Any]]]:
yield path.as_uri(), Resource.from_contents(contents)


def _walk(path: Path):
def _walk(path: Path) -> Iterable[tuple[Path, Iterable[str], Iterable[str]]]:
walk = getattr(path, "walk", None)
if walk is not None:
yield from walk()
return
for root, dirs, files in os.walk(path):
for root, dirs, files in os.walk(path): # pragma: no cover
yield Path(root), dirs, files
4 changes: 0 additions & 4 deletions referencing/tests/test_loaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,3 @@ def test_absolute_internally_identified(tmp_path):
def test_empty(tmp_path):
registry = EMPTY_REGISTRY.with_resources(loaders.from_path(tmp_path))
assert registry == EMPTY_REGISTRY


def test_custom_loads(tmp_path):
pass

0 comments on commit c1ca345

Please sign in to comment.