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
ruff: bye-bye pylint #4732
ruff: bye-bye pylint #4732
Conversation
@@ -2,6 +2,14 @@ | |||
requires = ["setuptools", "wheel"] # PEP 508 specifications. | |||
|
|||
|
|||
[tool.ruff] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may want to add https://github.com/aws/aws-lambda-builders/blob/develop/pyproject.toml#L4 here too. Pylint is off by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to know! Ah, now there are errors to fix :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😎 sam-t is away ahead of cli regarding how many rules it comply: https://github.com/aws/serverless-application-model/blob/develop/ruff.toml#L4
90a6707
to
72afe35
Compare
@@ -1 +1 @@ | |||
pylint>=2.13.0,<3 | |||
ruff |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ruff is not very stable and keeps adding rules. We should try to ping the version otherwise once it adds a new rule the build might fail
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any build failures you have experienced? I'm gonna pin to 0.0.247 in that case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
they added too-many-arguments
in the past few weeks and when we upgrade there were many violations in sam-t codebase
@@ -83,6 +83,7 @@ param ( | |||
) | |||
|
|||
function Init { | |||
pip install -e '.[pre-dev]' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
curious about this change. I think our Makefile doesn't install the pre-dev ones:
Line 6 in e0d02ed
SAM_CLI_DEV=1 pip install -e '.[dev]' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe we have as many windows devs, so this might have gotten missed out, so I brought back the pre-dev step in there.
"integration_uri.py" = ["E501"] # ARNs are long. | ||
"app.py" = ["E501"] # Doc links are long. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like we should probably do per-line ignores if possible, rather than the whole file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack. its just those files that presented it here, so went with those files.
- This needs to move lower than it is at this point.
d52eaab
to
4975366
Compare
Which issue(s) does this change fix?
N/A
Why is this change necessary?
Get developer time back, ruff is insanely fast. Takes less than a second to run compared to pylint which is in the order of minutes.
What side effects does this change have?
N/A
Mandatory Checklist
PRs will only be reviewed after checklist is complete
make pr
passesmake update-reproducible-reqs
if dependencies were changedBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.