scraper/github/queryManager.py
def fileLoad(self, filePath=None, updatePath=True):
        """Load a JSON data file into the internal JSON data dictionary.

        Current internal data will be overwritten.
        If no file path is provided, the stored data file path will be used.

        Args:
            filePath (Optional[str]): A relative or absolute path to a
                '.json' file. Defaults to None.
            updatePath (Optional[bool]): Specifies whether or not to update
                the stored data file path. Defaults to True.

        """
        if not filePath:
            filePath = self.filePath
        if not os.path.isfile(filePath):
            raise FileNotFoundError("Data file '%s' does not exist." % (filePath))
        else:
            print("Importing existing data file '%s' ... " % (filePath), end="", flush=True)
            with open(filePath, "r") as q:
                data_raw = q.read()
            print("Imported!")
            self.data = json.loads(data_raw)
            if updatePath:
                self.filePath = filePath
def fileLoad(self, filePath=None, updatePath=True):
        """Load a JSON data file into the internal JSON data dictionary.

        Current internal data will be overwritten.
        If no file path is provided, the stored data file path will be used.

        Args:
            filePath (Optional[str]): A relative or absolute path to a
                '.json' file. Defaults to None.
            updatePath (Optional[bool]): Specifies whether or not to update
                the stored data file path. Defaults to True.

        """
        if not filePath:
            filePath = self.filePath
        if not os.path.isfile(filePath):
            raise FileNotFoundError("Data file '%s' does not exist." % (filePath))
        else:
            print("Importing existing data file '%s' ... " % (filePath), end="", flush=True)
            with open(filePath, "r") as q:
                data_raw = q.read()
            print("Imported!")
            self.data = json.loads(data_raw)
            if updatePath:
                self.filePath = filePath
Load a JSON data file into the internal JSON data dictionary.

        Current internal data will be overwritten.
        If no file path is provided, the stored data file path will be used.

        Args:
            filePath (Optional[str]): A relative or absolute path to a
                '.json' file. Defaults to None.
            updatePath (Optional[bool]): Specifies whether or not to update
                the stored data file path. Defaults to True.