-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Modify precommit config yaml and change name of typing step to Typing + pylint. #49527
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
Modify precommit config yaml and change name of typing step to Typing + pylint. #49527
Conversation
.pre-commit-config.yaml
Outdated
hooks: | ||
- id: pylint | ||
- language: system | ||
- pass_filenames: false | ||
- stages: [manual] |
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.
this isn't quite right, check the mypy hook for an example of the syntax
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'm sorry, are the changes ok now?
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.
should be fine, thanks!
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.
Beyond the inline comment, it's not quite clear why more pylint codes need to be disabled..?
language: system | ||
stages: [manual] |
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.
What are the implications of these changes?
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.
it'll run like the mypy
one, only in CI
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.
merging as the affected checks all pass EDIT: github won't let me, let's see if #49538 solves this |
@@ -89,6 +89,7 @@ dependencies: | |||
- flake8-bugbear=22.7.1 # used by flake8, find likely bugs | |||
- isort>=5.2.1 # check that imports are in the right order | |||
- mypy=0.981 | |||
- pylint=2.15.5 |
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.
@MarcoGorelli is there a reason to add pylint to the env file? The check is still run through pre-commit, which will make install it in its own env?
(although that's also the case for black et al, and those are also here, so it's all OK, just wondering)
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.
pylint
can do some extra inference if it has everything built (hence a few extra checks that need to be turned off in this PR) - if it's only running in CI, then we might as well use the environment where pandas has been built (like we do for mypy
, that one also has language: system
)
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.
Ah, I missed the language: system
. Thanks for the explanation!
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.
🤔 though language: system
is less reliable, so maybe this should still run in its own little env...yeah let's do that, then the risk of it annoying contributors / maintainers is reduced
BTW, there is an actual failure:
|
Yup, fixed in #49537 |
A couple of us have had issues merging this one, not sure if the issue is on GitHub's side, but I've opened #49538 to take this forwards (and have kept @the-lazy-learner as the commit author) |
Modify the pre-commit config.yml file and change name of step in code-checks.yml. Possible attempt to resolve #49526
Please provide feedback an I'd try to incorporate those changes.