mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 06:25:23 +01:00
Sort genList after instead of insort
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
from os import sep as SEP
|
from os import sep as SEP
|
||||||
import traceback
|
import traceback
|
||||||
import bisect
|
|
||||||
|
|
||||||
genList = []
|
genList = []
|
||||||
|
|
||||||
@@ -18,7 +17,7 @@ class Generator:
|
|||||||
funcname = path.split(SEP)[-1].strip()[:-3]
|
funcname = path.split(SEP)[-1].strip()[:-3]
|
||||||
# Gets the name of the subject folder
|
# Gets the name of the subject folder
|
||||||
subjectname = path.split(SEP)[-2].strip()
|
subjectname = path.split(SEP)[-2].strip()
|
||||||
bisect.insort(genList, [id, title, self, funcname, subjectname, kwargs])
|
genList.append([id, title, self, funcname, subjectname, kwargs])
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return str(self.id) + " " + self.title
|
return str(self.id) + " " + self.title
|
||||||
@@ -28,4 +27,5 @@ class Generator:
|
|||||||
|
|
||||||
|
|
||||||
def getGenList():
|
def getGenList():
|
||||||
|
genList.sort()
|
||||||
return genList
|
return genList
|
||||||
|
|||||||
Reference in New Issue
Block a user