ONE - On-device Neural Engine
Loading...
Searching...
No Matches
validate_global_conf.ArgumentParser Class Reference

Public Member Functions

 __init__ (self)
 
 add_argument (self, *str names, action=_Action, Optional[type] dtype=None)
 

Detailed Description

A very small recorder that emulates the subset used by command_schema().

Definition at line 70 of file validate_global_conf.py.

Constructor & Destructor Documentation

◆ __init__()

validate_global_conf.ArgumentParser.__init__ (   self)

Definition at line 74 of file validate_global_conf.py.

74 def __init__(self):
75 self.args: List[_ArgSpec] = []
76

References locop::NodeDesc.args(), locop::NodeDesc.args(), Command.Command.args, Content.args, and Event.args.

Member Function Documentation

◆ add_argument()

validate_global_conf.ArgumentParser.add_argument (   self,
*str  names,
  action = _Action,
Optional[type]   dtype = None 
)

Definition at line 77 of file validate_global_conf.py.

77 def add_argument(self, *names: str, action=_Action, dtype: Optional[type] = None):
78 if not names:
79 raise ValueError("add_argument requires at least one name")
80 # Normalize to strings
81 names = tuple(str(n) for n in names)
82 self.args.append(_ArgSpec(names=names, action=action, dtype=dtype))
83 return self
84
85
86# Expose shim as "onelib.argumentparse"

References locop::NodeDesc.args(), locop::NodeDesc.args(), Command.Command.args, Content.args, and Event.args.


The documentation for this class was generated from the following file: