-
-
Notifications
You must be signed in to change notification settings - Fork 596
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
Format code with Black and isort #411
Conversation
Codecov Report
@@ Coverage Diff @@
## master #411 +/- ##
==========================================
+ Coverage 88.16% 88.16% +<.01%
==========================================
Files 24 24
Lines 2382 2383 +1
==========================================
+ Hits 2100 2101 +1
Misses 282 282
Continue to review full report at Codecov.
|
Thanks, but this will break (again) my PR #395. Do you think you would be able to review it before pushing this one? |
Sure, let's get #395 in before this. I'm not too familiar with the internals of Tablib and would rather stick to more general things like testing, so would rather someone else reviewed it. I've left a comment on the PR's issue 👍 |
I still pushed the isort part as it is less invasive that black. |
Any idea why current master fails with isort? (cannot reproduce locally) |
Probably because it's missing the isort config changes in known_third_party = ["MarkupPy", "odf", "openpyxl", "pkg_resources", "setuptools", "tablib", "xlrd", "xlwt", "yaml"] I suggest always making a PR and only committing directly to |
Thanks for the tip and sorry for not using a PR for this change. |
You're welcome, and no problem :) |
Closing, will send new PRs. First Black, then another for Flake8. Will be easier to review separately. |
Fixes #401
Format code with Black
Add some Black-compatible config to
.flake8
sort imports with isort
pyproject.toml
, add new config to place nicely with BlackFix Flake8 errors
Remove some Python 2 code:
__cmp__
andcmp
Add Black/isort checks to tox and the CI
To autofix code locally:
pip install -U black isort black . isort -y
(I'll do pre-commit in another PR.)