Descent098 / ahd

Bad comparison test PTC-W0023
Anti-pattern
Minor
2 years ago4 years old
Use is when comparing type of two objects
212    """
213    logging.info("Beginning bash autocompletion generation")
214
215    if not type(commands) == list:216        raise ValueError("Expected list of commands, got string instead")
217
218    sub_commands = [root] # list of just top level sub-commands
Use is when comparing type of two objects
163
164
165    logging.info(f"Beginning list ({arguments})  stringification")
166    if not (type(arguments) == list or type(arguments) == tuple):167        raise ValueError("Expected list of arguments, got string instead")
168
169    stringified = ""
Use is when comparing type of two objects
163
164
165    logging.info(f"Beginning list ({arguments})  stringification")
166    if not (type(arguments) == list or type(arguments) == tuple):167        raise ValueError("Expected list of arguments, got string instead")
168
169    stringified = ""