<commit_before>import re
from thefuck.utils import replace_command


def match(command):
    return (re.search(r"([^:]*): Unknown command.*", command.stderr) != None
            and re.search(r"Did you mean ([^?]*)?", command.stderr) != None)


def get_new_command(command):
    broken_cmd = re.findall(r"([^:]*): Unknown command.*", command.stderr)[0]
    matched = re.findall(r"Did you mean ([^?]*)?", command.stderr)
    return replace_command(command, broken_cmd, matched)<commit_msg>Fix flake8 errors: E711 comparison to None should be 'if cond is not None:'<commit_after>import re
from thefuck.utils import replace_command


def match(command):
    return (re.search(r"([^:]*): Unknown command.*", command.stderr) is not None
            and re.search(r"Did you mean ([^?]*)?", command.stderr) is not None)


def get_new_command(command):
    broken_cmd = re.findall(r"([^:]*): Unknown command.*", command.stderr)[0]
    matched = re.findall(r"Did you mean ([^?]*)?", command.stderr)
    return replace_command(command, broken_cmd, matched)
{'fraction_non_alphanumeric': 0.1682600382409178, 'fraction_numerical': 0.0057361376673040155, 'mean_word_length': 4.690217391304348, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3724527', 'n_tokens_mistral': 352, 'n_tokens_neox': 328, 'n_words': 88}