Skip to content

Commit

Permalink
Merge pull request raspberrypi#19 from raspberrypi/kwargs
Browse files Browse the repository at this point in the history
Initialise Parameters using keyword-args instead of positional-args
  • Loading branch information
JamesH65 authored Feb 1, 2021
2 parents c22179e + c54b779 commit 87047dd
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions pico_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -709,10 +709,10 @@ def OK(self):
if (self.wantVSCode):
projects.append("vscode")

p = Parameters(self.sdkpath, Path(projectPath), self.projectName.get(), True, self.wantOverwrite.get(), self.wantBuild.get(),\
features, projects, self.configs, self.wantRunFromRAM.get(), \
self.wantExamples.get(),\
self.wantUART.get(), self.wantUSB.get())
p = Parameters(sdkPath=self.sdkpath, projectRoot=Path(projectPath), projectName=self.projectName.get(),
gui=True, overwrite=self.wantOverwrite.get(), build=self.wantBuild.get(),
features=features, projects=projects, configs=self.configs, runFromRAM=self.wantRunFromRAM.get(),
examples=self.wantExamples.get(), uart=self.wantUART.get(), usb=self.wantUSB.get())

DoEverything(self, p)

Expand Down Expand Up @@ -1172,7 +1172,10 @@ def DoEverything(parent, params):

sys.exit(0)
else :
p = Parameters(sdkPath, projectRoot, args.name, False, args.overwrite, args.build, args.feature, args.project, (), args.runFromRAM, args.examples, args.uart, args.usb)
p = Parameters(sdkPath=sdkPath, projectRoot=projectRoot, projectName=args.name,
gui=False, overwrite=args.overwrite, build=args.build, features=args.feature,
projects=args.project, configs=(), runFromRAM=args.runFromRAM,
examples=args.examples, uart=args.uart, usb=args.usb)

DoEverything(None, p)

0 comments on commit 87047dd

Please sign in to comment.