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

Update ruff linter rules according to documentation #940

Merged
merged 1 commit into from
Jul 5, 2024

Conversation

collindutter
Copy link
Member

Describe your changes

Enables more ruff linting rules as suggested by the documentation. Also disables some that interfere with some core functionality. We can evaluate removing these in the future.

Issue ticket number and link

NA.

@collindutter collindutter requested a review from a team July 5, 2024 16:16
@collindutter collindutter requested review from vasinov, vachillo and dylanholmes and removed request for a team July 5, 2024 16:25
@collindutter collindutter force-pushed the fix/ruff-rules branch 2 times, most recently from ec06bb0 to 7266f64 Compare July 5, 2024 16:28
@collindutter
Copy link
Member Author

I'm on the fence about SIM108, but I think i'm leaning towards including it for consistency.

Copy link
Contributor

@dylanholmes dylanholmes left a comment

Choose a reason for hiding this comment

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

Love the consistency

@@ -55,7 +55,7 @@ def try_load_file(self, path: str) -> bytes:
return response["Body"].read()
except botocore.exceptions.ClientError as e:
if e.response["Error"]["Code"] in {"NoSuchKey", "404"}:
raise FileNotFoundError
raise FileNotFoundError from e
Copy link
Contributor

Choose a reason for hiding this comment

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

TIL - I've actually never seen this syntax before, cool!

@@ -200,7 +200,22 @@ line-length = 120
skip-magic-trailing-comma = true

[tool.ruff.lint]
select = ["E4", "E7", "E9", "F", "TID251"]
select = [
"E", # pycodestyle
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for adding the comments!

@collindutter collindutter merged commit 3e5bd03 into dev Jul 5, 2024
11 of 12 checks passed
@collindutter collindutter deleted the fix/ruff-rules branch July 5, 2024 19:27
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