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

feat: add type annotations to zksync module #63

Closed
wants to merge 1 commit into from

Conversation

comilao
Copy link
Contributor

@comilao comilao commented Apr 12, 2024

What πŸ’»

  • This PR intends to add type annotations to the zksync module
  • Fixes Running Tests section in README.md based on this workflow

Why βœ‹

  • As mentioned in this issue, adding an external module by attach_modules does not provide type annotations

Evidence πŸ“·

Before this change, hovering over zksync, it shows
zksync_Any
After this change, hovering over zksync, it shows
zksync_Zksync
This provides useful function hints in the code editor
useful_function_hints

Notes πŸ“

  • Any notes/thoughts that the reviewers should know prior to reviewing the code?
  • It's my first PR to the open-source world ever, please be patient with me if I did something wrong. Thank you in advance πŸ™

@comilao comilao requested a review from a team as a code owner April 12, 2024 14:14
@petarTxFusion
Copy link
Contributor

Could you update this branch with latests changes so that test can pass? Thank you for your contributions

@comilao
Copy link
Contributor Author

comilao commented Apr 24, 2024

Could you update this branch with latests changes so that test can pass? Thank you for your contributions

Sorry about this.
Actually I am thinking of a big refactor plan.

  • isort to sort imports
  • flake8 linter to the code base
  • black for formatting
  • mypy for type hints

All of the above can be put inside pre-commit hook config file. We can update the CONTRIBUTING.md to ask contributors to install it and also add these checks it to the validate.yml GitHub Actions. How do you think about it?

@petarTxFusion
Copy link
Contributor

We are planing to refactor large part of the code in the near future which will resolve typing issues, we are trying to avoid other dependencies as much as possible plan is to use native typing. The main problem lies in the design itself. We are planning to go with External Modules and Custom Providers you can read more about it here

@comilao
Copy link
Contributor Author

comilao commented Apr 26, 2024

Thanks a lot for this comment. Glad to know your team will be revamping this repo, it really helps me a lot during my work. I have made another PR #68 to explain more about what I mean, sorry for the inconsiderate comments earlier, I can also help with some tasks if you needed help. I will also close this PR first.
(BTW, I'm a QA automation engineer, so if you need, I can help with writing more test cases)

@comilao comilao closed this Apr 26, 2024
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