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: Enable most "E" rules for Ruff #579

Merged
merged 1 commit into from
May 29, 2024
Merged

Conversation

ajay-sentry
Copy link
Contributor

Purpose/Motivation

Part of the Lint Enhancement epic, codecov/engineering-team#1716, this PR aims to add a majority of the E rules to our ruff setup.

The ruff "E" rules are the "error" rules for the pycodestyle package. A majority of the fixes in this PR were for rules E721 and E722, around using type == instead of instanceof() and using bare excepts vs. explicit excepts.

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 May 22, 2024 21:47
@codecov-qa
Copy link

codecov-qa bot commented May 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.40%. Comparing base (ad629f2) to head (3ab3ddc).

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #579      +/-   ##
==========================================
- Coverage   91.40%   91.40%   -0.01%     
==========================================
  Files         604      604              
  Lines       16052    16051       -1     
==========================================
- Hits        14672    14671       -1     
  Misses       1380     1380              
Flag Coverage Δ
unit 91.40% <100.00%> (-0.01%) ⬇️
unit-latest-uploader 91.40% <100.00%> (-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 Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.40%. Comparing base (ad629f2) to head (3ab3ddc).

✅ All tests successful. No failed tests found ☺️

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #579      +/-   ##
==========================================
- Coverage   91.40%   91.40%   -0.01%     
==========================================
  Files         604      604              
  Lines       16052    16051       -1     
==========================================
- Hits        14672    14671       -1     
  Misses       1380     1380              
Flag Coverage Δ
unit 91.40% <100.00%> (-0.01%) ⬇️
unit-latest-uploader 91.40% <100.00%> (-0.01%) ⬇️

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

Files Coverage Δ
codecov_auth/helpers.py 75.67% <100.00%> (ø)
...re/commands/commit/interactors/get_file_content.py 100.00% <100.00%> (ø)
graphql_api/types/impacted_file/impacted_file.py 100.00% <100.00%> (ø)
graphql_api/views.py 97.02% <100.00%> (ø)
graphs/mixins.py 100.00% <100.00%> (ø)
graphs/views.py 94.36% <100.00%> (ø)
services/comparison.py 99.00% <100.00%> (ø)
services/profiling.py 100.00% <100.00%> (ø)
services/yaml.py 100.00% <100.00%> (ø)
webhook_handlers/views/github.py 99.05% <100.00%> (ø)

Impacted file tree graph

Copy link

codecov bot commented May 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.86%. Comparing base (ad629f2) to head (3ab3ddc).

Changes have been made to critical files, which contain lines commonly executed in production. Learn more

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@          Coverage Diff          @@
##            main    #579   +/-   ##
=====================================
  Coverage   95.86   95.86           
=====================================
  Files        782     782           
  Lines      17370   17369    -1     
=====================================
- Hits       16651   16650    -1     
  Misses       719     719           
Flag Coverage Δ
unit 91.40% <100.00%> (-0.01%) ⬇️
unit-latest-uploader 91.40% <100.00%> (-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.

Copy link
Contributor

@spalmurray-codecov spalmurray-codecov left a comment

Choose a reason for hiding this comment

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

lgtm

@ajay-sentry ajay-sentry added this pull request to the merge queue May 29, 2024
Merged via the queue into main with commit 232d97a May 29, 2024
21 of 22 checks passed
@ajay-sentry ajay-sentry deleted the Ajay/enable-most-e-rules-ruff branch May 29, 2024 16:34
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.

2 participants