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

ci: (ruff) Add rule UP034 #1442

Merged
merged 4 commits into from
Aug 14, 2023
Merged

ci: (ruff) Add rule UP034 #1442

merged 4 commits into from
Aug 14, 2023

Conversation

kingiler
Copy link
Collaborator

@kingiler kingiler commented Aug 11, 2023

The rule is to avoid extraneous parentheses.

A bug was found when adding ruff rule UP034. The code intends to have a tuple of strings but a missing comma makes it becomes extraneous parentheses.

Base automatically changed from ruff_UP to main August 11, 2023 13:20
@kingiler kingiler self-assigned this Aug 11, 2023
@kingiler kingiler added CI Continuous Integration minor For minor PRs, easy and quick to review, quickly mergeable bug Something isn't working enhancement New feature or request labels Aug 11, 2023
@kingiler kingiler marked this pull request as ready for review August 11, 2023 13:23
@codecov
Copy link

codecov bot commented Aug 11, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (6bd7013) 90.02% compared to head (41521f8) 90.02%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1442   +/-   ##
=======================================
  Coverage   90.02%   90.02%           
=======================================
  Files         214      214           
  Lines       26666    26666           
  Branches     3964     3964           
=======================================
  Hits        24007    24007           
  Misses       2026     2026           
  Partials      633      633           
Files Changed Coverage Δ
xdsl/dialects/riscv.py 87.08% <100.00%> (ø)

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

@@ -2380,7 +2380,7 @@ def __init__(
@classmethod
def parse(cls, parser: Parser) -> AssemblySectionOp:
directive = parser.parse_str_literal()
attr_dict = parser.parse_optional_attr_dict_with_keyword(("directive"))
attr_dict = parser.parse_optional_attr_dict_with_keyword(("directive",))
Copy link
Member

Choose a reason for hiding this comment

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

Yay for python strings being iterables of string 😅

Copy link
Member

@superlopuh superlopuh left a comment

Choose a reason for hiding this comment

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

nice find

Copy link
Collaborator

@math-fehr math-fehr left a comment

Choose a reason for hiding this comment

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

👍

@math-fehr math-fehr merged commit d53eaf3 into main Aug 14, 2023
9 checks passed
@math-fehr math-fehr deleted the ruff_UP034 branch August 14, 2023 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working CI Continuous Integration enhancement New feature or request minor For minor PRs, easy and quick to review, quickly mergeable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants