Skip to content

Commit

Permalink
feat(stubs): utilize StubRepositoryPackage.match_exact
Browse files Browse the repository at this point in the history
  • Loading branch information
BradenM committed Dec 11, 2022
1 parent e257aa5 commit 3ec08dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion micropy/stubs/repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def search(self, query: str) -> Generator[StubRepositoryPackage, None, None]:
yield package

def resolve_package(self, name: str) -> str:
pkg = next((p for p in self.packages if p.name == name or p.absolute_name == name), None)
pkg = next((p for p in self.packages if p.match_exact(name)), None)
if pkg is None:
raise exc.StubNotFound(pkg)
return pkg.url

0 comments on commit 3ec08dd

Please sign in to comment.