浏览代码

fix linter

jrobinAV 1 年之前
父节点
当前提交
ba06e71bb5

+ 0 - 1
taipy/core/scenario/scenario.py

@@ -8,7 +8,6 @@
 # Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
 # 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
 # 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.
 # specific language governing permissions and limitations under the License.
-
 from __future__ import annotations
 from __future__ import annotations
 
 
 import networkx as nx
 import networkx as nx

+ 1 - 3
tests/core/scenario/test_scenario.py

@@ -8,9 +8,7 @@
 # Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
 # 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
 # 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.
 # specific language governing permissions and limitations under the License.
-import typing
 from datetime import datetime, timedelta
 from datetime import datetime, timedelta
-from typing import Set
 from unittest import mock
 from unittest import mock
 
 
 import pytest
 import pytest
@@ -369,7 +367,7 @@ def test_renaming_existing_sequence_raises_exception(data_node):
 
 
     scenario.add_sequence("sequence_1", [task_1])
     scenario.add_sequence("sequence_1", [task_1])
     scenario.add_sequence("sequence_2", [task_2])
     scenario.add_sequence("sequence_2", [task_2])
-    with pytest.raises(SequenceAlreadyExists) as err:
+    with pytest.raises(SequenceAlreadyExists):
         scenario.rename_sequence("sequence_1", "sequence_2")
         scenario.rename_sequence("sequence_1", "sequence_2")
 
 
 
 

+ 1 - 1
tests/core/sequence/test_sequence_manager.py

@@ -31,7 +31,7 @@ from taipy.core.exceptions.exceptions import (
     InvalidSequenceId,
     InvalidSequenceId,
     ModelNotFound,
     ModelNotFound,
     NonExistingSequence,
     NonExistingSequence,
-    SequenceBelongsToNonExistingScenario, SequenceAlreadyExists,
+    SequenceAlreadyExists, SequenceBelongsToNonExistingScenario,
 )
 )
 from taipy.core.job._job_manager import _JobManager
 from taipy.core.job._job_manager import _JobManager
 from taipy.core.scenario._scenario_manager import _ScenarioManager
 from taipy.core.scenario._scenario_manager import _ScenarioManager