<commit_before>class UserAPI(object):
    attributes = ('email', 'full_name', 'password')

    def __init__(self, client):
        self.client = client

    def list(self, **kwargs):
        return self.client.request('users', params=kwargs)

    def create(self, full_name, email, password):
        payload = {
            'full_name': full_name,
            'email': email,
            'password': password,
        }
        return self.client.request('users', method='post', json=payload)

    def get(self, user_id):
        return self.client.request('users/{0}'.format(user_id))

    def update(self, user_id, full_name=None, email=None, password=<PASSWORD>):
        payload = {}
        if full_name:
            payload['full_name'] = full_name
        if email:
            payload['email'] = email
        if password:
            payload['password'] = password

        if payload:
            return self.client.request('users/{0}'.format(user_id),
                method='patch', json=payload)

    def remove(self, user_id):
        return self.client.request('users/{0}'.format(user_id), method='delete')<commit_msg>refactor(user): rename remove() to delete(); deprecate remove()<commit_after>import warnings


class UserAPI(object):
    attributes = ('email', 'full_name', 'password')

    def __init__(self, client):
        self.client = client

    def list(self, **kwargs):
        return self.client.request('users', params=kwargs)

    def create(self, full_name, email, password):
        payload = {
            'full_name': full_name,
            'email': email,
            'password': password,
        }
        return self.client.request('users', method='post', json=payload)

    def get(self, user_id):
        return self.client.request('users/{0}'.format(user_id))

    def update(self, user_id, full_name=None, email=None, password=<PASSWORD>):
        payload = {}
        if full_name:
            payload['full_name'] = full_name
        if email:
            payload['email'] = email
        if password:
            payload['password'] = password

        if payload:
            return self.client.request('users/{0}'.format(user_id),
                method='patch', json=payload)

    def delete(self, user_id):
        return self.client.request('users/{0}'.format(user_id), method='delete')

    def remove(self, user_id):
        warnings.warn('The function remove() is deprecated, use delete().',
        DeprecationWarning, stacklevel=2)
        return self.delete(user_id)
{'fraction_non_alphanumeric': 0.13758921490880255, 'fraction_numerical': 0.0027755749405233942, 'mean_word_length': 2.5585331452750353, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1505552', 'n_tokens_mistral': 725, 'n_tokens_neox': 704, 'n_words': 159}