Skip to content

Allow mypy to reject incomplete defs for mlagents-envs #2585

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

Merged
merged 2 commits into from
Sep 18, 2019

Conversation

harperj
Copy link
Contributor

@harperj harperj commented Sep 18, 2019

This wasn't working before because of several remaining partially defined
function definitions.

This wasn't working before because of several remaining partially defined
function definitions.
@harperj harperj requested a review from chriselion September 18, 2019 22:01
@@ -495,8 +498,6 @@ def step(
else:
if text_action[brain_name] is None:
text_action[brain_name] = [""] * n_agent
if isinstance(text_action[brain_name], str):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note this is an actual functional change. Requires that if we are given a text_action that it will be a Dict[str, List[str]]. Otherwise the types will be inconsistent. I don't believe we use this feature but I thought it was worth noting.

Copy link
Contributor

@chriselion chriselion left a comment

Choose a reason for hiding this comment

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

Looks good

@harperj harperj merged commit b787e81 into develop Sep 18, 2019
@harperj harperj deleted the develop-mypy-envs branch October 1, 2019 16:47
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants