ZeroKnight / ZeroBot

My personal IRC/Multi-protocol Bot created (and re-created) for education and amusement.
MIT License
1 stars 0 forks source link

Restructure `zerobot.common` #56

Closed ZeroKnight closed 3 months ago

ZeroKnight commented 3 months ago

This module is getting a bit... all over the place. Some stuff in here should probably be in its own module entirely or not weirdly split off one that exists, e.g. CommandParser et al from zerobot.command. Enums in zerobot.common.enums should be grouped with their respective modules rather than in this odd bucket of miscellaneous enums.

Also rethink what/how we export things in __init__.py files or if we should do that at all; as it stands, there's a bit of an assortment from all different parts of ZeroBot mixed into zerobot.common, and while that is kind of the point, it does obfuscate a bit where things are coming from. Perhaps after reorganizing things it would be worthwhile to take a look at what features and protocols import the most and either export those in common or perhaps set up some tasteful __all__ declarations.

Further, it's a bit weird having both a zerobot.util and a zerobot.common.util. The original idea was that the former is for things that ZeroBot would use internally and the latter for feature/protocol modules. However, features/protocols have used both at this point and it seems too arbitrary to have two different "util" modules; there should just be one.