Skip to content

code cleanup and reformat #423

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

Merged
merged 7 commits into from
Jan 20, 2020
Merged

code cleanup and reformat #423

merged 7 commits into from
Jan 20, 2020

Conversation

jnozsc
Copy link
Contributor

@jnozsc jnozsc commented Jan 16, 2020

in this PR.
I did

  • apply black to the code base, this is from PSF.
  • apply flake8 to the code base, with only 3 ignore cases (E203, E501, W503):
    1. E203 Whitespace before ':' there is a section talking about why we choose to ignore this
    1. E501 Line too long. I try my best to reformat all long strings, but for some error message, I add #noqa: E501 to it
    1. W503 Line break occurred before a binary operator . I have already fixed all cases, so flake8 should not complain about it. just keep this here, since black recommend
  • remove/modify some python2 back compatibility codes, such as u"unicode_string" -> "unicode", since python2 support has been dropped
  • leave docs/conf.py alone, since there are some #comment_me = True codes for the configuration
  • add black and flake8 to travis

@lgtm-com
Copy link
Contributor

lgtm-com bot commented Jan 16, 2020

This pull request introduces 3 alerts and fixes 3 when merging 037ee3c into 0f1ff4c - view on LGTM.com

new alerts:

  • 3 for Explicit export is not defined

fixed alerts:

  • 2 for Unused import
  • 1 for 'import *' may pollute namespace

@lgtm-com
Copy link
Contributor

lgtm-com bot commented Jan 16, 2020

This pull request fixes 3 alerts when merging e70f362 into 0f1ff4c - view on LGTM.com

fixed alerts:

  • 2 for Unused import
  • 1 for 'import *' may pollute namespace

@lgtm-com
Copy link
Contributor

lgtm-com bot commented Jan 16, 2020

This pull request fixes 3 alerts when merging 30f0814 into 0f1ff4c - view on LGTM.com

fixed alerts:

  • 2 for Unused import
  • 1 for 'import *' may pollute namespace

@codecov
Copy link

codecov bot commented Jan 16, 2020

Codecov Report

Merging #423 into master will decrease coverage by 0.16%.
The diff coverage is 74.56%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #423      +/-   ##
==========================================
- Coverage   86.75%   86.59%   -0.17%     
==========================================
  Files          12       12              
  Lines        1533     1537       +4     
==========================================
+ Hits         1330     1331       +1     
- Misses        203      206       +3
Impacted Files Coverage Δ
MySQLdb/_exceptions.py 100% <ø> (ø) ⬆️
MySQLdb/constants/ER.py 97.05% <0%> (-0.12%) ⬇️
MySQLdb/constants/CR.py 0% <0%> (ø) ⬆️
MySQLdb/times.py 100% <100%> (ø) ⬆️
MySQLdb/constants/__init__.py 100% <100%> (ø) ⬆️
MySQLdb/constants/CLIENT.py 100% <100%> (ø) ⬆️
MySQLdb/connections.py 81.25% <75%> (-0.57%) ⬇️
MySQLdb/converters.py 82.35% <77.77%> (ø) ⬆️
MySQLdb/cursors.py 80.93% <88%> (+0.31%) ⬆️
MySQLdb/__init__.py 81.81% <90%> (-1.52%) ⬇️
... and 1 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 0f1ff4c...eab8bcb. Read the comment docs.

@lgtm-com
Copy link
Contributor

lgtm-com bot commented Jan 16, 2020

This pull request fixes 3 alerts when merging ae4757d into 0f1ff4c - view on LGTM.com

fixed alerts:

  • 2 for Unused import
  • 1 for 'import *' may pollute namespace

@jnozsc
Copy link
Contributor Author

jnozsc commented Jan 17, 2020

for the Codacy test, I check the line which it complain on, it seems I format the line from single quotes to double quotes, and it just alert something as new. but in fact, the issue exists before I modify.

Co-Authored-By: Inada Naoki <[email protected]>
@lgtm-com
Copy link
Contributor

lgtm-com bot commented Jan 17, 2020

This pull request fixes 3 alerts when merging eab8bcb into 0f1ff4c - view on LGTM.com

fixed alerts:

  • 2 for Unused import
  • 1 for 'import *' may pollute namespace

@methane methane merged commit 18163d7 into PyMySQL:master Jan 20, 2020
@methane
Copy link
Member

methane commented Jan 20, 2020

Thank you.

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