diff --git a/CRISPResso2/CRISPRessoShared.py b/CRISPResso2/CRISPRessoShared.py index 31998823..11b5f32e 100644 --- a/CRISPResso2/CRISPRessoShared.py +++ b/CRISPResso2/CRISPRessoShared.py @@ -272,7 +272,7 @@ def overwrite_crispresso_options(cmd, option_names_to_overwrite, option_values, if option: if option in option_values: if paramInd is None: - if type(option_values) == dict: + if type(option_values) is dict: val = option_values[option] else: val = getattr(option_values, option) @@ -305,10 +305,10 @@ def overwrite_crispresso_options(cmd, option_names_to_overwrite, option_values, if action.nargs == 0: if val: # if value is true new_cmd += ' --%s' % action.dest - elif action.type == bool: # but just in case... + elif action.type is bool: # but just in case... if val: new_cmd += ' --%s' % action.dest - elif action.type == str: + elif action.type is str: if val != "": if re.fullmatch(r"[a-zA-Z0-9\._]*", val): # if the value is alphanumeric, don't have to quote it new_cmd += ' --%s %s' % (action.dest, val) @@ -316,7 +316,7 @@ def overwrite_crispresso_options(cmd, option_names_to_overwrite, option_values, new_cmd += ' --%s %s' % (action.dest, val) else: new_cmd += ' --%s "%s"' % (action.dest, val) - elif action.type == int: + elif action.type is int: new_cmd += ' --%s %s' % (action.dest, val) return new_cmd @@ -350,7 +350,7 @@ def propagate_crispresso_options(cmd, options, params, paramInd=None): if option: if option in params: if paramInd is None: - if type(params) == dict: + if type(params) is dict: val = params[option] else: val = getattr(params, option)