rlpyt
rlpyt copied to clipboard
Typing fix
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 Report
Merging #147 into master will not change coverage. The diff coverage is
0.00%
.
@@ 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.