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

dev: Add Ruff print rules to API (T20) #1107

Merged
merged 1 commit into from
Jan 24, 2025
Merged

Conversation

ajay-sentry
Copy link
Contributor

This PR aims to add the ruff print rules to API, and either removes or ignores each print statement (I just used my best judgement)

Ruff rules can be found here: https://docs.astral.sh/ruff/rules/#flake8-print-t20

Closes codecov/engineering-team#3279

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. In 2022 this entity acquired Codecov and as result Sentry is going to need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

@ajay-sentry ajay-sentry requested a review from a team as a code owner January 24, 2025 17:17
@@ -50,5 +50,5 @@ def execute(self, owner, current_owner):
owner.add_admin(current_owner)
return isAdmin or (current_owner.ownerid in admins)
except Exception as error:
print("Error Calling Admin Provider " + repr(error))
print("Error Calling Admin Provider " + repr(error)) # noqa: T201
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I ignored removing all the prints for the django commands

Copy link

codecov bot commented Jan 24, 2025

Codecov Report

Attention: Patch coverage is 22.22222% with 7 lines in your changes missing coverage. Please review.

Project coverage is 96.11%. Comparing base (914b22c) to head (75e8582).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
core/management/commands/update_gitlab_webhooks.py 0.00% 3 Missing ⚠️
core/management/commands/delete_rate_limit_keys.py 33.33% 2 Missing ⚠️
open_telemetry.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1107      +/-   ##
==========================================
+ Coverage   96.10%   96.11%   +0.01%     
==========================================
  Files         835      835              
  Lines       19576    19572       -4     
==========================================
- Hits        18813    18812       -1     
+ Misses        763      760       -3     
Flag Coverage Δ
unit 96.03% <22.22%> (+0.01%) ⬆️
unit-latest-uploader 96.03% <22.22%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@codecov-notifications
Copy link

codecov-notifications bot commented Jan 24, 2025

Codecov Report

Attention: Patch coverage is 22.22222% with 7 lines in your changes missing coverage. Please review.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
core/management/commands/update_gitlab_webhooks.py 0.00% 3 Missing ⚠️
core/management/commands/delete_rate_limit_keys.py 33.33% 2 Missing ⚠️
open_telemetry.py 0.00% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Contributor

✅ All tests successful. No failed tests were found.

📣 Thoughts on this report? Let Codecov know! | Powered by Codecov

@ajay-sentry ajay-sentry added this pull request to the merge queue Jan 24, 2025
Merged via the queue into main with commit e06c5d8 Jan 24, 2025
16 of 19 checks passed
@ajay-sentry ajay-sentry deleted the Ajay/ruff-print-rules branch January 24, 2025 17:43
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.

Add T20 Rules to API
3 participants