feat: 完成部分界面重构
This commit is contained in:
@@ -21,7 +21,7 @@ class Electron:
|
||||
algo_name: 使用的算法模块标识
|
||||
"""
|
||||
if algo_name == "":
|
||||
algo_name = "sm-2"
|
||||
algo_name = "SM-2"
|
||||
self.algodata = algodata
|
||||
self.ident = ident
|
||||
self.algo: algolib.BaseAlgorithm = algorithms[algo_name]
|
||||
@@ -29,6 +29,11 @@ class Electron:
|
||||
if not self.algo.check_integrity(self.algodata):
|
||||
self.algodata[self.algo.algo_name] = deepcopy(self.algo.defaults)
|
||||
|
||||
def __repr__(self):
|
||||
from pprint import pformat
|
||||
s = pformat(self.algodata, indent=4)
|
||||
return s
|
||||
|
||||
def activate(self):
|
||||
"""激活此电子"""
|
||||
self.algodata[self.algo.algo_name]["is_activated"] = 1
|
||||
|
||||
@@ -41,7 +41,9 @@ class Nucleon:
|
||||
return len(self.data)
|
||||
|
||||
def __repr__(self):
|
||||
return repr(self.data)
|
||||
from pprint import pformat
|
||||
s = pformat(self.data, indent=4)
|
||||
return s
|
||||
|
||||
@staticmethod
|
||||
def create_on_nucleonic_data(nucleonic_data: tuple):
|
||||
|
||||
Reference in New Issue
Block a user