Skip to content

Commit

Permalink
Merge pull request #323 from dholbach/update-ruamel.yaml-use
Browse files Browse the repository at this point in the history
Update use of ruamel.yaml (API change in 0.18.0)
  • Loading branch information
Daniel Holbach authored Nov 4, 2023
2 parents ac4b72b + f15aae9 commit 5a4e219
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions project/bin/get_maintainer_data
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ if os.path.exists('/opt/hostedtoolcache/Python'):
if LOCAL_PY_PATHS and LOCAL_PY_PATHS[0] not in sys.path:
sys.path.append(LOCAL_PY_PATHS[0])

from ruamel import yaml
from ruamel.yaml import YAML
from ruamel.yaml.comments import CommentedSeq

PROJECT_PATH = os.path.join(os.path.dirname(__file__), '..')
Expand Down Expand Up @@ -103,7 +103,8 @@ def write_rolodex(info):
data['maintainers'].sort(key=lambda a: list(a.keys())[0])

with open(ROLODEX_FN, 'w') as file_desc:
yaml.round_trip_dump(data, file_desc, explicit_start=True)
yaml = YAML()
yaml.dump(data, file_desc)

def write_emeriti(info):
data = {}
Expand All @@ -113,7 +114,8 @@ def write_emeriti(info):
emeriti.sort()
data[repo] = emeriti
with open(EMERITI_FN, 'w') as file_desc:
yaml.round_trip_dump(data, file_desc, explicit_start=True)
yaml = YAML()
yaml.dump(data, file_desc)


def write_maintainers(info):
Expand All @@ -127,7 +129,8 @@ def write_maintainers(info):
if repo in SHARED_MAINTENANCE:
data[repo].yaml_set_start_comment("Plus flux2 maintainers")
with open(MAINTAINERS_FN, 'w') as file_desc:
yaml.round_trip_dump(data, file_desc, explicit_start=True)
yaml = YAML()
yaml.dump(data, file_desc)


def main():
Expand Down

0 comments on commit 5a4e219

Please sign in to comment.