浏览代码

fix: linter error on incompatible signature when inheriting

trgiangdo 1 年之前
父节点
当前提交
648a322dca

+ 1 - 1
taipy/core/_manager/_manager.py

@@ -154,7 +154,7 @@ class _Manager(Generic[EntityType]):
         _SubmissionManagerFactory._build_manager()._delete_many(_entity_ids.submission_ids)
 
     @classmethod
-    def _export(cls, id: str, folder_path: Union[str, pathlib.Path]):
+    def _export(cls, id: str, folder_path: Union[str, pathlib.Path], **kwargs):
         """
         Export an entity.
         """

+ 6 - 8
taipy/core/data/_data_manager.py

@@ -168,20 +168,18 @@ class _DataManager(_Manager[DataNode], _VersionMixin):
     @classmethod
     def _export(
         cls,
-        data_node_id: DataNodeId,
+        id: DataNodeId,
         folder_path: Union[str, pathlib.Path],
-        include_data: Optional[bool] = False,
+        **kwargs,
     ):
-        cls._repository._export(data_node_id, folder_path)
+        cls._repository._export(id, folder_path)
 
-        if not include_data:
+        if not kwargs.get("include_data"):
             return
 
-        data_node = cls._get(data_node_id)
+        data_node = cls._get(id)
         if not isinstance(data_node, _FileDataNodeMixin):
-            cls._logger.warning(
-                f"Data node {data_node_id} is not a file-based data node and the data will not be exported."
-            )
+            cls._logger.warning(f"Data node {id} is not a file-based data node and the data will not be exported.")
             return
 
         if isinstance(folder_path, str):

+ 1 - 1
taipy/core/sequence/_sequence_manager.py

@@ -344,7 +344,7 @@ class _SequenceManager(_Manager[Sequence], _VersionMixin):
         return True if cls._get(entity_id) else False
 
     @classmethod
-    def _export(cls, id: str, folder_path: Union[str, pathlib.Path]):
+    def _export(cls, id: str, folder_path: Union[str, pathlib.Path], **kwargs):
         """
         Export a Sequence entity.
         """

+ 1 - 1
taipy/core/taipy.py

@@ -980,7 +980,7 @@ def export_scenario(
             raise ExportFolderAlreadyExists(str(folder_path), scenario_id)
 
     for data_node_id in entity_ids.data_node_ids:
-        _DataManagerFactory._build_manager()._export(data_node_id, folder_path, include_data)
+        _DataManagerFactory._build_manager()._export(data_node_id, folder_path, include_data=include_data)
     for task_id in entity_ids.task_ids:
         _TaskManagerFactory._build_manager()._export(task_id, folder_path)
     for sequence_id in entity_ids.sequence_ids: