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

style: Activated Mypy Checks and Code Update for Compliance #58

Merged
merged 2 commits into from
Jan 23, 2024

Conversation

uwcdc
Copy link
Member

@uwcdc uwcdc commented Jan 23, 2024

This pull request introduces the activation of Mypy checks in our pre-commit configuration and updates the existing codebase to comply with Mypy standards.

  1. Mypy Activation: Mypy, a static type checker for Python, has been added to our pre-commit hooks. This will help us catch potential errors at compile time by checking the type annotations in our Python code. This enhances the robustness of our code and aids in maintaining high code quality.
  2. Code Update for Mypy Compliance: The existing codebase has been updated to comply with Mypy standards. Type annotations have been added where necessary, and any type mismatches identified by Mypy have been corrected. This not only makes our code Mypy-compliant but also improves its readability and maintainability by making the expected types explicit.
  3. Testing: The changes have been thoroughly tested to ensure that the addition of type checks and the modifications to the code do not introduce any regressions. The changes were also tested to ensure that the pre-commit passes ALL necessary checks.

These changes mark a significant step towards improving our code quality checks and ensuring the reliability of our code. By enforcing type checks at the development stage, we can catch and fix potential issues earlier in the development process.

@uwcdc uwcdc requested a review from lsetiawan January 23, 2024 02:07
Copy link

codecov bot commented Jan 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (a0e76f6) 89.51% compared to head (cec08be) 89.51%.

Additional details and impacted files
@@           Coverage Diff           @@
##             mypy      #58   +/-   ##
=======================================
  Coverage   89.51%   89.51%           
=======================================
  Files          36       36           
  Lines        1955     1955           
=======================================
  Hits         1750     1750           
  Misses        205      205           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lsetiawan lsetiawan changed the base branch from dev to mypy January 23, 2024 17:45
Copy link
Member

@lsetiawan lsetiawan left a comment

Choose a reason for hiding this comment

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

Nice work @uwcdc! I think this all looks great and ready to merge!

@lsetiawan lsetiawan changed the title fix: Activation of Mypy Checks and Code Update for Compliance style: Activated Mypy Checks and Code Update for Compliance Jan 23, 2024
@lsetiawan lsetiawan merged commit 4288721 into uw-ssec:mypy Jan 23, 2024
13 checks passed
lsetiawan added a commit that referenced this pull request Jan 23, 2024
…ela-Institute#148)

* style: Activated Mypy Checks and Code Update for Compliance (#58)

* fix: mypy compliance

* style: pre-commit fixes

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* ci: Update .pre-commit-config.yaml

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Don Setiawan <[email protected]>
@lsetiawan lsetiawan linked an issue Jan 23, 2024 that may be closed by this pull request
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.

fix: Fix mypy related errors
2 participants