<commit_before># Copyright (c) 2016 <NAME>.V.
# Uranium is released under the terms of the AGPLv3 or higher.

from UM.Logger import Logger
from UM.PluginRegistry import PluginRegistry


##  Central class for reading and writing workspaces.
#   This class is created by Application and handles reading and writing workspace files.
class WorkspaceFileHandler:
    def __init__(self):
        super().__init__()

        self._workspace_readers = {}
        self._workspace_writers = {}

        PluginRegistry.addType("workspace_readers", self.addReader)
        PluginRegistry.addType("workspace_writers", self.addWriter)

    ##  Register a workspace reader
    #   \param reader \type{WorkspaceReader} The WorkspaceReader to register.
    def addReader(self, reader):
        self._workspace_readers[reader.getsPluginId()] = reader

    ##  Register a workspace writer
    #   \param reader \type{WorkspaceWriter} The WorkspaceWriter to register.
    def addWriter(self, writer):
        self._workspace_writers[writer.getPluginId()] = writer<commit_msg>Made WorkspaceFileHandler use Filehandler as well<commit_after># Copyright (c) 2016 <NAME>.V.
# Uranium is released under the terms of the AGPLv3 or higher.

from UM.Logger import Logger
from UM.FileHandler.FileHandler import FileHandler


##  Central class for reading and writing workspaces.
#   This class is created by Application and handles reading and writing workspace files.
class WorkspaceFileHandler(FileHandler):
    def __init__(self):
        super().__init__("workspace_writers", "workspace_readers")
{'fraction_non_alphanumeric': 0.07898089171974522, 'fraction_numerical': 0.006369426751592357, 'mean_word_length': 4.10064935064935, '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': '4874402', 'n_tokens_mistral': 441, 'n_tokens_neox': 416, 'n_words': 141}