Skip to content

Ruff Linting (Bugbear & Bandit)#1319

Merged
TimPansino merged 21 commits intomainfrom
fix-ruff-lint
Mar 26, 2025
Merged

Ruff Linting (Bugbear & Bandit)#1319
TimPansino merged 21 commits intomainfrom
fix-ruff-lint

Conversation

@TimPansino
Copy link
Copy Markdown
Contributor

@TimPansino TimPansino commented Mar 4, 2025

Overview

  • Enable bugbear and bandit linters.
  • Fix or ignore all issues with bugbear and bandit.
    • Remove old nosec comments.
  • Add stacklevel=2 to warnings, up from default of 1.
    • Provides users with additional stack context when warnings are emitted.

@TimPansino TimPansino requested a review from a team as a code owner March 4, 2025 00:38
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 4, 2025

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ MARKDOWN markdownlint 7 0 0 0 0.79s
✅ MARKDOWN markdown-link-check 7 0 0 14.37s
✅ PYTHON ruff 881 0 0 0 0.31s
✅ PYTHON ruff-format 881 0 0 0 0.2s
✅ YAML prettier 10 0 0 0 0.85s
✅ YAML v8r 10 0 0 5.18s
✅ YAML yamllint 10 0 0 0.54s

See detailed report in MegaLinter reports

MegaLinter is graciously provided by OX Security

@TimPansino TimPansino force-pushed the fix-ruff-lint branch 4 times, most recently from 0094570 to 4f6bbec Compare March 4, 2025 01:29
@mergify mergify Bot added the tests-failing Tests failing in CI. label Mar 4, 2025
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 4, 2025

Codecov Report

❌ Patch coverage is 56.86275% with 44 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.27%. Comparing base (5f4be34) to head (d54d42a).
⚠️ Report is 469 commits behind head on main.

Files with missing lines Patch % Lines
newrelic/config.py 0.00% 10 Missing ⚠️
newrelic/hooks/mlmodel_langchain.py 16.66% 0 Missing and 10 partials ⚠️
newrelic/api/error_trace.py 58.33% 3 Missing and 2 partials ⚠️
newrelic/api/message_trace.py 28.57% 3 Missing and 2 partials ⚠️
newrelic/common/system_info.py 0.00% 3 Missing ⚠️
newrelic/api/transaction.py 33.33% 1 Missing and 1 partial ⚠️
newrelic/hooks/external_botocore.py 60.00% 0 Missing and 2 partials ⚠️
newrelic/hooks/logger_loguru.py 0.00% 1 Missing and 1 partial ⚠️
newrelic/core/environment.py 0.00% 1 Missing ⚠️
newrelic/core/profile_sessions.py 0.00% 1 Missing ⚠️
... and 3 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1319      +/-   ##
==========================================
- Coverage   81.35%   81.27%   -0.08%     
==========================================
  Files         203      203              
  Lines       22641    22674      +33     
  Branches     3574     3588      +14     
==========================================
+ Hits        18419    18429      +10     
- Misses       3030     3043      +13     
- Partials     1192     1202      +10     

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mergify mergify Bot added merge-conflicts Merge conflicts detected. and removed merge-conflicts Merge conflicts detected. labels Mar 24, 2025
@mergify mergify Bot added merge-conflicts Merge conflicts detected. and removed tests-failing Tests failing in CI. merge-conflicts Merge conflicts detected. labels Mar 25, 2025
@TimPansino TimPansino merged commit 5908463 into main Mar 26, 2025
56 of 57 checks passed
@TimPansino TimPansino deleted the fix-ruff-lint branch March 26, 2025 20:10
@hmstepanek hmstepanek added this to the v10.8.0 milestone Mar 27, 2025
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.

4 participants