fix ruff errors - #1263
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
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.pyscript.
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.
| paramstyle = "pyformat" | ||
|
|
||
| from . import connections # noqa: E402 | ||
| from . import connections |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.