Browse Source

fix: clean up type: ignore in manager factories

trgiangdo 6 tháng trước cách đây
mục cha
commit
74ae961878

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

@@ -20,7 +20,7 @@ from ._manager import _Manager
 class _ManagerFactory:
     @classmethod
     @abstractmethod
-    def _build_manager(cls) -> Type[_Manager]:  # type: ignore
+    def _build_manager(cls) -> Type[_Manager]:
         raise NotImplementedError
 
     @classmethod

+ 2 - 1
taipy/core/data/_data_manager_factory.py

@@ -8,6 +8,7 @@
 # Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
 # an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
 # specific language governing permissions and limitations under the License.
+
 from functools import lru_cache
 from typing import Type
 
@@ -27,7 +28,7 @@ class _DataManagerFactory(_ManagerFactory):
         if EnterpriseEditionUtils._using_enterprise():
             data_manager = _load_fct(
                 EnterpriseEditionUtils._TAIPY_ENTERPRISE_CORE_MODULE + ".data._data_manager", "_DataManager"
-            )  # type: ignore
+            )
             build_repository = _load_fct(
                 EnterpriseEditionUtils._TAIPY_ENTERPRISE_CORE_MODULE + ".data._data_manager_factory",
                 "_DataManagerFactory",

+ 2 - 1
taipy/core/job/_job_manager_factory.py

@@ -8,6 +8,7 @@
 # Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
 # an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
 # specific language governing permissions and limitations under the License.
+
 from functools import lru_cache
 from typing import Type
 
@@ -27,7 +28,7 @@ class _JobManagerFactory(_ManagerFactory):
         if EnterpriseEditionUtils._using_enterprise():
             job_manager = _load_fct(
                 EnterpriseEditionUtils._TAIPY_ENTERPRISE_CORE_MODULE + ".job._job_manager", "_JobManager"
-            )  # type: ignore
+            )
             build_repository = _load_fct(
                 EnterpriseEditionUtils._TAIPY_ENTERPRISE_CORE_MODULE + ".job._job_manager_factory", "_JobManagerFactory"
             )._build_repository  # type: ignore

+ 2 - 1
taipy/core/scenario/_scenario_manager_factory.py

@@ -8,6 +8,7 @@
 # Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
 # an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
 # specific language governing permissions and limitations under the License.
+
 from functools import lru_cache
 from typing import Type
 
@@ -27,7 +28,7 @@ class _ScenarioManagerFactory(_ManagerFactory):
         if EnterpriseEditionUtils._using_enterprise():
             scenario_manager = _load_fct(
                 EnterpriseEditionUtils._TAIPY_ENTERPRISE_CORE_MODULE + ".scenario._scenario_manager", "_ScenarioManager"
-            )  # type: ignore
+            )
             build_repository = _load_fct(
                 EnterpriseEditionUtils._TAIPY_ENTERPRISE_CORE_MODULE + ".scenario._scenario_manager_factory",
                 "_ScenarioManagerFactory",

+ 3 - 2
taipy/core/sequence/_sequence_manager_factory.py

@@ -8,6 +8,7 @@
 # Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
 # an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
 # specific language governing permissions and limitations under the License.
+
 from functools import lru_cache
 from typing import Type
 
@@ -20,11 +21,11 @@ from ._sequence_manager import _SequenceManager
 class _SequenceManagerFactory(_ManagerFactory):
     @classmethod
     @lru_cache
-    def _build_manager(cls) -> Type[_SequenceManager]:  # type: ignore
+    def _build_manager(cls) -> Type[_SequenceManager]:
         if EnterpriseEditionUtils._using_enterprise():
             sequence_manager = _load_fct(
                 EnterpriseEditionUtils._TAIPY_ENTERPRISE_CORE_MODULE + ".sequence._sequence_manager", "_SequenceManager"
-            )  # type: ignore
+            )
         else:
             sequence_manager = _SequenceManager
         return sequence_manager  # type: ignore

+ 2 - 1
taipy/core/submission/_submission_manager_factory.py

@@ -8,6 +8,7 @@
 # Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
 # an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
 # specific language governing permissions and limitations under the License.
+
 from functools import lru_cache
 from typing import Type
 
@@ -28,7 +29,7 @@ class _SubmissionManagerFactory(_ManagerFactory):
             submission_manager = _load_fct(
                 EnterpriseEditionUtils._TAIPY_ENTERPRISE_CORE_MODULE + ".submission._submission_manager",
                 "_SubmissionManager",
-            )  # type: ignore
+            )
             build_repository = _load_fct(
                 EnterpriseEditionUtils._TAIPY_ENTERPRISE_CORE_MODULE + ".submission._submission_manager_factory",
                 "_SubmissionManagerFactory",