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 W, PLC, PLE Ruff Rules #591

Merged
merged 2 commits into from
May 31, 2024
Merged

Conversation

ajay-sentry
Copy link
Contributor

Purpose/Motivation

Part of the lint enhancement epic, this PR aims to add the Pycodestyle warning rules, and the Pylint Convention and Pylint Error rules.
These can be found here:

A majority of the fixes were related to whitespace (rules W291, and W293) as well as invalid escape sequences (W605)

There was a single instance of PLC3002, and a few instances of PLE0101

Links to relevant tickets

Closes codecov/engineering-team#1844

What does this PR do?

This PR adds the rules listed above and fixes any errors that stemmed from them.

Notes to Reviewer

Anything to note to the team? Any tips on how to review, or where to start?

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 review from a team as code owners May 30, 2024 21:38
@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!

@codecov-qa
Copy link

codecov-qa bot commented May 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.42%. Comparing base (a40c42b) to head (02f5605).

✅ All tests successful. No failed tests found.

@@           Coverage Diff           @@
##             main     #591   +/-   ##
=======================================
  Coverage   91.42%   91.42%           
=======================================
  Files         604      604           
  Lines       16100    16100           
=======================================
  Hits        14720    14720           
  Misses       1380     1380           
Flag Coverage Δ
unit 91.42% <100.00%> (ø)
unit-latest-uploader 91.42% <100.00%> (ø)

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

Files Coverage Δ
api/shared/repo/mixins.py 100.00% <100.00%> (ø)
codecov_auth/views/base.py 99.09% <100.00%> (ø)
core/migrations/0026_auto_20230605_1134.py 0.00% <ø> (ø)
graphql_api/dataloader/commit.py 100.00% <100.00%> (ø)
graphql_api/dataloader/comparison.py 98.43% <100.00%> (ø)
...y_migrations/migrations/0002_yaml_history_table.py 0.00% <ø> (ø)
...y_migrations/migrations/0003_auto_20230120_1837.py 0.00% <ø> (ø)
services/analytics.py 98.61% <100.00%> (ø)
upload/helpers.py 94.56% <ø> (ø)
upload/urls.py 100.00% <ø> (ø)

📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today!

Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.42%. Comparing base (a40c42b) to head (02f5605).

✅ All tests successful. No failed tests found ☺️

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #591   +/-   ##
=======================================
  Coverage   91.42%   91.42%           
=======================================
  Files         604      604           
  Lines       16100    16100           
=======================================
  Hits        14720    14720           
  Misses       1380     1380           
Flag Coverage Δ
unit 91.42% <100.00%> (ø)
unit-latest-uploader 91.42% <100.00%> (ø)

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

Files Coverage Δ
api/shared/repo/mixins.py 100.00% <100.00%> (ø)
codecov_auth/views/base.py 99.09% <100.00%> (ø)
core/migrations/0026_auto_20230605_1134.py 0.00% <ø> (ø)
graphql_api/dataloader/commit.py 100.00% <100.00%> (ø)
graphql_api/dataloader/comparison.py 98.43% <100.00%> (ø)
...y_migrations/migrations/0002_yaml_history_table.py 0.00% <ø> (ø)
...y_migrations/migrations/0003_auto_20230120_1837.py 0.00% <ø> (ø)
services/analytics.py 98.61% <100.00%> (ø)
upload/helpers.py 94.56% <ø> (ø)
upload/urls.py 100.00% <ø> (ø)

Impacted file tree graph

Copy link

codecov bot commented May 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.87%. Comparing base (a40c42b) to head (02f5605).

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff             @@
##               main       #591   +/-   ##
===========================================
  Coverage   95.87000   95.87000           
===========================================
  Files           782        782           
  Lines         17418      17418           
===========================================
  Hits          16699      16699           
  Misses          719        719           
Flag Coverage Δ
unit 91.42% <100.00%> (ø)
unit-latest-uploader 91.42% <100.00%> (ø)

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.

@ajay-sentry ajay-sentry added this pull request to the merge queue May 31, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 31, 2024
@ajay-sentry ajay-sentry added this pull request to the merge queue May 31, 2024
Merged via the queue into main with commit af18074 May 31, 2024
20 of 22 checks passed
@ajay-sentry ajay-sentry deleted the Ajay/ruff-w-ple-plc-rules branch May 31, 2024 16:55
This pull request was closed.
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 W, PLE, PLC Rules to API
3 participants