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

Update type hints #2192

Merged
merged 13 commits into from
Jul 8, 2024
Merged

Update type hints #2192

merged 13 commits into from
Jul 8, 2024

Conversation

AdeelH
Copy link
Collaborator

@AdeelH AdeelH commented Jul 6, 2024

Overview

This PR updates type hints and improves docstrings.

Changes include:

  • Replace deprecated aliases: Callable, Dict, List, Set, Tuple, Type, with the recommended replacements
  • Replace Optional[x] with x | None
  • Replace Union[x, y, ...] with x | y | ...
  • Add signature to Callable type hints where feasible
  • Use Self where applicable
  • Remove argument type hints from docstrings (non-exhaustive)
  • Fix/improve docstrings

Checklist

  • Added unit tests, if applicable
  • Updated documentation, if applicable
  • Added needs-backport label if the change should be back-ported to the previous release
  • PR has a name that won't get you publicly shamed for vagueness

Notes

N/A

Testing Instructions

N/A

@AdeelH AdeelH marked this pull request as ready for review July 8, 2024 14:06
@AdeelH AdeelH merged commit 116e788 into azavea:master Jul 8, 2024
2 checks passed
@AdeelH AdeelH deleted the type-hints branch July 9, 2024 19:38
Copy link

codecov bot commented Oct 6, 2024

Codecov Report

Attention: Patch coverage is 99.45455% with 3 lines in your changes missing coverage. Please review.

Project coverage is 90.09%. Comparing base (8f9f6d4) to head (02c9ffd).
Report is 40 commits behind head on master.

Files with missing lines Patch % Lines
...ervision_core/rastervision/core/data/utils/misc.py 80.00% 1 Missing ⚠️
...vision/pytorch_learner/object_detection_learner.py 80.00% 1 Missing ⚠️
...earner/rastervision/pytorch_learner/utils/utils.py 85.71% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2192   +/-   ##
=======================================
  Coverage   90.08%   90.09%           
=======================================
  Files         198      198           
  Lines        9877     9879    +2     
=======================================
+ Hits         8898     8900    +2     
  Misses        979      979           

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

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.

1 participant