-
Notifications
You must be signed in to change notification settings - Fork 357
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
Type-hint comments for CarlaDataProvider #1066
Type-hint comments for CarlaDataProvider #1066
Conversation
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.
Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @Daraan)
89da956
to
a8b771d
Compare
Sorry, didn't know that this was a request review button.😅 Any opinion on the AB choices,? |
a8b771d
to
c9a2084
Compare
f072d35
to
c7bdac1
Compare
Thanks for the PR. Given that it is a static class initialized at the beginning, we can ignore |
c7bdac1
to
88bb7ad
Compare
@PabloVD implemented the B variant by removing most None values, and increased the type-coverage |
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.
Reviewed 1 of 1 files at r3, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @Daraan)
@Daraan thanks for your changes, now we can approve the PR. |
Description
This PR only adds comments that can be picked up by mypy for example and does not modify any code.
So far only type-hints for the CarlaDataProvider so that they can be picked up by IDE extensions to allow for better code completion.
TODO:
_global_osc_parameters = {} # type: dict[str, Any]
?From what I found from online resources
Any
fits bests, the types I've seen where[str, Number, ParameterRef]
None
before init / after cleanup, like_world
, ascarla.World | None
Note: As long as it is no main feature of carla this PR carla-simulator/carla#7009 adds type-hints for carla.
This change is![Reviewable](https://camo.githubusercontent.com/1541c4039185914e83657d3683ec25920c672c6c5c7ab4240ee7bff601adec0b/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)