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

some reformattting for flake8 etc #66

Merged
merged 4 commits into from
Nov 9, 2024

Conversation

KrisThielemans
Copy link
Contributor

No description provided.

@KrisThielemans
Copy link
Contributor Author

@casperdcl could you help with the following 3 types of problems thrown up by the yaml checker?

could not determine a constructor for the tag '!record'
  in "model/DetectorInformation.yml", line 2, column 21
expected a single document in the stream
  in ".clang-format", line 2, column 1
but found another document
  in ".clang-format", line 3, column 1
python/petsird_generator.py:105:5: E125 continuation line with same indent as next logical line
p

The latter were reformatted by black presumably.

@KrisThielemans
Copy link
Contributor Author

The "could not determine a constructor for the tag" issue is mentioned in various places, including yaml/pyyaml#825. They all seem to say we'd need a Python class for the checker to be happy, which seems a no-go. https://github.com/pre-commit/pre-commit-hooks?tab=readme-ov-file#check-yaml doesn't give a lot of options, so I'll try --unsafe. That might prevent the clang-format error as well.

add --unsafe option to prevent error messages on `!record`

fixes ETSInitiative#66
- increase line length a bit (but now in .flake8 as opposed to
pre-commit config)
- disable E125 as it conflicts with black rules for type hints

Fixes ETSInitiative#66
@KrisThielemans KrisThielemans added documentation Improvements or additions to documentation enhancement New feature or request labels Nov 9, 2024
@KrisThielemans KrisThielemans merged commit 976ee30 into ETSInitiative:main Nov 9, 2024
2 checks passed
@KrisThielemans KrisThielemans deleted the formatting branch November 9, 2024 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant