Repository navigation
Pycln QA tool as a pre-commit hook - #2001
Conversation
|
It's a good idea! Do you have examples of other notable projects using pycln |
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2001 +/- ##
==========================================
- Coverage 99.49% 99.48% -0.02%
==========================================
Files 73 72 -1
Lines 7361 7335 -26
==========================================
- Hits 7324 7297 -27
- Misses 37 38 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
For now, fossasia's open event server is the most notable project that I can name. (they're using Also, someone ran
therefore I've created a PR in In fact, in the last few days I offered Pycln to several mainstream projects so maybe in the next few weeks we will see more notable projects using it. |
|
I've included pycln in the Scikit-HEP developer pages for a while, so projects that follow that sometimes use it, like https://github.com/pybind/pybind11, https://github.com/pyodide/pyodide, https://github.com/pypa/cibuildwheel, and of course a few Scikit-HEP libraries. My favorite is likely Pyodide's usage, as it's a great manual hook - running it by default can be a little overkill (a typo when using a library can cause that library to be removed, for example), but it's really handy during refactors, like |
That's awesome, in fact, I already know that those projects use Pycln, but I forgot about them for some reason...Anyway thanks a lot @henryiii for supporting Pycln and using it. |
I have included a used by section in the README file containing a list of notable projects/organizations that use Pycln. |
|
@hadialqattan Ok, let's give it a go :) I created a merge conflict for you. Would you mind fixing that and I'll merge? |
I've fixed it, but please let me double check my work again. |
|
Now we are good to go 👍🏻 |
|
@willmcgugan |
|
THanks. |
|
I was worried about this. The PR broke the IPython extension. Is there any way to tell it not to touch a given import? |
Yes, of course, please take a look at the Pycln skips section. |
|
@willmcgugan In case you wanna know why Pycln didn't treat it as used by default, please have a look at the following sources:
btw, not using the |
Type of changes
Checklist
Description
I saw
pycln(which is a formatter for finding and removing unused import statements) a good addition to the current pre-commit hooks which I believe would ensure a high code quality standard besidesblackandisort.BTW, I'm the author of
pycln😄.Anyway, please feel free to ask any questions and/or reject/close this PR.
+ I would like to thank you for inventing this incredible library!