style: 代码格式化

This commit is contained in:
2025-12-13 21:47:37 +08:00
parent a0b327cdbb
commit baa7ac8ee9
64 changed files with 755 additions and 573 deletions

View File

@@ -4,8 +4,10 @@ import heurams.kernel.particles as pt
from .states import PhaserState, ProcessionState
from .procession import Procession
class Phaser():
class Phaser:
"""移相器: 全局调度阶段管理器"""
def __init__(self, atoms: list[pt.Atom]) -> None:
new_atoms = list()
old_atoms = list()
@@ -17,10 +19,14 @@ class Phaser():
old_atoms.append(i)
self.processions = list()
if len(old_atoms):
self.processions.append(Procession(old_atoms, PhaserState.QUICK_REVIEW, "初始复习"))
self.processions.append(
Procession(old_atoms, PhaserState.QUICK_REVIEW, "初始复习")
)
if len(new_atoms):
self.processions.append(Procession(new_atoms,PhaserState.RECOGNITION, "新记忆"))
self.processions.append(Procession(atoms,PhaserState.FINAL_REVIEW, "总体复习"))
self.processions.append(
Procession(new_atoms, PhaserState.RECOGNITION, "新记忆")
)
self.processions.append(Procession(atoms, PhaserState.FINAL_REVIEW, "总体复习"))
def current_procession(self):
for i in self.processions:
@@ -29,4 +35,4 @@ class Phaser():
self.state = i.phase
return i
self.state = PhaserState.FINISHED
return 0
return 0