Skip to content

Commit f4a27d3

Browse files
committed
Update function prototypes to be 1:1 compatible with ai8xize.py
1 parent 9b6a6a5 commit f4a27d3

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

__init__.py

Whitespace-only changes.

generate.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,16 @@
3535
import os
3636
import shutil
3737
import stat
38-
from utils import *
38+
# from utils import *
39+
from . import utils
3940
from pathlib import Path
4041

4142
# Get location of this file.
4243
# Need to use this so that template look-ups are decoupled from the caller's working directory
4344
here = Path(__file__).parent
4445

4546
# Load default values for template from master "inject" folder so that we don't have to maintain multiple copies of the settings
46-
defaults = parse_json(here.joinpath("MaximSDK/Inject/.vscode/settings.json"))
47+
defaults = utils.parse_json(here.joinpath("MaximSDK/Inject/.vscode/settings.json"))
4748

4849
whitelist = [
4950
"MAX32650",
@@ -61,7 +62,8 @@
6162
]
6263

6364
def create_project(
64-
out_path: str,
65+
out_root: str,
66+
out_stem: str,
6567
target: str,
6668
board: str,
6769
overwrite = False,
@@ -85,7 +87,7 @@ def create_project(
8587
Generates Visual Studio Code project files from the VSCode-Maxim project.
8688
"""
8789

88-
out_path = Path(out_path)
90+
out_path = Path(out_root).joinpath(out_stem)
8991

9092
template_dir = here.joinpath("MaximSDK/Template").resolve()
9193
# Where to find the VS Code template directory relative to this script

utils.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
"""
3434

3535
from collections.abc import MutableMapping
36-
from string import Template
3736
import json
3837
from pathlib import Path
3938
import hashlib
@@ -62,9 +61,6 @@ def __iter__(self):
6261
def __len__(self):
6362
return len(self.d)
6463

65-
class MSDKTemplate(Template):
66-
delimiter = "##__"
67-
6864
def parse_json(filename):
6965
"""
7066
Parse values from a json file into a template-friendly (all-caps keys) dictionary

0 commit comments

Comments
 (0)