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

Remove Python 2 code #410

Merged
merged 7 commits into from
Oct 20, 2019
Merged

Remove Python 2 code #410

merged 7 commits into from
Oct 20, 2019

Conversation

hugovk
Copy link
Member

@hugovk hugovk commented Oct 19, 2019

Some extra cleanup for #390.

@codecov
Copy link

codecov bot commented Oct 19, 2019

Codecov Report

Merging #410 into master will increase coverage by 7.36%.
The diff coverage is 95.08%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #410      +/-   ##
==========================================
+ Coverage   80.81%   88.17%   +7.36%     
==========================================
  Files          22       24       +2     
  Lines        1647     2385     +738     
==========================================
+ Hits         1331     2103     +772     
+ Misses        316      282      -34
Impacted Files Coverage Δ
src/tablib/packages/dbfpy/dbfnew.py 97.61% <ø> (ø) ⬆️
src/tablib/packages/dbfpy/utils.py 90% <ø> (+41.61%) ⬆️
src/tablib/formats/_rst.py 93.8% <100%> (ø) ⬆️
src/tablib/formats/_html.py 100% <100%> (ø) ⬆️
src/tablib/formats/_xlsx.py 83.52% <100%> (ø) ⬆️
tests/test_tablib_dbfpy_packages_utils.py 100% <100%> (ø)
src/tablib/formats/_jira.py 100% <100%> (ø) ⬆️
src/tablib/core.py 81.44% <20%> (+3.61%) ⬆️
src/tablib/packages/dbfpy/fields.py 67.81% <50%> (+0.2%) ⬆️
tests/test_tablib.py 98.35% <97.14%> (ø)
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 825de01...b8bff11. Read the comment docs.

@claudep
Copy link
Contributor

claudep commented Oct 19, 2019

I don't care so much, but replacing % placeholder syntax by format() brings nothing AFAIK in our case (contrary to the Python 3.6+ f-string syntax which might help for readability). But if you like this, feel free to go ahead with this patch.

@hugovk
Copy link
Member Author

hugovk commented Oct 20, 2019

format() is the more modern way in Python, and it's easier to use the pyupgrade defaults. We can run it again when dropping Python 3.5 and it'll do some f-string conversion too.


Also added some more tests, and include tests in coverage: https://nedbatchelder.com/blog/201908/dont_omit_tests_from_coverage.html

Copy link
Contributor

@claudep claudep left a comment

Choose a reason for hiding this comment

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

Thanks, nice progress for the coverage!

@hugovk hugovk merged commit 7879fef into jazzband:master Oct 20, 2019
@hugovk hugovk deleted the rm-2 branch October 20, 2019 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants