New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable Aliases/Anchors #103

nnadeau opened this Issue Nov 27, 2017 · 0 comments


None yet
1 participant

nnadeau commented Nov 27, 2017

Expected Behaviour

  • Ability to disable generated aliases and anchors (AA) in yaml.dump()

Use Case

  • Tool for generating default yaml config file for an application
  • Users of the generated config file should not need to know how AA work

Actual Behaviour

  • No option to disable AA

Current Workaround

class NoAliasDumper(yaml.Dumper):
    def ignore_aliases(self, data):
        return True

yaml.dump(x, Dumper=NoAliasDumper)

Potential Solution

  • Add a flag to yaml.dump() that switches the functionality of ignore_aliases()

@nnadeau nnadeau referenced a pull request that will close this issue Nov 30, 2017


Added flag to ignore aliases/anchors #104

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment