You've already forked HeurAMS-Classic
feat: 代码格式化, 改进仪表盘, 新增多CSS支持
This commit is contained in:
@@ -15,7 +15,7 @@ class BasePuzzleWidget(Widget):
|
||||
id: str | None = None,
|
||||
classes: str | None = None,
|
||||
disabled: bool = False,
|
||||
markup: bool = True
|
||||
markup: bool = True,
|
||||
) -> None:
|
||||
super().__init__(
|
||||
*children,
|
||||
@@ -23,7 +23,7 @@ class BasePuzzleWidget(Widget):
|
||||
id=id,
|
||||
classes=classes,
|
||||
disabled=disabled,
|
||||
markup=markup
|
||||
markup=markup,
|
||||
)
|
||||
self.atom = atom
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ class ClozePuzzle(BasePuzzleWidget):
|
||||
if lst:
|
||||
lastone = lst[-1]
|
||||
for i in lst[:-1]:
|
||||
s += (i + ' ')
|
||||
s += i + " "
|
||||
s += f" `{lastone}`"
|
||||
return s
|
||||
|
||||
|
||||
@@ -55,8 +55,8 @@ class MCQPuzzle(BasePuzzleWidget):
|
||||
|
||||
def _load(self):
|
||||
cfg = self.atom.registry["nucleon"]["puzzles"][self.alia]
|
||||
if cfg['mapping'] == {}:
|
||||
self.screen.rating = 5 # type: ignore
|
||||
if cfg["mapping"] == {}:
|
||||
self.screen.rating = 5 # type: ignore
|
||||
self.puzzle = pz.MCQPuzzle(
|
||||
cfg["mapping"], cfg["jammer"], int(cfg["max_riddles_num"]), cfg["prefix"]
|
||||
)
|
||||
|
||||
@@ -11,7 +11,7 @@ class Placeholder(Widget):
|
||||
id: str | None = None,
|
||||
classes: str | None = None,
|
||||
disabled: bool = False,
|
||||
markup: bool = True
|
||||
markup: bool = True,
|
||||
) -> None:
|
||||
super().__init__(
|
||||
*children,
|
||||
@@ -19,7 +19,7 @@ class Placeholder(Widget):
|
||||
id=id,
|
||||
classes=classes,
|
||||
disabled=disabled,
|
||||
markup=markup
|
||||
markup=markup,
|
||||
)
|
||||
|
||||
def compose(self):
|
||||
|
||||
@@ -67,7 +67,7 @@ class Recognition(BasePuzzleWidget):
|
||||
f";{delim}": ";",
|
||||
f":{delim}": ":",
|
||||
}
|
||||
|
||||
|
||||
primary = cfg["primary"]
|
||||
|
||||
with Center():
|
||||
@@ -88,7 +88,7 @@ class Recognition(BasePuzzleWidget):
|
||||
for item in cfg["secondary"]:
|
||||
if isinstance(item, list):
|
||||
for j in item:
|
||||
yield Markdown(f"### 笔记: {j}") #TODO ANNOTATION
|
||||
yield Markdown(f"### 笔记: {j}") # TODO ANNOTATION
|
||||
continue
|
||||
if isinstance(item, Dict):
|
||||
total = ""
|
||||
|
||||
Reference in New Issue
Block a user