<commit_before>import inspect


class ButlerFunction(object):
    """ButlerFunction is object to parse Butler's functions' properties"""

    def __init__(self, function_name, function_object):
        """Init properties, using inspect to get function's parameters.

        :param function_name: name of the function.
        :param function_object: the object of the function.
        """
        self.function_name = function_name
        function_name_parts = self.function_name.split('_', 1)  # handle function that doesn't contains underscore
        self.method, self.name = function_name_parts[0].upper(), function_name_parts[-1]
        self.obj = function_object
        args, _, _, defaults = inspect.getargspec(function_object)
        self.args = args[1:]
        self.defaults = defaults if defaults else []

    def get_urls(self):
        """Returns all available paths for function.
        starts with the function name (without leading method, and double underscores changed to slashes
        and than functions parameters by there order, parameters with default values can be ommitted<commit_msg>pylint: fix python3 deprecated-methodwq<commit_after>import inspect


class ButlerFunction(object):
    """ButlerFunction is object to parse Butler's functions' properties"""

    def __init__(self, function_name, function_object):
        """Init properties, using inspect to get function's parameters.

        :param function_name: name of the function.
        :param function_object: the object of the function.
        """
        self.function_name = function_name
        function_name_parts = self.function_name.split('_', 1)  # handle function that doesn't contains underscore
        self.method, self.name = function_name_parts[0].upper(), function_name_parts[-1]
        self.obj = function_object
        args, _, _, defaults = inspect.getargspec(function_object)  # pylint: disable=deprecated-method
        self.args = args[1:]
        self.defaults = defaults if defaults else []

    def get_urls(self):
        """Returns all available paths for function.
        starts with the function name (without leading method, and double underscores changed to slashes
        and than functions parameters by there order, parameters with default values can be ommitted
{'fraction_non_alphanumeric': 0.0783630822812364, 'fraction_numerical': 0.00391815411406182, 'mean_word_length': 3.4022988505747125, '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': '2611196', 'n_tokens_mistral': 580, 'n_tokens_neox': 564, 'n_words': 204}