-
Notifications
You must be signed in to change notification settings - Fork 71
Annotation fixes in circuitplayground_base and bluefruit.py #118
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
Conversation
LMK how this looks.... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the submission! I added my feedback below, let me know if you have any questions!
wow, that was a lot to take in. pylint is throwing complaints about line endings, but the last big one it's choking on is: Clearly uname() returns a namedtuple that includes machine, so why is pylint kicking this out? Any suggestions? |
CPython uses When you push code, |
Note that |
Oh neat, good point, and thanks for that correction! I think It sounds like this might just be a good time to push the code to this branch and see what still remains to be done. We can even give those suggestions as comments to the lines. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! A few more things and then this should be good to go!
@@ -8,13 +8,13 @@ | |||
# pylint: disable=too-many-instance-attributes, too-many-lines | |||
|
|||
""" | |||
`adafruit_circuitplayground.circuit_playground_base` | |||
'adafruit_circuitplayground.circuit_playground_base' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These uses of ticks (`) are used intentionally for formatting, you should change this and the other ones below back to that so the formatting and links will show appropriately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like these should be reverted back to ticks (`)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought I did? tick to the left of #1 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here it should be reverted back to:
'adafruit_circuitplayground.circuit_playground_base' | |
`adafruit_circuitplayground.circuit_playground_base` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few more changes but should be good after that!
@@ -33,6 +33,12 @@ | |||
import neopixel | |||
import touchio | |||
|
|||
try: | |||
from typing import Literal, Optional, Iterator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I always forget that Literal
wasn't added to typing
until Python 3.8. Since we support Python 3.7 as the minimum version, which means for development as well, let's import it Literal
from typing_extensions
instead. You can remove the Literal
import here and add this as a line below:
from typing_extensions import Literal
Make sure you add typing-extensions~=4.0
as a dependency in setup.py
and requirements.txt
to ensure it gets downloaded as well. Let me know if you need help doing that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clue about setup.py would be nice. All I see is setup.py.disabled. Is that because of Pycharm?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll need to update this branch to the latest main
branch, that file has been deleted and since replaced with setup.py
in a recent pull request.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, got that update now. is it added as just a simple import in setup.py? or some other way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You add it to the list of install_requires
in setup()
install_requires=[
"adafruit-circuitpython-lis3dh",
"adafruit-circuitpython-thermistor",
"adafruit-circuitpython-neopixel",
"typing-extensions~=4.0",
],
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it threw a number error after adding this line, and went back to just dying when I removed "~=4.0". All pylint is showing me locally is that it does not like the uname function of os, in addition to the line ending errors.
Not sure if you can see what specifically is choking it here.....
@@ -8,13 +8,13 @@ | |||
# pylint: disable=too-many-instance-attributes, too-many-lines | |||
|
|||
""" | |||
`adafruit_circuitplayground.circuit_playground_base` | |||
'adafruit_circuitplayground.circuit_playground_base' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like these should be reverted back to ticks (`)
Looks like you'll need to run |
hmmm |
also, I run pylint and black manually. I downloaded and installed precommit but for some reason on my windows box it won't run as a unit, in spite of having looked at path, etc. any ideas, besides running linux? :) |
oh duh. well - I think I just solved the pre-commit problem.....we'll see next time I need to use it. |
Updating https://github.com/adafruit/Adafruit_CircuitPython_CircuitPlayground to 5.2.5 from 5.2.4: > Merge pull request adafruit/Adafruit_CircuitPython_CircuitPlayground#118 from tcfranks/main > Added Black formatting badge Updating https://github.com/adafruit/Adafruit_CircuitPython_Seesaw to 1.11.3 from 1.11.2: > Switched to pyproject.toml > Added Black formatting badge Updating https://github.com/adafruit/Adafruit_CircuitPython_HTTPServer to 0.4.0 from 0.3.0: > Merge pull request adafruit/Adafruit_CircuitPython_HTTPServer#11 from karlfl/AddBufferSizeProperty > Changed .env to .venv in README.rst
No description provided.