Skip to content
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

Indent array values #8

Open
apizz opened this issue Mar 2, 2021 · 1 comment
Open

Indent array values #8

apizz opened this issue Mar 2, 2021 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@apizz
Copy link

apizz commented Mar 2, 2021

At the moment, strings within an array have the same indent level:

Current behavior:

- Processor: CodeSignatureVerifier
  Arguments:
    expected_authority_names:
    - 'Developer ID Installer: Yamaha Corporation (5LE7A8CF65)'
    - Developer ID Certification Authority
    - Apple Root CA
    input_path: '%RECIPE_CACHE_DIR%/%NAME%.pkg'

Expected behavior:

- Processor: CodeSignatureVerifier
  Arguments:
    expected_authority_names:
      - 'Developer ID Installer: Yamaha Corporation (5LE7A8CF65)'
      - Developer ID Certification Authority
      - Apple Root CA
    input_path: '%RECIPE_CACHE_DIR%/%NAME%.pkg'
@grahampugh
Copy link
Owner

grahampugh commented Mar 2, 2021

True. This style of indentation is not required though. In my experience, either way works. This is the default created by ruamel.yaml.

I do intend to look into changing it, mainly because my yaml linter in VSCode uses the indentation level you proffer. There have been some big changes to ruamel.yaml recently which I may have to work through while figuring out how to set a different default indentation level.

Here's the issue. I can enforce the indentation using this method:
https://stackoverflow.com/questions/44388701/how-get-the-sequences-properly-indented-with-ruamel-yaml

However, this uses the new ruamel API. I've tried switching to the new API but so far it has ended up printing all sorts of "superfluous" code in the YAML which is not helpful or pretty. It's obviously something that needs to be addressed as the old API is deprecated, either by figuring it out or switching back to PyYAML.

@grahampugh grahampugh added the help wanted Extra attention is needed label Mar 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants