8000 add config file for pre-commit by pww217 · Pull Request #235 · pyscript/pyscript · GitHub
[go: up one dir, main page]

Skip to content

add config file for pre-commit #235

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

Merged
merged 6 commits into from
May 5, 2022
Merged

add config file for pre-commit #235

merged 6 commits into from
May 5, 2022

Conversation

pww217
Copy link
Contributor
@pww217 pww217 commented May 5, 2022

Simply adds a yaml that tells the Github app for pre-commit to run the Black python linting hook. Add other hooks as required.

This is separate from Github Actions - it runs as an app in the repo/org.

We also runner prettier for readme formatting in some repos, as a suggestion.

@pww217 pww217 changed the title add config file add config file for pre-commit May 5, 2022
@pww217 pww217 requested review from fpliger, philippjfr and mattkram and removed request for fpliger May 5, 2022 18:13
@pww217 pww217 marked this pull request as ready for review May 5, 2022 18:13
Copy link
Contributor
@philippjfr philippjfr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! I think we agreed to add black formatting but I'll let @fpliger confirm and merge.

@philippjfr
Copy link
Contributor

Would also be +1 on adding isort as suggested in #201

@pww217
Copy link
Contributor Author
pww217 commented May 5, 2022

Alright they have documentation for that but I'm not sure which arguments you'd want to use

https://pycqa.github.io/isort/docs/configuration/pre-commit.html

@jezdez
Copy link
Member
jezdez commented May 5, 2022

@pww217 Check out #201, those arguments are reasonable.

@pww217
Copy link
Contributor Author
pww217 commented May 5, 2022

Alright that seemed to work and isort modified a number of files itself, hence the 10 new file changes.

I added just the regular python hook.

@pww217 pww217 added tag: tests Related to tests tag: tooling Related to the configuration of infrastructure and tooling labels May 5, 2022
@fpliger
Copy link
Contributor
fpliger commented May 5, 2022

@pww217 , just a heads up. I've added an empty precommit file to #231 just to make it pass so I can merge. You'll have conflicts if I merge it to main first.

Copy link
Contributor
@fpliger fpliger left a comment
8000

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. I'd keep the linted files out of this PR and have a follow up PR (I've done that in my related PR that I just mentioned), mostly for easy of reading... Also, the formatting I added in that PR may clash with this one..

Anyway, not a big deal. We can fix later no matter what route you choose. Thank you for this! 💯

Copy link
Contributor
@mattkram mattkram left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love it.

I plan to add a few other ones but will do in another PR.

@pww217 pww217 merged commit 6f6efa4 into main May 5, 2022
@pww217 pww217 deleted the add-precommit-config branch May 5, 2022 20:12
@fpliger fpliger added the status: accepted PR that has been reviewed and accepted label May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: accepted PR that has been reviewed and accepted tag: tests Related to tests tag: tooling Related to the configuration of infrastructure and tooling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0