Skip to content

Commit

Permalink
Update utils.py
Browse files Browse the repository at this point in the history
  • Loading branch information
BobTheBuidler authored Aug 16, 2024
1 parent 4fa83d8 commit ca4e3b1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions brownie/project/compiler/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@

def expand_source_map(source_map_str: str) -> List:
# Expands the compressed sourceMap supplied by solc into a list of lists

if isinstance(source_map_str, dict):
source_map_str = str(source_map_str)
if not isinstance(source_map_str, str):
raise TypeError(source_map_str) from None

source_map: List = [_expand_row(i) if i else None for i in source_map_str.split(";")]
for i, value in enumerate(source_map[1:], 1):
if value is None:
Expand Down

0 comments on commit ca4e3b1

Please sign in to comment.