完成 0.4.0 版本更新, 为了消除此前提交消息风格不一致与错误提交超大文件的问题, 维持代码统计数据的准确性和提交消息风格的一致性, 重新初始化仓库; 旧的提交历史在 HeurAMS-legacy 仓库(https://gitea.imwangzhiyu.xyz/ajax/HeurAMS-legacy)
33 lines
771 B
Python
33 lines
771 B
Python
from typing import Iterable
|
|
from textual.app import ComposeResult
|
|
from textual.widget import Widget
|
|
import heurams.kernel.particles as pt
|
|
|
|
|
|
class BasePuzzleWidget(Widget):
|
|
def __init__(
|
|
self,
|
|
*children: Widget,
|
|
atom: pt.Atom,
|
|
name: str | None = None,
|
|
id: str | None = None,
|
|
classes: str | None = None,
|
|
disabled: bool = False,
|
|
markup: bool = True
|
|
) -> None:
|
|
super().__init__(
|
|
*children,
|
|
name=name,
|
|
id=id,
|
|
classes=classes,
|
|
disabled=disabled,
|
|
markup=markup
|
|
)
|
|
self.atom = atom
|
|
|
|
def compose(self) -> Iterable[Widget]:
|
|
return super().compose()
|
|
|
|
def handler(self, rating) -> None:
|
|
pass
|