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

Typing fix #147

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

jordan-schneider
Copy link
Contributor

Type comments are not prevalent in the codebase, but some type inference can be done automatically (e.g. using class definitions). This type comment is syntactically incorrect in that it causes mypy to throw an error. python 2 backward compatible comments either have to be on a line with a variable assignment, on a line with a function signature, immediately after a function signature, or on each line of a multiline function signature. The existing comment is neither. This small PR moves the comment to right after the function signature, and adds the type for the itr parameter too.

Longer term it would be really nice to have a stub file, if only the auto-generated one, so that mypy can check the types of the classes used in this package.
@astooke

@codecov-io
Copy link

Codecov Report

Merging #147 into master will not change coverage.
The diff coverage is 0.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #147   +/-   ##
=======================================
  Coverage   22.56%   22.56%           
=======================================
  Files         128      128           
  Lines        7987     7987           
=======================================
  Hits         1802     1802           
  Misses       6185     6185           
Flag Coverage Δ
#unittests 22.56% <0.00%> (ø)
Impacted Files Coverage Δ
rlpyt/samplers/base.py 80.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 668290d...caee25c. Read the comment docs.

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.

2 participants