Skip to content

Disable Aliases/Anchors #103

@engnadeau

Description

@engnadeau

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()

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions