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

thermald: type annotate main thread #29414

Merged
merged 5 commits into from
Aug 23, 2023
Merged

thermald: type annotate main thread #29414

merged 5 commits into from
Aug 23, 2023

Conversation

sshane
Copy link
Contributor

@sshane sshane commented Aug 15, 2023

function signatures are required for typing checks, unless we enable all. types inside untyped function is a warning: python/mypy#3948

couple issues:

selfdrive/thermald/thermald.py:276: error: Right operand of "or" is never evaluated  [unreachable]
selfdrive/thermald/thermald.py:360: error: Statement is unreachable  [unreachable]

@sshane
Copy link
Contributor Author

sshane commented Aug 23, 2023

seems like a bug with mypy, it actually is reachable. the first loop these variables will always be none, and so it is treated as never reachable python/mypy#11612

@sshane sshane marked this pull request as ready for review August 23, 2023 21:17
@sshane sshane added the bugfix label Aug 23, 2023
@sshane sshane merged commit af8af32 into master Aug 23, 2023
@sshane sshane deleted the check-untyped-funcs branch August 23, 2023 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant