<commit_before>"""
Utility classes
"""
import argparse
import importlib

class PlayerAction(argparse.Action):
    """Return a module"""
    def __init__(self, option_strings, dest, **kwargs):
        super(PlayerAction, self).__init__(option_strings, dest, **kwargs)

    def __call__(self, parser, namespace, values, option_string=None):
        setattr(namespace, self.dest, list(map(
            lambda p:importlib.import_module('players.' + p),
            values
        )))


class BasePlayer:
    """Represents a player"""

    name = 'base'

    def __init__(self, identity='X'):
        self.identity = identity

    def __str__(self):
        return self.name

if __name__ == '__main__':
    p1 = BasePlayer('X')
    assert p1.identity == 'X'
    assert p1.oponent() == 'O'

    p2 = BasePlayer('O')
    assert p2.identity == 'O'
    assert p2.oponent() == 'X'<commit_msg>Minor edit to classes.py for lint<commit_after>"""
Utility classes
"""
import argparse
import importlib


class PlayerAction(argparse.Action):
    """Return a module"""
    def __init__(self, option_strings, dest, **kwargs):
        super(PlayerAction, self).__init__(option_strings, dest, **kwargs)

    def __call__(self, parser, namespace, values, option_string=None):
        setattr(namespace, self.dest, list(map(
            lambda p: importlib.import_module('players.' + p),
            values
        )))


class BasePlayer:
    """Represents a player"""

    name = 'base'

    def __init__(self, identity='X'):
        self.identity = identity

    def __str__(self):
        return self.name


if __name__ == '__main__':
    p1 = BasePlayer('X')
    assert p1.identity == 'X'
    assert p1.oponent() == 'O'

    p2 = BasePlayer('O')
    assert p2.identity == 'O'
    assert p2.oponent() == 'X'
{'fraction_non_alphanumeric': 0.14045886961387802, 'fraction_numerical': 0.006715165081141578, 'mean_word_length': 3.0452488687782804, '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': '1314416', 'n_tokens_mistral': 570, 'n_tokens_neox': 553, 'n_words': 143}