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

Adopt Black code-style. Also add support for pre-commit workflow. #402

Closed
nicolaiarocci opened this issue Jun 1, 2018 · 5 comments

Comments

Projects
None yet
2 participants
@nicolaiarocci
Copy link
Member

commented Jun 1, 2018

I am loving the new workflow we have in Eve. With Black and other linters/fixers hooked into pre-commit, we have a code standard guarantee which also happens to be remarkably readable.

As mentioned in #383, what about doing the same thing with Cerberus?

@funkyfuture

This comment has been minimized.

Copy link
Member

commented Jun 1, 2018

i hope a lot, that this makes it easier for contributors and reviewers. with regards to eve, it totally makes sense. there's just one thing that i really don't like: forced double quotes (and i know that i'm sentimental here). so i'd say we opt that out. would there something to be minded now for the case that black may be dropped again?

@funkyfuture

This comment has been minimized.

Copy link
Member

commented Jun 2, 2018

i set this to the 1.3 milestone. okay?

@funkyfuture funkyfuture added this to the 1.3 milestone Jun 2, 2018

@nicolaiarocci

This comment has been minimized.

Copy link
Member Author

commented Jun 4, 2018

Yes, I am not particularly fond of the double quote thing. When I added it to Eve there was no opt-out option and now it is a little bit too late (I have to admit that once the code has been reformatted, it looks pretty even with the doubles! - and you can keep coding with singles, black will fix them for you). Ok with the 1.3 milestone.

@nicolaiarocci

This comment has been minimized.

Copy link
Member Author

commented Jun 4, 2018

PS: besides all the ramblings, I'm fine with opting out of the double quotes.

@funkyfuture

This comment has been minimized.

Copy link
Member

commented Jun 4, 2018

pytest now styles its docs with black. well, the code snippets in it.

huh,

schema_validation_schema = pformat(validator.rules, width=68) # width seems w/o effect, use black?

@nicolaiarocci nicolaiarocci self-assigned this Jun 20, 2018

nicolaiarocci added a commit that referenced this issue Jun 22, 2018

nicolaiarocci added a commit that referenced this issue Jun 22, 2018

Support pre-commit and tox linting
- If pre-commit is installed linting is performed on every commit.
Linting checks and fixes are only applied to staged files.

- 'tox -e linting' will perform linting checks and fixes on all files in
the repository

Addresses #402

nicolaiarocci added a commit that referenced this issue Jun 22, 2018

Add linting stage to CI
Performm linting checks as first stage. On failure, do not run the
test suite.

Addresses #402
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.