<commit_before># -*- coding: utf-8 -*-
"""
    silo.storages.base
    ~~~~~~~~~~~~~~~~~~

    :copyright: (c) 2014 by <NAME>.
    :license: MIT, see LICENSE for more details.
"""


class Storage(object):

    def delete(self, name):
        """Delete the file referenced by ``name``.

        If the file does not exist, raises :exc:`.FileNotFoundError`.

        If the storage system does not support file deletion, raises
        :exc:`~exceptions.NotImplementedError`.

        """
        raise NotImplementedError

    def exists(self, name):
        """Return ``True`` if the file referenced by ``name`` exists in
        the storage system, or ``False`` if the name is available for a
        new file.

        """
        raise NotImplementedError

    def open(self, name, mode='r', encoding=None):
        """Open the file referenced by ``name`` and return a<commit_msg>Add docstring for Storage class<commit_after># -*- coding: utf-8 -*-
"""
    silo.storages.base
    ~~~~~~~~~~~~~~~~~~

    :copyright: (c) 2014 by <NAME>.
    :license: MIT, see LICENSE for more details.
"""


class Storage(object):
    """An abstract interface for concrete storage drivers."""

    def delete(self, name):
        """Delete the file referenced by ``name``.

        If the file does not exist, raises :exc:`.FileNotFoundError`.

        If the storage system does not support file deletion, raises
        :exc:`~exceptions.NotImplementedError`.

        """
        raise NotImplementedError

    def exists(self, name):
        """Return ``True`` if the file referenced by ``name`` exists in
        the storage system, or ``False`` if the name is available for a
        new file.

        """
        raise NotImplementedError

    def open(self, name, mode='r', encoding=None):
        """Open the file referenced by ``name`` and return a
{'fraction_non_alphanumeric': 0.13720173535791758, 'fraction_numerical': 0.005422993492407809, 'mean_word_length': 2.62475442043222, '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': '5357045', 'n_tokens_mistral': 517, 'n_tokens_neox': 480, 'n_words': 192}