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

Additional ruff rules and fixes #2176

Closed
wants to merge 0 commits into from
Closed

Conversation

martinhoyer
Copy link
Collaborator

These are just simple non-breaking (I think) changes needed to be able to enable a few more cool checks.
Not much to comment, in addition to what's written in the commits. Few notes:

  • converting a couple of TypedDicts from function to class syntax
  • # coding: utf-8 is redundant on Python 3
  • a few parameters had implicit "Optional" annotation (policed by RUF013)
    • if these parameters are not supposed to be optional, there should not be a None by default.

assert expected_value == actual_value, (f"Attribute mismatch at {tree_path_joined}: "
f"found {actual_name}=\"{actual_value}\"")
assert expected_name == actual_name, (f'Attribute mismatch at {tree_path_joined}: '
f'expected {expected_name}="{expected_value}"')
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It would be cool to standardize single or double quotes by default.
Q000 rule(currently disabled) can be configured to preferred single/double quote style.

@martinhoyer martinhoyer mentioned this pull request Jun 27, 2023
@martinhoyer martinhoyer self-assigned this Jun 27, 2023
@martinhoyer martinhoyer changed the title Additional ruff rules and fixes Python 3.9 syntax; Enable pyupgrade ruff check Nov 10, 2023
@martinhoyer martinhoyer changed the title Python 3.9 syntax; Enable pyupgrade ruff check Additional ruff rules and fixes Nov 10, 2023
@martinhoyer martinhoyer deleted the ruff branch November 10, 2023 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant