aio-libs / aiomysql

aiomysql is a library for accessing a MySQL database from the asyncio
https://aiomysql.rtfd.io
MIT License
1.73k stars 253 forks source link

Modernize code with `pyupgrade --py37-plus` #930

Closed Nothing4You closed 1 year ago

Nothing4You commented 1 year ago

What do these changes do?

Modernize code to Python 3.7+ syntax.

Are there changes in behavior for the user?

Backwards compatibility to versions below Python 3.7 may get lost if this didn't already happen previously.

Related issue number

-

Checklist

codecov[bot] commented 1 year ago

Codecov Report

Merging #930 (98ad0fe) into master (7ddfd3f) will decrease coverage by 0.04%. The diff coverage is 86.36%.

@@            Coverage Diff             @@
##           master     #930      +/-   ##
==========================================
- Coverage   93.68%   93.64%   -0.04%     
==========================================
  Files          36       36              
  Lines        5538     5538              
  Branches      895      895              
==========================================
- Hits         5188     5186       -2     
- Misses        260      262       +2     
  Partials       90       90              
Flag Coverage Δ
CI-GHA 93.24% <86.36%> (-0.04%) :arrow_down:
DB-mariadb-10.3 90.30% <86.36%> (ø)
DB-mariadb-10.4 90.30% <86.36%> (ø)
DB-mariadb-10.5 90.28% <86.36%> (ø)
DB-mariadb-10.6 90.28% <86.36%> (ø)
DB-mariadb-10.7 90.28% <86.36%> (ø)
DB-mariadb-10.8 90.28% <86.36%> (ø)
DB-mysql-5.7 90.98% <86.36%> (ø)
DB-mysql-8.0 92.37% <81.81%> (-0.04%) :arrow_down:
OS-Linux 93.24% <86.36%> (-0.04%) :arrow_down:
Py-3.10.11 93.15% <86.36%> (ø)
Py-3.11.3 93.15% <86.36%> (-0.04%) :arrow_down:
Py-3.7.16 92.78% <86.36%> (ø)
Py-3.8.16 93.18% <86.36%> (ø)
Py-3.9.16 93.02% <86.36%> (ø)
VM-ubuntu-latest 93.24% <86.36%> (-0.04%) :arrow_down:
ubuntu-latest_3.10_mariadb-10.3 90.21% <86.36%> (ø)
ubuntu-latest_3.10_mariadb-10.4 90.21% <86.36%> (ø)
ubuntu-latest_3.10_mariadb-10.5 90.19% <86.36%> (ø)
ubuntu-latest_3.10_mariadb-10.6 90.19% <86.36%> (ø)
ubuntu-latest_3.10_mariadb-10.7 90.19% <86.36%> (ø)
ubuntu-latest_3.10_mariadb-10.8 90.19% <86.36%> (ø)
ubuntu-latest_3.10_mysql-5.7 90.89% <86.36%> (ø)
ubuntu-latest_3.10_mysql-8.0 92.28% <81.81%> (ø)
ubuntu-latest_3.11_mariadb-10.3 90.21% <86.36%> (ø)
ubuntu-latest_3.11_mariadb-10.4 90.21% <86.36%> (ø)
ubuntu-latest_3.11_mariadb-10.5 90.19% <86.36%> (ø)
ubuntu-latest_3.11_mariadb-10.6 90.19% <86.36%> (ø)
ubuntu-latest_3.11_mariadb-10.7 90.19% <86.36%> (ø)
ubuntu-latest_3.11_mariadb-10.8 90.19% <86.36%> (ø)
ubuntu-latest_3.11_mysql-5.7 90.89% <86.36%> (ø)
ubuntu-latest_3.11_mysql-8.0 92.28% <81.81%> (-0.04%) :arrow_down:
ubuntu-latest_3.7_mariadb-10.3 89.66% <86.36%> (ø)
ubuntu-latest_3.7_mariadb-10.4 89.66% <86.36%> (ø)
ubuntu-latest_3.7_mariadb-10.5 89.64% <86.36%> (ø)
ubuntu-latest_3.7_mariadb-10.6 89.64% <86.36%> (ø)
ubuntu-latest_3.7_mariadb-10.7 89.64% <86.36%> (ø)
ubuntu-latest_3.7_mariadb-10.8 89.64% <86.36%> (ø)
ubuntu-latest_3.7_mysql-5.7 90.39% <86.36%> (ø)
ubuntu-latest_3.7_mysql-8.0 91.86% <81.81%> (ø)
ubuntu-latest_3.8_mariadb-10.3 90.25% <86.36%> (ø)
ubuntu-latest_3.8_mariadb-10.4 90.25% <86.36%> (ø)
ubuntu-latest_3.8_mariadb-10.5 90.23% <86.36%> (ø)
ubuntu-latest_3.8_mariadb-10.6 90.23% <86.36%> (ø)
ubuntu-latest_3.8_mariadb-10.7 90.23% <86.36%> (ø)
ubuntu-latest_3.8_mariadb-10.8 90.23% <86.36%> (ø)
ubuntu-latest_3.8_mysql-5.7 90.94% <86.36%> (ø)
ubuntu-latest_3.8_mysql-8.0 92.31% <81.81%> (ø)
ubuntu-latest_3.9_mariadb-10.3 90.09% <86.36%> (ø)
ubuntu-latest_3.9_mariadb-10.4 90.09% <86.36%> (ø)
ubuntu-latest_3.9_mariadb-10.5 90.07% <86.36%> (ø)
ubuntu-latest_3.9_mariadb-10.6 90.07% <86.36%> (ø)
ubuntu-latest_3.9_mariadb-10.7 90.07% <86.36%> (ø)
ubuntu-latest_3.9_mariadb-10.8 90.07% <86.36%> (ø)
ubuntu-latest_3.9_mysql-5.7 90.77% <86.36%> (ø)
ubuntu-latest_3.9_mysql-8.0 92.15% <81.81%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
tests/conftest.py 87.00% <33.33%> (ø)
aiomysql/connection.py 84.26% <87.50%> (ø)
aiomysql/cursors.py 92.55% <100.00%> (ø)
aiomysql/sa/transaction.py 96.00% <100.00%> (ø)
tests/test_basic.py 98.11% <100.00%> (ø)
tests/test_issues.py 85.93% <100.00%> (-0.63%) :arrow_down:
tests/test_sha_connection.py 100.00% <100.00%> (ø)
tests/test_sscursor.py 98.75% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more