Skip to content

Conversation

@skshetry
Copy link
Collaborator

@skshetry skshetry commented Aug 19, 2020

Reduce boilerplate of create + load + dump during serialization/deserialization

with modify_yaml(config_path, tree=repo.tree) as config:
    config["repos"] = config.get("repos", [])
    config["repos"].append(entry)

Thank you for the contribution - we'll try to review it as soon as possible. 🙏

On top of #4425, see #4415 (comment)

@skshetry skshetry self-assigned this Aug 19, 2020
@skshetry skshetry changed the title contextmanager to reduce boilerplate code for create+load+dump for serialization utils utils.serialize: modify_yaml contextmanager to reduce boilerplate Aug 20, 2020
@skshetry skshetry force-pushed the modify-serialize-ctxmgr branch 2 times, most recently from 9813ec3 to ddb95cf Compare August 20, 2020 05:00
@skshetry skshetry force-pushed the modify-serialize-ctxmgr branch from ddb95cf to 42e86ac Compare August 20, 2020 17:41
@skshetry skshetry marked this pull request as ready for review August 20, 2020 17:41
@skshetry skshetry requested review from efiop, pared and pmrowla August 20, 2020 17:41
Copy link
Contributor

@efiop efiop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💅

@efiop efiop merged commit 1d196b4 into treeverse:master Aug 21, 2020
@skshetry skshetry deleted the modify-serialize-ctxmgr branch August 21, 2020 02:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants