vscode-circuitpython
vscode-circuitpython copied to clipboard
[BUG] Problem with the bundle download and unpacking
Describe the bug When the ext downloads the latest bundle and unpacks it, the files get corrupted. I tested it on three different running Linux os, two on hardware and one in a VM. Also checked in Windows 10 running VSC.
Example:
From linux $HOME/.config/Code/User/globalStorage/joedevivo.vscode-circuitpython/bundle/20240529/
Look at the __init__.py file, look at the top of the file.
Bad
"{} MUST override '_set_line_spacing'".format(type(self))
)
@line_spacing.setter
def line_spacing(self, new_line_spacing: float) -> None:
self._set_line_spacing(new_line_spacing)
@property
def label_direction(self) -> str:
"""Set the text direction of the label"""
return self._label_direction
Good
# SPDX-FileCopyrightText: 2020 Tim C, 2021 Jeff Epler for Adafruit Industries
#
# SPDX-License-Identifier: MIT
"""
`adafruit_display_text`
=======================
"""
__version__ = "3.1.0"
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_Display_Text.git"
from displayio import Group, Palette
We can see the top of the files is missing so when VSC Intelcode/intelsense tries to use it a error from pylint comes back and says for example
from adafruit_display_text import label
syntax error line 1 of that import which is incorrect because the code works fine.
This problem is also in 0.1.20 and 0.2.0 of the ext.
To Reproduce Steps to reproduce the behavior:
- Install the ext and hook up a MCU ( or a folder with code.py ) to sastify the ext so it triggers.
- Add the lib adafruit_display_text ( I tested with the ext lib installer and circup )
- Then just do that import I referred to,
from adafruit_display_text import label - Or just go to the bundles directory and open that lib and the
__init__.py, it should show it truncated at the top. - See error
Expected behavior It should have no errors from pylint.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: Linux KDE and Windows
- Version KDE 22.04 and Windows 10
Additional context I believe this issue has been here for a while, I have looked back at one desktop where I had not updated for 4 months and the error was there.
To get around the problem, I downloaded the bundle myself and then unpacked it to where it goes.