Skip to content

Commit

Permalink
Merge pull request #1735 from tweag/cleanup-unused-function
Browse files Browse the repository at this point in the history
Remove unused `unfold_fields` function
  • Loading branch information
mergify[bot] authored May 30, 2022
2 parents e1017b4 + 8c4944b commit 8e62381
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions haskell/private/pkgdb_to_bzl.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,6 @@
else:
sys.exit("Usage: pkgdb_to_bzl.py <REPO_NAME> <TOPDIR>")

def unfold_fields(content):
"""Unfold fields that were split over multiple lines.
Returns:
A list of strings. Each string represents one field (a name/value pair
separated by a colon).
>>> unfold_fields("foo \n bar \n baz \nbiz \nboz ")
['foo bar baz ', 'biz ', 'boz ']
"""
fields = []
for line in content.splitlines():
if line.startswith(" "):
fields[-1] += line
elif line:
fields.append(line)
return fields

def path_to_label(path, pkgroot):
"""Substitute one pkgroot for another relative one to obtain a label."""
if path.find("${pkgroot}") != -1:
Expand Down

0 comments on commit 8e62381

Please sign in to comment.