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

Ruff Linting (Bugbear & Bandit) #1319

Open
wants to merge 27 commits into
base: main
Choose a base branch
from
Open

Ruff Linting (Bugbear & Bandit) #1319

wants to merge 27 commits into from

Conversation

TimPansino
Copy link
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
Copy link

github-actions bot commented Mar 4, 2025

🦙 MegaLinter status: ❌ ERROR

Descriptor Linter Files Fixed Errors Elapsed time
⚠️ MARKDOWN markdownlint 19 5 14 1.09s
❌ MARKDOWN markdown-link-check 19 12 88.53s
✅ PYTHON ruff 881 0 0 0.45s
✅ RST rstcheck 2 0 4.45s
✅ RST rstfmt 2 1 0 1.78s
✅ RST rst-lint 2 0 1.15s
✅ YAML prettier 10 1 0 1.05s
✅ YAML v8r 10 0 4.83s
✅ YAML yamllint 10 0 0.56s

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 label Mar 4, 2025
@codecov-commenter
Copy link

codecov-commenter commented Mar 4, 2025

Codecov Report

Attention: Patch coverage is 57.62712% with 50 lines in your changes missing coverage. Please review.

Project coverage is 81.21%. Comparing base (eb8d44b) to head (a1c3402).

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/hooks/external_botocore.py 58.82% 5 Missing and 2 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/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 4 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1319      +/-   ##
==========================================
- Coverage   81.36%   81.21%   -0.15%     
==========================================
  Files         203      203              
  Lines       22641    22674      +33     
  Branches     3574     3588      +14     
==========================================
- Hits        18421    18414       -7     
- Misses       3029     3059      +30     
- Partials     1191     1201      +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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants