插件实现¶
实现您自己的 hand 插件并不难,您可以参考GitHub上 mohand-plugin-expect 的实现。 您需要做的事情如下:
- 实现一个
mohand.hands.HandBase
的子类,用于注册您的 hand 装饰器、提供版本信息 - 实现一个 hand ,如 mohand-plugin-expect 中的
hand.expect
- 在
setup.py
中添加一个mohand.plugin.hand
的 entry_points
实现您自己的 hand 插件并不难,您可以参考GitHub上 mohand-plugin-expect 的实现。 您需要做的事情如下:
mohand.hands.HandBase
的子类,用于注册您的 hand 装饰器、提供版本信息hand.expect
setup.py
中添加一个 mohand.plugin.hand
的 entry_points