We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7ba62bb commit 6bdb4aeCopy full SHA for 6bdb4ae
1 file changed
tools/board_stubs/circuitpython_setboard/__init__.py
@@ -9,13 +9,9 @@
9
def set_board():
10
chosen_board = sys.argv[1]
11
print(f"setting board: {chosen_board}")
12
- board_defs_path = (
13
- os.path.sep.join(__file__.split("/")[:-2]) + f"{os.path.sep}board_definitions{os.path.sep}"
14
- )
15
- board_stubs_path = (
16
- os.path.sep.join(__file__.split("/")[:-2])
17
- + f"{os.path.sep}board-stubs{os.path.sep}__init__.pyi"
18
+ site_packages_path = os.path.sep.join(__file__.split(os.path.sep)[:-2])
+ board_defs_path = f"{site_packages_path}{os.path.sep}board_definitions{os.path.sep}"
+ board_stubs_path = f"{site_packages_path}{os.path.sep}board-stubs{os.path.sep}__init__.pyi"
19
20
if chosen_board not in os.listdir(board_defs_path):
21
print(f"Board: '{chosen_board}' was not found")
0 commit comments