Skip to content

Commit 90dce04

Browse files
committed
Fix(cli_tools): Cannot require extra unused parameters in histogrammer and optimizer
1 parent f07db04 commit 90dce04

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/mcsas3/cli_tools.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
@define
1414
class McSAS3_cli_optimize(object):
15-
"""Runs the McSAS optimizer from the command line arguments"""
15+
"""Runs the McSAS optimizer (only) from the command line arguments"""
1616

1717
def checkConfig(self, attribute, value):
1818
assert value.exists(), f"configuration file {value} must exist"
@@ -23,7 +23,6 @@ def checkConfig(self, attribute, value):
2323
readConfigFile: Path = field(
2424
kw_only=True, validator=[validators.instance_of(Path), checkConfig]
2525
)
26-
histConfigFile: Path = field(kw_only=True) # dummy key which might come with the given kwargs
2726
runConfigFile: Path = field(kw_only=True, validator=[validators.instance_of(Path), checkConfig])
2827
resultIndex: int = field(kw_only=True, validator=[validators.instance_of(int)])
2928
deleteIfExists: bool = field(kw_only=True, validator=[validators.instance_of(bool)])
@@ -64,7 +63,7 @@ def run(self):
6463

6564
@define
6665
class McSAS3_cli_histogram(object):
67-
"""Runs the McSAS histogrammer from the command line arguments"""
66+
"""Runs the McSAS histogrammer (only) from the command line arguments"""
6867

6968
def checkConfig(self, attribute, value):
7069
assert value.exists(), f"configuration file {value} must exist"
@@ -75,11 +74,7 @@ def checkConfig(self, attribute, value):
7574
histConfigFile: Path = field(
7675
kw_only=True, validator=[validators.instance_of(Path), checkConfig]
7776
)
78-
runConfigFile: Path = field(kw_only=True) # dummy
79-
readConfigFile: Path = field(kw_only=True) # dummy key which might come with the given kwargs
8077
resultIndex: int = field(kw_only=True, validator=[validators.instance_of(int)])
81-
deleteIfExists: bool = field(kw_only=True) # dummy
82-
nThreads: int = field(kw_only=True) # dummy
8378

8479
def __attrs_post_init__(self):
8580
self.run()

0 commit comments

Comments
 (0)