<commit_before># -*- coding: utf-8 -*-

from percy.connection import Connection
from percy.environment import Environment
from percy.config import Config
from percy.user_agent import UserAgent
from percy import utils

__all__ = ['Client']


class Client(object):

    def __init__(self, connection=None, config=None, environment=None):
        self._environment = environment if environment else Environment()
        self._config = config if config else Config()
        self._user_agent = str(UserAgent(self))
        self._connection = connection if connection else Connection(self.config, self._user_agent)

    @property
    def connection(self):
        return self._connection

    @property
    def config(self):
        return self._config

    @property
    def environment(self):
        return self._environment

    @property
    def user_agent(self):
        return self._user_agent

    def create_build(self, **kwargs):
        repo = kwargs.get('repo') or self.environment.repo
        branch = kwargs.get('branch') or self.environment.branch
        commit_sha = kwargs.get('commit_sha') or self.environment.commit_sha
        pull_request_number = kwargs.get('pull_request_number') \
            or self.environment.pull_request_number
        resources = kwargs.get('resources')

        data = {<commit_msg>don't really need to expose the user_agent.<commit_after># -*- coding: utf-8 -*-

from percy.connection import Connection
from percy.environment import Environment
from percy.config import Config
from percy.user_agent import UserAgent
from percy import utils

__all__ = ['Client']


class Client(object):

    def __init__(self, connection=None, config=None, environment=None):
        self._environment = environment if environment else Environment()
        self._config = config if config else Config()
        self._user_agent = str(UserAgent(self))
        self._connection = connection if connection else Connection(self.config, self._user_agent)

    @property
    def connection(self):
        return self._connection

    @property
    def config(self):
        return self._config

    @property
    def environment(self):
        return self._environment

    def create_build(self, **kwargs):
        repo = kwargs.get('repo') or self.environment.repo
        branch = kwargs.get('branch') or self.environment.branch
        commit_sha = kwargs.get('commit_sha') or self.environment.commit_sha
        pull_request_number = kwargs.get('pull_request_number') \
            or self.environment.pull_request_number
        resources = kwargs.get('resources')

        data = {
{'fraction_non_alphanumeric': 0.09146574818216609, 'fraction_numerical': 0.0007654037504783774, 'mean_word_length': 3.222940226171244, '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': '4844044', 'n_tokens_mistral': 683, 'n_tokens_neox': 678, 'n_words': 191}