-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add linting to GH action workflow #5
Conversation
I've been playing around trying to resolve the untyped mypy errors.
The problem here is this will create more errors:
I'm pretty sure there is a way to resolve the valid-type issue but I don't know how you would resolve the additional untyped-call. Because of my struggle with this hydra, I decided to ignore them for now unless there are ideas on how to resolve them. |
I've ran the ci jobs again and I don't see any error from running mypy. Here is an output I'm seeing from https://github.com/eth-educators/ethstaker-deposit-cli/actions/runs/8675308188/job/23881195586
I'm guessing you fixed everything related to mypy. |
@remyroy I didn't fix them, I just ignored them... |
I see. Thanks for the precision. |
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.
Having these type check ignore is not ideal but it's better to run mypy regularly and have it pass on everything else than not having it or running it with errors and ignoring those errors.
.github/workflows/runner.yml
Outdated
pip install -r requirements_test.txt | ||
- name: Run tests | ||
run: pytest tests | ||
- name: Run linter |
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.
mypy is not a linter. Having or adding a linter would be probably be great and it could be done in another PR.
I would rename this step to Run type checker
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
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.
Everything is good.
Include lint to GH action runner and ignore mypy issues for now.
I spent some time investigating but I believe each error is a result of an advanced inheritance model from py-ssz (https://github.com/ethereum/py-ssz/blob/main/ssz/sedes/byte_vector.py).
I wasn't able to find a reliable way to resolve these issues but I would rather ignore a few items than not have linting at all.