Skip to content

Commit cb23bfc

Browse files
authored
fix python 3.8 (#149)
* 1. Исправление локального метода при использовании дискретных параметров 2. Исправление предупреждений о проверки массивов * iteration limits fixed * fix python 3.8
1 parent 7f126d0 commit cb23bfc

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

iOpt/output_system/listeners/console_outputers.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from typing import List
2+
13
from iOpt.method.listener import Listener
24
from iOpt.method.search_data import SearchData, SearchDataItem
35
from iOpt.solution import Solution
@@ -30,7 +32,7 @@ def BeforeMethodStart(self, method: Method):
3032
self.__outputer = ConsoleOutputer(method.task.problem, method.parameters)
3133
self.__outputer.PrintInitInfo()
3234

33-
def OnEndIteration(self, currPoints: list[SearchDataItem], currSolution: Solution):
35+
def OnEndIteration(self, currPoints: List[SearchDataItem], currSolution: Solution):
3436
if self.mode == 'full':
3537
self.__outputer.PrintIterPointInfo(currPoints)
3638
elif self.mode == 'custom':

iOpt/output_system/outputers/console_outputer.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from typing import List
2+
13
from iOpt.method.search_data import SearchDataItem
24
from iOpt.problem import Problem
35
from iOpt.solution import Solution
@@ -26,7 +28,7 @@ def PrintInitInfo(self):
2628
self.parameters.numberOfParallelPoints
2729
)
2830

29-
def PrintIterPointInfo(self, savedNewPoints: list[SearchDataItem]):
31+
def PrintIterPointInfo(self, savedNewPoints: List[SearchDataItem]):
3032
if self.parameters.numberOfParallelPoints > 1:
3133
isFirst = True
3234
else:

0 commit comments

Comments
 (0)