<commit_before># -*- coding: utf-8 -*-
"""Swagger generated client 'monkey-patch' for logging API requests

isort:skip_file
"""

# yapf: disable
from models import OrcidApiCall
from swagger_client import rest


class HubRESTClientObject(rest.RESTClientObject):
    def request(self,
                method,
                url,
                query_params=None,
                headers=None,
                body=None,
                post_params=None,
                _preload_content=True,
                _request_timeout=None,
                **kwargs):

        OrcidApiCall.create(
            user=current_user, method=method, url=url, query_params=query_params, body=body)
        print(url)
        super().request(method, url, query_params, headers, body, post_params, _preload_contente,
                        _request_timeout, **kwargs)


from swagger_client import *  # noqa: F401, F403
api_client.RESTClientObject = HubRESTClientObject<commit_msg>[skip ci] ...<commit_after># -*- coding: utf-8 -*-
"""Swagger generated client 'monkey-patch' for logging API requests

isort:skip_file
"""

from flask_login import current_user, login_required
from models import OrcidApiCall
from swagger_client import rest


class HubRESTClientObject(rest.RESTClientObject):
    def request(self,
                method,
                url,
                query_params=None,
                headers=None,
                body=None,
                post_params=None,
                _preload_content=True,
                _request_timeout=None,
                **kwargs):

        OrcidApiCall.create(
            user=current_user, method=method, url=url, query_params=query_params, body=body)
        print(url)
        super().request(method, url, query_params, headers, body, post_params, _preload_contente,
                        _request_timeout, **kwargs)


# yapf: disable
from swagger_client import *  # noqa: F401, F403
api_client.RESTClientObject = HubRESTClientObject
{'fraction_non_alphanumeric': 0.08691258211217787, 'fraction_numerical': 0.007074279939363315, 'mean_word_length': 2.338954468802698, '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': '6765286', 'n_tokens_mistral': 583, 'n_tokens_neox': 542, 'n_words': 124}