Skip to content

Enable pyflakes#1354

Merged
TimPansino merged 18 commits intomainfrom
fix-linter-pyflakes
May 23, 2025
Merged

Enable pyflakes#1354
TimPansino merged 18 commits intomainfrom
fix-linter-pyflakes

Conversation

@TimPansino
Copy link
Copy Markdown
Contributor

Overview

  • Enable pyflakes linter in ruff.
  • Fix all pyflakes violations.
  • Correct issues found in openai, kombu, and psycopg2 instrumentation (noticed due to linter violations).

@TimPansino TimPansino requested a review from a team as a code owner April 11, 2025 21:24
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 11, 2025

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ MARKDOWN markdownlint 7 0 0 0 1.1s
✅ MARKDOWN markdown-link-check 7 0 0 11.68s
✅ PYTHON ruff 905 0 0 0 0.85s
✅ PYTHON ruff-format 905 0 0 0 0.28s
✅ YAML prettier 13 0 0 0 1.16s
✅ YAML v8r 13 0 0 6.69s
✅ YAML yamllint 13 0 0 0.58s

See detailed report in MegaLinter reports

MegaLinter is graciously provided by OX Security

@TimPansino TimPansino force-pushed the fix-linter-pyflakes branch from d5546c8 to 4ef3072 Compare April 11, 2025 21:28
@mergify mergify bot added the tests-failing Tests failing in CI. label Apr 11, 2025
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 11, 2025

Codecov Report

Attention: Patch coverage is 59.37500% with 13 lines in your changes missing coverage. Please review.

Project coverage is 81.55%. Comparing base (612c671) to head (5573629).

Files with missing lines Patch % Lines
newrelic/hooks/database_psycopg2.py 0.00% 2 Missing and 2 partials ⚠️
newrelic/hooks/external_botocore.py 20.00% 4 Missing ⚠️
newrelic/api/out_function.py 0.00% 1 Missing ⚠️
newrelic/core/agent_control_health.py 0.00% 1 Missing ⚠️
newrelic/hooks/database_aiomysql.py 0.00% 1 Missing ⚠️
newrelic/hooks/framework_graphql.py 0.00% 1 Missing ⚠️
newrelic/hooks/mlmodel_langchain.py 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1354      +/-   ##
==========================================
+ Coverage   81.05%   81.55%   +0.49%     
==========================================
  Files         205      205              
  Lines       23216    23200      -16     
  Branches     3669     3671       +2     
==========================================
+ Hits        18817    18920     +103     
+ Misses       3186     3054     -132     
- Partials     1213     1226      +13     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mergify mergify bot added merge-conflicts Merge conflicts detected. tests-failing Tests failing in CI. and removed merge-conflicts Merge conflicts detected. tests-failing Tests failing in CI. labels Apr 17, 2025
@TimPansino TimPansino force-pushed the fix-linter-pyflakes branch from ff11cec to 6fa7eec Compare April 25, 2025 22:39
@mergify mergify bot added tests-failing Tests failing in CI. and removed tests-failing Tests failing in CI. labels Apr 25, 2025
@mergify mergify bot added the tests-failing Tests failing in CI. label May 5, 2025
@TimPansino TimPansino force-pushed the fix-linter-pyflakes branch from a96178a to f9765cb Compare May 12, 2025 16:05
@mergify mergify bot added tests-failing Tests failing in CI. and removed tests-failing Tests failing in CI. labels May 12, 2025
@TimPansino TimPansino force-pushed the fix-linter-pyflakes branch from 382ecba to 3d8517a Compare May 13, 2025 18:07
@mergify mergify bot removed the tests-failing Tests failing in CI. label May 14, 2025
@mergify mergify bot added the tests-failing Tests failing in CI. label May 19, 2025
@mergify mergify bot removed the tests-failing Tests failing in CI. label May 20, 2025
hmstepanek
hmstepanek previously approved these changes May 23, 2025

def __enter__(self):
transaction = current_transaction()
if not transaction:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's surprising to me that this has been wrong for so long but I don't actually see in the existing code where it is gated by this check higher up so this seems correct to me.

@mergify mergify bot added the merge-conflicts Merge conflicts detected. label May 23, 2025
@mergify mergify bot removed the merge-conflicts Merge conflicts detected. label May 23, 2025
@TimPansino TimPansino enabled auto-merge (squash) May 23, 2025 17:08
@mergify mergify bot added tests-failing Tests failing in CI. and removed tests-failing Tests failing in CI. labels May 23, 2025
@TimPansino TimPansino merged commit dfd95ab into main May 23, 2025
59 checks passed
@TimPansino TimPansino deleted the fix-linter-pyflakes branch May 23, 2025 22:23
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.

3 participants