openpilot
openpilot copied to clipboard
Get mypy passing on macOS
currently fails with:
mypy..............................................[✗]
system/loggerd/xattr_cache.py:10: error: Module has no attribute "getxattr" [attr-defined]
system/loggerd/xattr_cache.py:22: error: Returning Any from function declared to return "None" [no-any-return]
system/loggerd/xattr_cache.py:22: error: Module has no attribute "setxattr" [attr-defined]
common/realtime.py:32: error: Module has no attribute "sched_setscheduler" [attr-defined]
common/realtime.py:37: error: Module has no attribute "sched_setaffinity" [attr-defined]
system/athena/athenad.py:754: error: Module has no attribute "TCP_USER_TIMEOUT" [attr-defined]
system/athena/athenad.py:755: error: Module has no attribute "TCP_KEEPIDLE"; maybe "TCP_KEEPALIVE" or "TCP_KEEPINTVL"? [attr-defined]
Found 7 errors in 3 files (checked 517 source files)
Looks like an out of date https://github.com/python/typeshed module (https://github.com/python/typeshed/commit/5e2fe131faae347e109b48f451e4b8521378d764)
Unfortunately no, TCP_USER_TIMEOUT and TCP_KEEPIDLE are Linux only constants and don't exists on MacOS
Will take a look. Could you assign the ticket to me? @adeebshihadeh