Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: pm refactor #158

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion ape_solidity/_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,11 @@ def _resolve_import_remapping(self, project: "ProjectManager"):
# Get all matches.
valid_matches: list[tuple[str, str]] = []
for check_remap_key, check_remap_value in import_remapping.items():
if check_remap_key not in self.value:
# Match with a trailing slash to avoid partial matches.
key_to_check = (
check_remap_key if check_remap_key.endswith("/") else f"{check_remap_key}/"
)
if key_to_check not in self.value:
continue

valid_matches.append((check_remap_key, check_remap_value))
Expand Down
2 changes: 1 addition & 1 deletion ape_solidity/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def available_versions(self) -> list[Version]:
@property
def installed_versions(self) -> list[Version]:
"""
Returns a lis of installed version WITHOUT their
Returns a list of installed versions WITHOUT their
commit hashes.
"""
return get_installed_solc_versions()
Expand Down
Loading