diff --git a/setup.py b/setup.py index 8b3efbbc9..b4c21ec3e 100644 --- a/setup.py +++ b/setup.py @@ -56,7 +56,7 @@ test_suite="tests", tests_require=test_requirements, url="https://github.com/avaiga/taipy-core", - version="1.1.2", + version="1.1.3", zip_safe=False, extras_require=extras_require, ) diff --git a/taipy/core/_repository/_fs_base.py b/taipy/core/_repository/_fs_base.py index 79f25fd11..b9a05815d 100644 --- a/taipy/core/_repository/_fs_base.py +++ b/taipy/core/_repository/_fs_base.py @@ -94,7 +94,7 @@ def dir_path(self): def load(self, model_id: str) -> Entity: try: return self.__to_entity( - self.__get_model_filepath(model_id), retry=Config.global_config.read_entity_retry or 0 + self._get_model_filepath(model_id), retry=Config.global_config.read_entity_retry or 0 ) # type: ignore except FileNotFoundError: raise ModelNotFound(str(self.dir_path), model_id) @@ -119,7 +119,7 @@ def _save(self, entity): self.__create_directory_if_not_exists() model = self._to_model(entity) - self.__get_model_filepath(model.id).write_text( + self._get_model_filepath(model.id).write_text( json.dumps(model.to_dict(), ensure_ascii=False, indent=0, cls=_CustomEncoder, check_circular=False) ) @@ -128,7 +128,7 @@ def _delete_all(self): def _delete(self, model_id: str): try: - self.__get_model_filepath(model_id).unlink() + self._get_model_filepath(model_id).unlink() except FileNotFoundError: raise ModelNotFound(str(self.dir_path), model_id) @@ -181,7 +181,7 @@ def _get_by_configs_and_parent_ids(self, configs_and_parent_ids): def __search(self, attribute: str, value: str) -> Iterator[Entity]: return filter(lambda e: getattr(e, attribute, None) == value, self._load_all()) - def __get_model_filepath(self, model_id) -> pathlib.Path: + def _get_model_filepath(self, model_id) -> pathlib.Path: return self.dir_path / f"{model_id}.json" def __to_entity(self, filepath, by: Optional[str] = None, retry: Optional[int] = 0) -> Entity: