Skip to content

Commit

Permalink
style: cleanup unused code and commentary
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeshultz committed Feb 8, 2024
1 parent 64801ce commit f587be8
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions ape_solidity/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -501,8 +501,6 @@ def compile(
arguments["base_path"] = base_path

if self.project_manager.compiler_cache_folder.is_dir():
# TODO: equivalent of --include-path?
# arguments["include_path"] = self.project_manager.compiler_cache_folder
arguments["allow_paths"] = self.project_manager.compiler_cache_folder

# Allow empty contracts, like Vyper does.
Expand Down Expand Up @@ -1118,19 +1116,3 @@ def _import_str_to_source_id(

def _try_max(ls: List[Any]):
return max(ls) if ls else None


def _get_best_relative_path(path: Path, base_paths: List[Path]) -> Path:
"""Return the first matching relative path to the given base paths"""
relatives = []

for base in base_paths:
try:
relatives.append(path.relative_to(base))
except ValueError:
continue

if not relatives:
raise ValueError(f"{path} is not a subpath of any given base paths")

return min(relatives, key=lambda x: len(x.parts))

0 comments on commit f587be8

Please sign in to comment.