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

Add pydcostyle + pylint in ruff rules #298

Merged
merged 3 commits into from
Nov 29, 2023
Merged

Add pydcostyle + pylint in ruff rules #298

merged 3 commits into from
Nov 29, 2023

Conversation

purva-thakre
Copy link
Collaborator

@purva-thakre purva-thakre commented Nov 28, 2023

Description

Fixes #286

Todos

Notable points that this PR has either accomplished or will accomplish.

Edit: Removed checklist.

Questions

  • Question1

Status

  • Ready to go

Copy link

codecov bot commented Nov 28, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (200f3dc) 98.1% compared to head (21a0450) 98.1%.

Additional details and impacted files
@@          Coverage Diff           @@
##           master    #298   +/-   ##
======================================
  Coverage    98.1%   98.1%           
======================================
  Files         295     295           
  Lines        6919    6919           
  Branches      771     771           
======================================
  Hits         6790    6790           
  Misses         89      89           
  Partials       40      40           

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

@purva-thakre
Copy link
Collaborator Author

purva-thakre commented Nov 28, 2023

@vprusso I am choosing to ignore PLR2004 because 2841708 led to a drop in code coverage.

https://docs.astral.sh/ruff/rules/magic-value-comparison/

I think it's fine to ignore this because I personally can't understand the need to define dim = 2 to replace if dim_something < 2 : with if dim_something < dim :

If you would prefer follow this rule, I can create an issue to remove this rule from ignore after #293, #294 and #240 are completed.

@purva-thakre purva-thakre marked this pull request as ready for review November 28, 2023 23:45
@vprusso
Copy link
Owner

vprusso commented Nov 29, 2023

@vprusso I am choosing to ignore PLR2004 because 2841708 led to a drop in code coverage.

https://docs.astral.sh/ruff/rules/magic-value-comparison/

I think it's fine to ignore this because I personally can't understand the need to define dim = 2 to replace if dim_something < 2 : with if dim_something < dim :

If you would prefer follow this rule, I can create an issue to remove this rule from ignore after #293, #294 and #240 are completed.

Right! I was kind of thinking the same thing. I mean, I guess it often does make sense to not have "magic numbers" floating around. However, checking if something is equal to a given value like if X < 0 is flagged seems a bit crazy!

Agreed, and thank you for making that change!

Copy link
Owner

@vprusso vprusso left a comment

Choose a reason for hiding this comment

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

Went through the changes and LGTM! MWR! 🚀

@purva-thakre purva-thakre merged commit ffa9165 into master Nov 29, 2023
3 checks passed
@purva-thakre purva-thakre deleted the ruff_pydocstyle branch November 29, 2023 01:44
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