Skip to content

Easier FORMATTER indenting with context manager? #90

@davidorme

Description

@davidorme

We could potentially avoid all the:

FORMATTER.push()
...
FORMATTER.pop()

By defining a context manager:

with FORMATTER.indent_by():
    ...

I think this is clearer, although makes indentation in the code deeper.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions