Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR addresses what has been mentioned in #1070.
What this PR includes:
c++ project files formatting
google's python formatter that is close to black, but allows 2-indent formatting (oh the humanity...)
formatting style for cmake files
sort python imports alphabetically (can use profile=black, so I hope this profile works with pyink too)
the python formatter (commented out but added for when google policy on 2-indent changes)
using google's official configuration. Since this config enforces 2-indent, pyink is needed.
As a side effect of the pre-commit checks I have moved the setup definition into a
pyproject.toml
, since it allows to also write the configurations for some of these tools. In consequence:pyproject.toml
now holds the metadata of the project (version, authors, license, etc.)setup.py
is only the extension builderThe dev-tools needed to run these pre-commits have also been added to the the
pyproject.toml
as optional dependencies of the dev group and could then be installed via:or locally
If this PR is accepted a remark in the docs should be made for developers who wish to contribute the upstream to run
pre-commit install
on their repo in order to activate the hooks.