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

add pre-commit with toxenv #88

Merged
merged 2 commits into from
Feb 7, 2021
Merged

add pre-commit with toxenv #88

merged 2 commits into from
Feb 7, 2021

Conversation

obestwalter
Copy link
Contributor

Description

Add a lint step that does automatic code formatting via black using the pre-commit framework. There are also a few commented out hooks, that seem sensible to add, but this should be done in several steps. The first step should be adding formatting. As an example I ran tox -e lint and pushed it to a different branch. This is what the formatted code looks like in PR #86

Running tox -e lint on a local machine also installs the pre-commit hook, so that committing code that is not properly formatted or is otherwise flagged (e.g. via flake8) can not be commited.

@isidore
Copy link
Member

isidore commented Jan 24, 2021

we want to do this, but are going to wait to do it together with you present

@claremacrae
Copy link
Contributor

I guess when we accept this, we should add a note to the docs somewhere, asking contributors to run tox -e lint to enable the pre-commit hook.

@obestwalter
Copy link
Contributor Author

Yes, that was what I wanted to talk about then ... if we really want to add this automatic step, which then also needs some explanation in the docs for developers, who might be surprised by this. But we can talk about this next week then,

@isidore isidore merged commit fc3f0c1 into approvals:master Feb 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants