<commit_before>class CookieManager(object):

    def __init__(self, browser_cookies):
        self._cookies = browser_cookies

    def add(self, cookies):
        for key in cookies.keys():
            self._cookies[key] = cookies[key]

    def delete(self, cookie=None):
        if not cookie:
            self._cookies.clearAll()
        else:
            try:
                del(self._cookies[cookie])
            except KeyError:
                pass

    def __getitem__(self, item):
        return self._cookies.__getitem__(item)

    def __eq__(self, other_object):
        if isinstance(other_object, dict):
            return dict(self._cookies) == other_object<commit_msg>get item directly from _cookies<commit_after>class CookieManager(object):

    def __init__(self, browser_cookies):
        self._cookies = browser_cookies

    def add(self, cookies):
        for key in cookies.keys():
            self._cookies[key] = cookies[key]

    def delete(self, cookie=None):
        if not cookie:
            self._cookies.clearAll()
        else:
            try:
                del(self._cookies[cookie])
            except KeyError:
                pass

    def __getitem__(self, item):
        return self._cookies[item]

    def __eq__(self, other_object):
        if isinstance(other_object, dict):
            return dict(self._cookies) == other_object
{'fraction_non_alphanumeric': 0.09402332361516035, 'fraction_numerical': 0.0, 'mean_word_length': 2.1063348416289593, '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': '1652742', 'n_tokens_mistral': 392, 'n_tokens_neox': 375, 'n_words': 89}