sopel-irc / sopel

:robot::speech_balloon: An easy-to-use and highly extensible IRC Bot framework. Formerly Willie.
https://sopel.chat
Other
951 stars 405 forks source link

dice: bugfixes, type hints, and additional tests #2532

Closed dgw closed 8 months ago

dgw commented 8 months ago

What it says on the tin, really; but the highlights (other than added test cases) are:

Follow-up to https://github.com/sopel-irc/sopel/pull/2503#issuecomment-1676205118.

Checklist

Notes

Sadly, I believe 100% test coverage is impossible using @plugin.example alone, without further modifying the plugin's logic. I got sopel/modules/dice.py up to 97%, which is still pretty good. A more in-depth explanation of where I ran into trouble is in the commit message for 7ab4be177f5708a4b5a740a46735b03ff33ae458.

This is easily bumped to 8.0.1 if it takes too long to get settled, but I would rather change the constructor interface of DicePouch in 8.0.0 even though the sopel.modules.* subpackages aren't really part of the public API. The bugfixes are nice, too.

dgw commented 8 months ago

Rebasing after #2504, to fix merge conflict, and also #2516, to get the new Python 3.12 status check.