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

DM-38425: Configure Ruff and fix things it found #255

Merged
merged 1 commit into from
May 12, 2023
Merged

Conversation

rra
Copy link
Member

@rra rra commented May 12, 2023

Ruff is an interesting new (and extremely fast) Python linter that replaces isort, flake8, and a whole bunch of plugins. Configure it with fairly aggressive settings but a lot of exclusions, and fix all the problems it found.

Most of these changes are converting Optional[type] to type | None. I previously was sticking with Optional in some specific cases, but given that Ruff can autofix all other uses of Union and the distinction I was drawing was very nitpicky, take this approach instead.

Ruff is an interesting new (and extremely fast) Python linter that
replaces isort, flake8, and a whole bunch of plugins. Configure it
with fairly aggressive settings but a lot of exclusions, and fix
all the problems it found.

Most of these changes are converting Optional[type] to type | None.
I previously was sticking with Optional in some specific cases, but
given that Ruff can autofix all other uses of Union and the
distinction I was drawing was very nitpicky, take this approach
instead.
@rra rra merged commit 092d825 into main May 12, 2023
@rra rra deleted the tickets/DM-38425 branch May 12, 2023 23:29
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.

1 participant