Skip to content
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

MNT: Add flake8-logging-format (G) rules to ruff #3242

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DimitriPapadopoulos
Copy link
Contributor

@DimitriPapadopoulos DimitriPapadopoulos commented Feb 29, 2024

Changes proposed in this pull request

ruff check --select G

Documentation that should be reviewed

Copy link

codecov bot commented Feb 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.06%. Comparing base (08fecee) to head (2e8298d).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3242   +/-   ##
=======================================
  Coverage   72.06%   72.06%           
=======================================
  Files          57       57           
  Lines        4231     4231           
  Branches      455      455           
=======================================
  Hits         3049     3049           
  Misses       1067     1067           
  Partials      115      115           

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

@effigies
Copy link
Member

effigies commented Mar 4, 2024

I'm not sure why we should care about this.

@DimitriPapadopoulos
Copy link
Contributor Author

DimitriPapadopoulos commented Mar 4, 2024

The linter recommends that because that's what many programmers suggest: defer string interpolation to the log function so that string interpolation doesn't occur whenever the log function doesn't print at the current log level. So that would be a performance issue. The rationale is that the speed gain when deferring string interpolation with terse logging outwheighs the speed gain of f-strings with verbose logging. Other programmers don't agree.

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