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
There are missing type annotations for some functions in this library.
The typing module does not exist on CircuitPython devices so the import needs to be wrapped in try/except to catch the error for missing import. There is an example of how that is done here:
Once imported the typing annotations for the argument type(s), and return type(s) can be added to the function signature. Here is an example of a function that has had this done already:
There is also a guide that covers our CI utilities and how to run them locally to ensure they will pass in Github Actions here: https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/check-your-code In particular the pages: Sharing docs on ReadTheDocs and Check your code with pre-commit contain the tools to install and commands to run locally to run the checks.
If you are attempting to resolve this issue and need help, you can post a comment on this issue and tag both @FoamyGuy and @kattni or reach out to us on Discord: https://adafru.it/discord in the #circuitpython-dev channel.
The following locations are reported by mypy to be missing type annotations:
adafruit_mcp230xx/digital_inout.py:21
adafruit_mcp230xx/digital_inout.py:25
adafruit_mcp230xx/digital_inout.py:29
adafruit_mcp230xx/digital_inout.py:44
adafruit_mcp230xx/digital_inout.py:56
adafruit_mcp230xx/digital_inout.py:63
adafruit_mcp230xx/digital_inout.py:83
adafruit_mcp230xx/digital_inout.py:99
adafruit_mcp230xx/digital_inout.py:122
adafruit_mcp230xx/digital_inout.py:146
adafruit_mcp230xx/mcp23xxx.py:23
adafruit_mcp230xx/mcp23sxx.py:33
adafruit_mcp230xx/mcp23sxx.py:38
adafruit_mcp230xx/mcp23sxx.py:47
adafruit_mcp230xx/mcp23sxx.py:57
adafruit_mcp230xx/mcp23sxx.py:65
adafruit_mcp230xx/mcp230xx.py:31
adafruit_mcp230xx/mcp230xx.py:42
adafruit_mcp230xx/mcp230xx.py:51
adafruit_mcp230xx/mcp230xx.py:61
adafruit_mcp230xx/mcp23s17.py:48
adafruit_mcp230xx/mcp23s17.py:70
adafruit_mcp230xx/mcp23s17.py:82
adafruit_mcp230xx/mcp23s17.py:94
adafruit_mcp230xx/mcp23s17.py:105
adafruit_mcp230xx/mcp23s17.py:116
adafruit_mcp230xx/mcp23s17.py:127
adafruit_mcp230xx/mcp23s17.py:139
adafruit_mcp230xx/mcp23s17.py:151
adafruit_mcp230xx/mcp23s17.py:163
adafruit_mcp230xx/mcp23s17.py:166
adafruit_mcp230xx/mcp23s17.py:183
adafruit_mcp230xx/mcp23s17.py:195
adafruit_mcp230xx/mcp23s17.py:207
adafruit_mcp230xx/mcp23s17.py:222
adafruit_mcp230xx/mcp23s17.py:236
adafruit_mcp230xx/mcp23s17.py:249
adafruit_mcp230xx/mcp23s17.py:265
adafruit_mcp230xx/mcp23s08.py:41
adafruit_mcp230xx/mcp23s08.py:62
adafruit_mcp230xx/mcp23s08.py:73
adafruit_mcp230xx/mcp23s08.py:85
adafruit_mcp230xx/mcp23s08.py:88
adafruit_mcp230xx/mcp23017.py:48
adafruit_mcp230xx/mcp23017.py:66
adafruit_mcp230xx/mcp23017.py:78
adafruit_mcp230xx/mcp23017.py:90
adafruit_mcp230xx/mcp23017.py:101
adafruit_mcp230xx/mcp23017.py:112
adafruit_mcp230xx/mcp23017.py:123
adafruit_mcp230xx/mcp23017.py:135
adafruit_mcp230xx/mcp23017.py:147
adafruit_mcp230xx/mcp23017.py:159
adafruit_mcp230xx/mcp23017.py:162
adafruit_mcp230xx/mcp23017.py:179
adafruit_mcp230xx/mcp23017.py:191
adafruit_mcp230xx/mcp23017.py:203
adafruit_mcp230xx/mcp23017.py:218
adafruit_mcp230xx/mcp23017.py:232
adafruit_mcp230xx/mcp23017.py:245
adafruit_mcp230xx/mcp23017.py:261
adafruit_mcp230xx/mcp23016.py:48
adafruit_mcp230xx/mcp23016.py:65
adafruit_mcp230xx/mcp23016.py:77
adafruit_mcp230xx/mcp23016.py:89
adafruit_mcp230xx/mcp23016.py:100
adafruit_mcp230xx/mcp23016.py:111
adafruit_mcp230xx/mcp23016.py:122
adafruit_mcp230xx/mcp23016.py:125
adafruit_mcp230xx/mcp23008.py:40
adafruit_mcp230xx/mcp23008.py:58
adafruit_mcp230xx/mcp23008.py:69
The text was updated successfully, but these errors were encountered:
There are missing type annotations for some functions in this library.
The
typing
module does not exist on CircuitPython devices so the import needs to be wrapped in try/except to catch the error for missing import. There is an example of how that is done here:Once imported the typing annotations for the argument type(s), and return type(s) can be added to the function signature. Here is an example of a function that has had this done already:
If you are new to Git or Github we have a guide about contributing to our projects here: https://learn.adafruit.com/contribute-to-circuitpython-with-git-and-github
There is also a guide that covers our CI utilities and how to run them locally to ensure they will pass in Github Actions here: https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/check-your-code In particular the pages:
Sharing docs on ReadTheDocs
andCheck your code with pre-commit
contain the tools to install and commands to run locally to run the checks.If you are attempting to resolve this issue and need help, you can post a comment on this issue and tag both @FoamyGuy and @kattni or reach out to us on Discord: https://adafru.it/discord in the
#circuitpython-dev
channel.The following locations are reported by mypy to be missing type annotations:
The text was updated successfully, but these errors were encountered: