Skip to content

Commit

Permalink
chore: better comment
Browse files Browse the repository at this point in the history
  • Loading branch information
BobTheBuidler authored Aug 18, 2024
1 parent e05e53f commit dc665d1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions brownie/project/compiler/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@

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

if not isinstance(source_map_str, str):
# NOTE: why do we need this?
'
if isinstance(source_map_str, dict):
# NOTE: vyper >= 0.4 gives us a dict that contains the source map
source_map_str = source_map_str["pc_pos_map_compressed"]
if not isinstance(source_map_str, str):
raise TypeError(source_map_str)

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):
Expand Down

0 comments on commit dc665d1

Please sign in to comment.