You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because the instance methods in the steam module are untyped, mypy gives errors:
foo.py:16:13: error: Returning Any from function declared to return "str" [no-any-return]
foo.py:23:13: error: Returning Any from function declared to return "bool" [no-any-return]
foo.py:34:13: error: Returning Any from function declared to return "str" [no-any-return]
Found 3 errors in 1 file (checked 1 source file)
To silence the warnings, I must coerce the returned expressions:
This would aid consumers in type checking their code that depends on steam.
Stretch goal: add type checking to this repository.
That would guard against returning wrong types as the module develops.
Describe alternatives you've considered
Do nothing.
The easiest option. It's not so inconvenient to coerce or annotate types in my code. But the tools are available in python, and I think it's worth considering.
Thanks for reading. Happy to answer questions.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Consider this class:
Because the instance methods in the
steam
module are untyped, mypy gives errors:To silence the warnings, I must coerce the returned expressions:
Describe the solution you'd like
steam
should return typed values.This would aid consumers in type checking their code that depends on
steam
.That would guard against returning wrong types as the module develops.
Describe alternatives you've considered
The easiest option. It's not so inconvenient to coerce or annotate types in my code. But the tools are available in python, and I think it's worth considering.
Thanks for reading. Happy to answer questions.
The text was updated successfully, but these errors were encountered: