From a82bfa8a56b9e7d5317b183c65ff9cc1a8552765 Mon Sep 17 00:00:00 2001 From: Junyan Qin <1010553892@qq.com> Date: Fri, 8 Mar 2024 11:38:26 +0000 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=B8=BA=E5=91=BD=E4=BB=A4=E8=A3=85?= =?UTF-8?q?=E9=A5=B0=E5=99=A8=E6=B7=BB=E5=8A=A0=E6=96=AD=E8=A8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/command/operator.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/command/operator.py b/pkg/command/operator.py index a666f2c3..c5b0615b 100644 --- a/pkg/command/operator.py +++ b/pkg/command/operator.py @@ -20,6 +20,8 @@ def operator_class( parent_class: typing.Type[CommandOperator] = None ) -> typing.Callable[[typing.Type[CommandOperator]], typing.Type[CommandOperator]]: def decorator(cls: typing.Type[CommandOperator]) -> typing.Type[CommandOperator]: + assert issubclass(cls, CommandOperator) + cls.name = name cls.alias = alias cls.help = help