-
Notifications
You must be signed in to change notification settings - Fork 388
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
Fix Type hint #2195
Fix Type hint #2195
Conversation
Thank you very much for the PR! We require contributors to sign a CLA before their changes can be accepted. See instructions here: https://docs.rastervision.io/en/stable/CONTRIBUTING.html#contributor-license-agreement-cla. Let me know when you've submitted it. |
Hi, @AdeelH, I have signed and submitted the CLA. |
The CI failure looks to be formatting-related. You will need to run |
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.
Thanks!
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2195 +/- ##
==========================================
- Coverage 90.22% 90.15% -0.07%
==========================================
Files 198 198
Lines 9888 9888
==========================================
- Hits 8921 8915 -6
- Misses 967 973 +6 ☔ View full report in Codecov by Sentry. |
Description
Fix Several type check warnings reported by Pyre@Google, which were outdated after code modifications.
Detail
color_to_triple
fromtuple[int, int, int]
toUnion[list, tuple[int, int, int]]
, according to the condition check,color
could belist
and directly return after commit 3613061build_dataset
fromtuple[DataLoader, DataLoader, DataLoader]
totuple[DataLoader, DataLoader, DataLoader | None]
, thetest_dl
is init asNone
and could directly return ifself.test_ds
isNone
after commit d193109validate_augmentors
fromstr
tolist[str]
, the inputv
islist[str]
and directly return after condition check after commit adac1a2_build_dataset
fromtuple[Dataset, Dataset, Dataset]
toDataset
, since the function only returns a Dataset after commit d193109_build_dataset
fromtuple[Dataset, Dataset, Dataset]
toDataset
, since the function only returns a Dataset after commit d193109