-
Notifications
You must be signed in to change notification settings - Fork 505
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
HITL: Add typing annotations to AppService #1802
Conversation
from habitat_hitl.environment.controllers.controller_abc import GuiController | ||
from habitat_hitl.environment.episode_helper import EpisodeHelper | ||
from habitat_sim.gfx import DebugLineRender | ||
|
||
|
||
# Helpers to provide to AppState classes, provided by the underlying SandboxDriver | ||
class AppService: | ||
def __init__( | ||
self, | ||
config, |
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.
May want to do this to force the arguments to be always keywords. The docs generator will pick that up and show in the output as well.
config, | |
*, config, |
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.
Neat trick! Thank you!
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.
Agree with Mosra, otherwise LGTM!
* Add type annotations to app_service. * Propagate AppService type annotations to the apps. * Move displaced comment. * Force keyword argument usage in AppService constructior.
* Add type annotations to app_service. * Propagate AppService type annotations to the apps. * Move displaced comment. * Force keyword argument usage in AppService constructior.
* Add type annotations to app_service. * Propagate AppService type annotations to the apps. * Move displaced comment. * Force keyword argument usage in AppService constructior.
Motivation and Context
The
AppService
object acts a dependency injection container for HITL components. Its dependencies are opaque and difficult to track.This changeset adds type annotations to this object.
How Has This Been Tested
Pre-commit and local run.
Types of changes
Checklist