newrelic / newrelic-python-agent

New Relic Python Agent
https://docs.newrelic.com/docs/agents/python-agent
Apache License 2.0
176 stars 99 forks source link

Convert String Formatting to f-strings with Flynt #1200

Closed TimPansino closed 3 weeks ago

TimPansino commented 1 month ago

Overview

Note: There still exist quite a few % style string interpolations. They're used for the following:

Testing

Final flynt command used, which can be run for validation:

flynt -ll 999 -a -tc -tj ./ --exclude newrelic/packages/
github-actions[bot] commented 1 month ago

🦙 MegaLinter status: ❌ ERROR

Descriptor Linter Files Fixed Errors Elapsed time
❌ PYTHON bandit 120 8 22.78s
✅ PYTHON black 374 161 0 28.61s
❌ PYTHON flake8 374 217 10.53s
✅ PYTHON isort 374 193 0 1.14s
❌ PYTHON pylint 374 755 96.53s

See detailed report in MegaLinter reports _Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff_

_MegaLinter is graciously provided by OX Security_

codecov-commenter commented 1 month ago

Codecov Report

Attention: Patch coverage is 70.28754% with 93 lines in your changes missing coverage. Please review.

Please upload report for BASE (develop-remove-python27@3173305). Learn more about missing BASE report.

Files with missing lines Patch % Lines
newrelic/core/application.py 16.66% 20 Missing :warning:
newrelic/api/transaction.py 50.00% 16 Missing :warning:
newrelic/core/agent.py 7.69% 12 Missing :warning:
newrelic/network/addresses.py 0.00% 4 Missing :warning:
newrelic/bootstrap/sitecustomize.py 0.00% 3 Missing :warning:
newrelic/api/graphql_trace.py 0.00% 2 Missing :warning:
newrelic/common/object_names.py 50.00% 2 Missing :warning:
newrelic/core/config.py 81.81% 2 Missing :warning:
newrelic/core/profile_sessions.py 0.00% 2 Missing :warning:
newrelic/hooks/application_gearman.py 0.00% 2 Missing :warning:
... and 27 more
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop-remove-python27 #1200 +/- ## ========================================================== Coverage ? 81.43% ========================================================== Files ? 196 Lines ? 21487 Branches ? 3743 ========================================================== Hits ? 17499 Misses ? 2872 Partials ? 1116 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.