Skip to content

fix ruff errors - #1263

Merged
methane merged 2 commits into
PyMySQL:mainfrom
methane:fix-ruff
Aug 18, 2026
Merged

fix ruff errors#1263
methane merged 2 commits into
PyMySQL:mainfrom
methane:fix-ruff

Conversation

@methane

@methane methane commented Aug 18, 2026

Copy link
Copy Markdown
Member

No description provided.

@codecov

codecov Bot commented Aug 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.52%. Comparing base (1e28be8) to head (0ea11cd).
⚠️ Report is 64 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1263      +/-   ##
==========================================
- Coverage   86.24%   84.52%   -1.72%     
==========================================
  Files          17       17              
  Lines        2436     2469      +33     
  Branches      258      248      -10     
==========================================
- Hits         2101     2087      -14     
- Misses        249      304      +55     
+ Partials       86       78       -8     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates the codebase to address Ruff lint/style findings, largely through import reordering, minor refactors in tests, and a small configuration update to Ruff settings.

Changes:

  • Reorders imports and adjusts minor formatting across library code, tests, and docs to satisfy linting/style rules.
  • Refactors a few test assertions/exception checks to be more explicit (e.g., pytest.raises, assert_not_called()).
  • Updates Ruff configuration (ignore list + per-file ignores) and removes the legacy example.py script.

Reviewed changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/test_auth.py Import spacing tweak.
pyproject.toml Adjusts Ruff ignore rules and adds per-file ignores.
pymysql/times.py Import order cleanup.
pymysql/tests/test_SSCursor.py Import order cleanup.
pymysql/tests/test_optionfile.py Import grouping cleanup.
pymysql/tests/test_nextset.py Import order cleanup.
pymysql/tests/test_load_local.py Import order cleanup.
pymysql/tests/test_issues.py Tightens exception assertions and minor loop cleanup.
pymysql/tests/test_err.py Import order cleanup.
pymysql/tests/test_DictCursor.py Import order cleanup.
pymysql/tests/test_cursor.py Import order cleanup.
pymysql/tests/test_converters.py Removes extraneous blank line / spacing normalization.
pymysql/tests/test_connection.py Fixes mock assertions (assert_not_called()), import order cleanup.
pymysql/tests/test_basic.py Minor loop/range simplification and __all__ ordering.
pymysql/tests/base.py Import order cleanup.
pymysql/protocol.py Import order + minor __str__ formatting refactor.
pymysql/cursors.py Import order cleanup.
pymysql/converters.py Import order cleanup.
pymysql/connections.py Import order cleanup; uses contextlib.suppress in close().
pymysql/_auth.py Import order cleanup.
pymysql/init.py Reorders exports/imports; removes prior Ruff suppression comment.
example.py Removes legacy example script.
docs/source/conf.py Import order cleanup.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread pymysql/__init__.py
paramstyle = "pyformat"

from . import connections # noqa: E402
from . import connections
@methane
methane merged commit 7ccc6b3 into PyMySQL:main Aug 18, 2026
13 checks passed
@methane
methane deleted the fix-ruff branch August 18, 2026 03:53
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