Enable ruff LOG (flake8-logging) rules#1695
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1695 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 26 26
Lines 4166 4166
=========================================
Hits 4166 4166 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@bluetoothbot rebase |
Rebase with requested adjustmentsBranch StatsActions performed
CI statusCI will be checked asynchronously. Automated by Kōan |
c566a69 to
3a50a14
Compare
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR extends the repository’s Ruff lint configuration by enabling the LOG (flake8-logging) rule family, continuing the project’s “one rule family per PR” cadence and aiming to prevent future logging anti-patterns.
Changes:
- Enable Ruff’s
LOGrule family by adding"LOG"to[tool.ruff.lint].selectinpyproject.toml.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "LOG", # flake8-logging | ||
| "PERF", # Perflint | ||
| "PGH", # pygrep-hooks | ||
| "PIE", # flake8-pie |
| "G", # flake8-logging-format | ||
| "I", # isort | ||
| "ISC", # flake8-implicit-str-concat | ||
| "LOG", # flake8-logging |
What
Enable the
LOG(flake8-logging) rule family in ruff. Codebase currently has zero violations.Why
Continues the established one-ruff-family-per-PR cadence (PERF → PTH #1678 → PT006/PT007 #1679 → B #1683 → PGH #1684 → DTZ #1694).
LOGcatches logging anti-patterns distinct fromG(flake8-logging-format) which is already enabled —Gchecks format strings,LOGchecks logger usage patterns (e.g.logging.warnaliases,getLoggerarg shape,.exception()outside except blocks,exc_infousage).Especially valuable here: this is a network library with extensive logging across
connection.py,client_base.py, and the frame helpers — fencing future logging code against these footguns at zero migration cost.How
One-line addition to
[tool.ruff.lint] selectinpyproject.toml, inserted alphabetically betweenIandPERF. No code changes needed (zero existing violations).Testing
ruff check .— all checks passedruff format --check .— 61 files already formattedpython -m pytest tests/— 1117 passed, 2 skippedTypes of changes
Quality Report
Changes: 1 file changed, 1 insertion(+)
Code scan: clean
Tests: failed (FAILED)
Branch hygiene: clean
Generated by Kōan post-mission quality pipeline