File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
tools/board_stubs/circuitpython_setboard Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 1
1
# SPDX-FileCopyrightText: 2024 Tim Cocks
2
2
#
3
3
# SPDX-License-Identifier: MIT
4
- import argparse
5
4
import sys
5
+
6
+ version_info = sys .version_info
7
+ if version_info .major < 3 or (version_info .major == 3 and version_info .minor < 9 ):
8
+ sys .stdout .write ("Python 3.9 is the minimum supported version for board specific stubs.\n " )
9
+ sys .exit (0 )
10
+
11
+ import argparse
6
12
import shutil
7
13
from collections import defaultdict
8
14
from importlib import resources
@@ -35,10 +41,6 @@ def header(txt: str) -> str:
35
41
36
42
37
43
def set_board ():
38
- version_info = sys .version_info
39
- if version_info .major < 3 or (version_info .major == 3 and version_info .minor < 9 ):
40
- sys .stdout .write ("Python 3.9 is the minimum supported version for board specific stubs.\n " )
41
- sys .exit (0 )
42
44
parser = argparse .ArgumentParser (
43
45
prog = __name__ ,
44
46
usage = "Install CircuitPython board-specific stubs" ,
You can’t perform that action at this time.
0 commit comments