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

pre-commit: add black, isort, pyupgrade, autoflake, flake8, and misc hooks #104

Merged
merged 4 commits into from
Apr 5, 2024

Conversation

consideRatio
Copy link
Member

@consideRatio consideRatio commented Apr 4, 2024

This adds the usual hooks except prettier to this repo. I'm omitting prettier for now since I expect it could lead to merge conflicts with docs PRs #99.

This PR will have a probably quite simple to resolve merge conflict with #90.

Copy link
Collaborator

@yuvipanda yuvipanda left a comment

Choose a reason for hiding this comment

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

I'm kinda wary of ruff given it's VC funding, and would prefer we use the same stack we use elsewhere instead (black, etc). Nothing against the people behind ruff specifically! If we want to introduce ruff into the jupyterhub project, I'd like there to be more community consensu before we do so.

@consideRatio
Copy link
Member Author

Ah okay, we can go for the normal stuff - I adopted it after setting it be piloted for use in jupyterhub/jupyterhub

@consideRatio consideRatio changed the title pre-commit: add ruff hook pre-commit: add black, isort, pyupgrade, autoflake, flake8, and misc hooks Apr 4, 2024
@consideRatio consideRatio requested a review from yuvipanda April 4, 2024 20:38
@@ -1,4 +1,4 @@
#!/usr/bin/env jsonnet -J ../vendor
#!/usr/bin/env -S jsonnet -J ../vendor
Copy link
Member Author

Choose a reason for hiding this comment

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

I had to use -S to not have env parse the content above as a command with spaces in it.

@@ -1,3 +1,4 @@
#!/usr/bin/env -S jsonnet -J ../vendor
Copy link
Member Author

Choose a reason for hiding this comment

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

I had to ensure shebangs were added to executable files.

I removed the executable flag for the libsonnet file that renders blank anyhow.

@consideRatio
Copy link
Member Author

@yuvipanda I'll go for a merge now to unblock myself to contribute further, I'll push a merge commit to your PR fixing the conflict caused by this as well

@consideRatio consideRatio merged commit acabfcf into jupyterhub:main Apr 5, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants