-
Notifications
You must be signed in to change notification settings - Fork 320
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
ci: Check import formatting with isort
#324
ci: Check import formatting with isort
#324
Conversation
Codecov Report
@@ Coverage Diff @@
## master #324 +/- ##
==========================================
- Coverage 82.42% 82.39% -0.03%
==========================================
Files 100 100
Lines 5621 5613 -8
==========================================
- Hits 4633 4625 -8
Misses 988 988
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@akihironitta how is it going here? seems to be empty... |
Not a strong opinion, but I prefer to use -from pl_bolts.datasets import DummyDataset, RandomDataset, RandomDictDataset, RandomDictStringDataset
+from pl_bolts.datasets import DummyDataset
+from pl_bolts.datasets import RandomDataset
+from pl_bolts.datasets import RandomDictDataset
+from pl_bolts.datasets import RandomDictStringDatase |
isort
isort
if it loading from a single file, I would prefer a single line... |
@akihironitta I would welcome adding something similar also for PL, just in smaller steps, meaning one PR per PL/sub-package and then in the config enable one-by-one... |
* add core members * ci: Check import formatting with `isort` (#324) * Create branch ci/add-import-checker * Add isort to ci * Add pyproject.toml * Apply isort * Update pyproject.toml * Add isort to requirements/test.txt * Add pre-commit to requirements/test.txt * Add isort hook from the official repo * Update isort pre-commit config * Split flake8 and isort checks * suggestion-name Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> * fix missing * added core maintainers * added core Co-authored-by: Akihiro Nitta <nitta@akihironitta.com> Co-authored-by: ananyahjha93 <ananya@pytorchlightning.ai>
@Borda Sure! |
What does this PR do?
Replicates Lightning-AI/pytorch-lightning#4241. WIP in PL as well in Lightning-AI/pytorch-lightning#4242.
Description of the changes
isort
config topyproject.toml
which is recommended in docs.github/workflows/code-format.yml
isort
to the codebaseisort
pre-commit hookLet me know if I should split this PR!
Before submitting
PR review
Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.
Did you have fun?
Make sure you had fun coding 🙃