<commit_before>import ircbotframe
import sys

class Handler:
    def __init__(self, host, port=6667, name="MediaWiki", description="MediaWiki recent changes bot", channels=[]):
        self.channels = channels
        self.bot = ircbotframe.ircBot(host, port, name, description)
        self.bot.bind("376", self.endMOTD)
        self.bot.start()
    
    def endMOTD(self, sender, headers, message):
        for chan in self.channels:
            self.bot.joinchan(chan)

def main(cmd, args):
    args = args[:]
    parsemode = ["host"]
    host = None
    name = "MediaWiki"
    channels = []
    while len(args) > 0:
        if len(parsemode) < 1:
            if args[0] == "-n":
                parsemode.insert(0, "name")
            else:
                channels.append(args[0])
        else:
            if parsemode[0] == "name":
                name = args[0]
            elif parsemode[0] == "host":
                host = args[0]
            parsemode = parsemode[1:]
        args = args[1:]
    if host == None:
        print("Usage: " + cmd + " [-n <name>] <host> <channel> [<channel> ...]")
        return
    elif len(args) > 1:
        Handler(host=host, name=name channels=channels)

if __name__ == "__main__":
    if __name__ == '__main__':
        main(sys.argv[0], sys.argv[1:] if len(sys.argv) > 1 else [])<commit_msg>Remove unnecessary conditional in argument parsing<commit_after>import ircbotframe
import sys

class Handler:
    def __init__(self, host, port=6667, name="MediaWiki", description="MediaWiki recent changes bot", channels=[]):
        self.channels = channels
        self.bot = ircbotframe.ircBot(host, port, name, description)
        self.bot.bind("376", self.endMOTD)
        self.bot.start()
    
    def endMOTD(self, sender, headers, message):
        for chan in self.channels:
            self.bot.joinchan(chan)

def main(cmd, args):
    args = args[:]
    parsemode = ["host"]
    host = None
    name = "MediaWiki"
    channels = []
    while len(args) > 0:
        if len(parsemode) < 1:
            if args[0] == "-n":
                parsemode.insert(0, "name")
            else:
                channels.append(args[0])
        else:
            if parsemode[0] == "name":
                name = args[0]
            elif parsemode[0] == "host":
                host = args[0]
            parsemode = parsemode[1:]
        args = args[1:]
    if host == None:
        print("Usage: " + cmd + " [-n <name>] <host> <channel> [<channel> ...]")
        return
    else:
        Handler(host=host, name=name channels=channels)

if __name__ == "__main__":
    if __name__ == '__main__':
        main(sys.argv[0], sys.argv[1:] if len(sys.argv) > 1 else [])
{'fraction_non_alphanumeric': 0.14465408805031446, 'fraction_numerical': 0.015908250092489827, 'mean_word_length': 2.083238312428734, 'pattern_counts': {'":': 8, '<': 13, '<?xml version=': 0, '>': 16, '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': '2795180', 'n_tokens_mistral': 891, 'n_tokens_neox': 863, 'n_words': 213}