Skip to content

Enable flake8-logging-rules (G) in ruff #1202

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

ml-evs
Copy link
Member

@ml-evs ml-evs commented May 19, 2025

Related to #971, this PR enables the flake8-logging-rules set in Ruff. The main change is preventing eagerly formatted strings in cases where the logger does not need to output anything, e.g., LOGGER.debug(f"Hard to compute thing: {hard_to_compute_thing}") which will run even if the logger is not in debug mode.

Copy link

codecov bot commented May 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.90%. Comparing base (8db3501) to head (6ac3486).
Report is 7 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1202   +/-   ##
=======================================
  Coverage   70.90%   70.90%           
=======================================
  Files          64       64           
  Lines        4276     4276           
=======================================
  Hits         3032     3032           
  Misses       1244     1244           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link

cypress bot commented May 19, 2025

datalab    Run #3349

Run Properties:  status check passed Passed #3349  •  git commit ed3acdf83c ℹ️: Merge 6ac34866b1112eca311bf8d1a75922f6b821df7d into 8db350181d76c9c7dc5e326ade60...
Project datalab
Branch Review ml-evs/ruff-logging
Run status status check passed Passed #3349
Run duration 11m 03s
Commit git commit ed3acdf83c ℹ️: Merge 6ac34866b1112eca311bf8d1a75922f6b821df7d into 8db350181d76c9c7dc5e326ade60...
Committer Matthew Evans
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 504
View all changes introduced in this branch ↗︎

@ml-evs ml-evs added the blocked label May 19, 2025
@ml-evs ml-evs marked this pull request as draft May 20, 2025 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant