Skip to content

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

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

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

Comments

@nicolaiarocci
Copy link
Member

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
Copy link
Member

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
Copy link
Member

i set this to the 1.3 milestone. okay?

@funkyfuture funkyfuture added this to the 1.3 milestone Jun 2, 2018
@nicolaiarocci
Copy link
Member Author

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
Copy link
Member Author

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

@funkyfuture
Copy link
Member

funkyfuture 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
- 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
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
Projects
None yet
Development

No branches or pull requests

2 participants