<commit_before>from typing import Dict, Union, Tuple, Optional

import aiohttp

PayloadType = Union[Optional[Dict[str, Union[Optional[str], Optional[bool]]]],
                    Optional[Tuple[Union[Optional[str], Optional[bool]], ...]]]


class AsyncClientException(Exception):
    def __init__(self,
                 message: str,
                 status: int) -> None:
        self.message = message
        self.status = status

    def __str__(self) -> str:
        return f"<AsyncClientException> message: {self.message}, status: {self.status}"


class AsyncClientNotFoundException(AsyncClientException):
    def __init__(self, message: str) -> None:
        super(AsyncClientNotFoundException, self).__init__(message, 404)


class Payload:
    def __init__(self, data: PayloadType) -> None:
        self.data: PayloadType = data

    @staticmethod
    def from_args(*args: Union[str, bool]) -> 'Payload':
        return Payload(args)

    @staticmethod
    def from_kwargs(**kwargs: Union[Optional[bool], Optional[str]]) -> 'Payload':
        return Payload(kwargs)


class AsyncClient:
    def __init__(self,
                 base_url: str,
                 session_headers: Dict[str, str]) -> None:
        self.base_url = base_url
        self.session_headers = session_headers
        self.__session: aiohttp.ClientSession = None

    @property
    def session(self) -> aiohttp.ClientSession:
        if self.__session is None or self.__session.closed:
            self.__session = aiohttp.ClientSession(headers=self.session_headers)
        return self.__session
<commit_msg>Payload can accept List arguments<commit_after>from typing import Dict, Union, Tuple, Optional, List

import aiohttp

PayloadType = Union[Optional[Dict[str, Union[Optional[str], Optional[bool], Optional[List]]]],
                    Optional[Tuple[Union[Optional[str], Optional[bool]], ...]]]


class AsyncClientException(Exception):
    def __init__(self,
                 message: str,
                 status: int) -> None:
        self.message = message
        self.status = status

    def __str__(self) -> str:
        return f"<AsyncClientException> message: {self.message}, status: {self.status}"


class AsyncClientNotFoundException(AsyncClientException):
    def __init__(self, message: str) -> None:
        super(AsyncClientNotFoundException, self).__init__(message, 404)


class Payload:
    def __init__(self, data: PayloadType) -> None:
        self.data: PayloadType = data

    @staticmethod
    def from_args(*args: Union[str, bool]) -> 'Payload':
        return Payload(args)

    @staticmethod
    def from_kwargs(**kwargs: Union[Optional[bool], Optional[str], Optional[List]]) -> 'Payload':
        return Payload(kwargs)


class AsyncClient:
    def __init__(self,
                 base_url: str,
                 session_headers: Dict[str, str]) -> None:
        self.base_url = base_url
        self.session_headers = session_headers
        self.__session: aiohttp.ClientSession = None

    @property
    def session(self) -> aiohttp.ClientSession:
        if self.__session is None or self.__session.closed:
            self.__session = aiohttp.ClientSession(headers=self.session_headers)
        return self.__session

{'fraction_non_alphanumeric': 0.10977118119975263, 'fraction_numerical': 0.0018552875695732839, 'mean_word_length': 2.9644607843137254, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 21, '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': '4009625', 'n_tokens_mistral': 907, 'n_tokens_neox': 882, 'n_words': 215}