-
Notifications
You must be signed in to change notification settings - Fork 8
use ruff and remove 8x displayio code #17
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
import typing | ||
|
||
from fourwire import FourWire | ||
from epaperdisplay import EPaperDisplay | ||
except ImportError: | ||
from displayio import FourWire | ||
from displayio import EPaperDisplay | ||
pass |
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.
If the import typing
fails, then FourWire
won't be imported. I don't think this is what you meant.
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.
@dhalbert that is the intention. The only usage of FourWire
is here: https://github.com/adafruit/Adafruit_CircuitPython_IL0398/blob/main/adafruit_il0398.py#L60 as a type annotation. If typing
fails we know its a MCU context and this allows us to avoid the memory overhead of importing FourWire
that won't be used at runtime.
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 -- I realized this when I was reviewing another one.
Updating https://github.com/adafruit/Adafruit_CircuitPython_DisplayIO_SSD1305 to 2.0.0 from 1.4.3: > Merge pull request adafruit/Adafruit_CircuitPython_DisplayIO_SSD1305#19 from FoamyGuy/use_ruff_remove_8x_comapt Updating https://github.com/adafruit/Adafruit_CircuitPython_IL0398 to 2.0.0 from 1.2.4: > Merge pull request adafruit/Adafruit_CircuitPython_IL0398#17 from FoamyGuy/use_ruff_remove_8x_compat Updating https://github.com/adafruit/Adafruit_CircuitPython_SSD1680 to 2.0.0 from 1.2.5: > Merge pull request adafruit/Adafruit_CircuitPython_SSD1680#29 from FoamyGuy/use_ruff_remove_8x_compat Updating https://github.com/adafruit/Adafruit_CircuitPython_SSD1681 to 2.0.0 from 1.2.4: > Merge pull request adafruit/Adafruit_CircuitPython_SSD1681#15 from FoamyGuy/use_ruff_remove_8x_compat Updating https://github.com/adafruit/Adafruit_CircuitPython_ST7735R to 2.0.0 from 1.6.4: > Merge pull request adafruit/Adafruit_CircuitPython_ST7735R#38 from FoamyGuy/use_ruff_remove_8x_compat Updating https://github.com/adafruit/Adafruit_CircuitPython_ST7789 to 2.0.0 from 1.6.4: > Merge pull request adafruit/Adafruit_CircuitPython_ST7789#39 from FoamyGuy/use_ruff_remove_8x_compat Updating https://github.com/adafruit/Adafruit_CircuitPython_UC8151D to 2.0.0 from 1.3.5: > Merge pull request adafruit/Adafruit_CircuitPython_UC8151D#14 from FoamyGuy/use_ruff_remove_8x_compat Updating https://github.com/adafruit/Adafruit_CircuitPython_Wii_Classic to 1.0.9 from 1.0.8: > Merge pull request adafruit/Adafruit_CircuitPython_Wii_Classic#6 from FoamyGuy/use_ruff_remove_8x_compat Updating https://github.com/adafruit/Adafruit_CircuitPython_FunHouse to 2.3.1 from 2.3.0: > Merge pull request adafruit/Adafruit_CircuitPython_FunHouse#45 from justmobilize/remove-secrets-usage Updating https://github.com/adafruit/Adafruit_CircuitPython_Requests to 4.1.10 from 4.1.9: > Merge pull request adafruit/Adafruit_CircuitPython_Requests#208 from dhalbert/update-ap_info
No description provided.