aztk/utils/command_builder.py
def add_option(self, name: str, value: str = None, enable: bool = None):
        """
            Add an option to the command line.

            :param name: Option name (with the dash(es))
            :param value: Value for the option(If null and enable is not provided it won't add the option)
            :param enable: To explicitly add or ignore the option

            Usage:
            >>> command.add_option("--id", myId)               # => Will only add to the command if myId is not null
            >>> command.add_option("--id", myId, enable=False) # => Will not add it to the list
        """
        if enable is None:
            enable = value
        if enable:
            self.options.append(CommandOption(name=name, value=value))
            return True

        return False

            Add an option to the command line.

            :param name: Option name (with the dash(es))
            :param value: Value for the option(If null and enable is not provided it won't add the option)
            :param enable: To explicitly add or ignore the option

            Usage:
            >>> command.add_option("--id", myId)               # => Will only add to the command if myId is not null
            >>> command.add_option("--id", myId, enable=False) # => Will not add it to the list
        
Add an option to the command line.
Add an option to the command line .
def add_option(self, name: str, value: str = None, enable: bool = None):
        if enable is None:
            enable = value
        if enable:
            self.options.append(CommandOption(name=name, value=value))
            return True
        return False
def add_option ( self , name : str , value : str = None , enable : bool = None ) : if enable is None : enable = value if enable : self . options . append ( CommandOption ( name = name , value = value ) ) return True return False
Add an option to the command line.
Add an option to the command line .
"""
            Add an option to the command line.

            :param name: Option name (with the dash(es))
            :param value: Value for the option(If null and enable is not provided it won't add the option)
            :param enable: To explicitly add or ignore the option

            Usage:
            >>> command.add_option("--id", myId)               # => Will only add to the command if myId is not null
            >>> command.add_option("--id", myId, enable=False) # => Will not add it to the list
        """
self
name
str
Option name (with the dash(es))
Option name ( with the dash ( es ))
value
str
Value for the option(If null and enable is not provided it won't add the option)
Value for the option ( If null and enable is not provided it won ' t add the option )
enable
bool
To explicitly add or ignore the option
Usage:
>>> command.add_option("--id", myId)               # => Will only add to the command if myId is not null
>>> command.add_option("--id", myId, enable=False) # => Will not add it to the list
To explicitly add or ignore the option Usage : >>> command . add_option ( " -- id " myId ) # = > Will only add to the command if myId is not null >>> command . add_option ( " -- id " myId enable = False ) # = > Will not add it to the list