Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Module-ify and add some type hinting; move to async sqlite3 lib (#572)
* relocate all files into an actual overarching python module this facilitates packaging and relative imports also fixes some await issues and adds some type hints * rename main and add some hints/format strings * linting and hinting * aaaaa * lint * docs: reformat readme and update a few things * add script for running the bot and install uvloop in actual main function * fstrings * typing/linting * type hinting work * linting / code style / small fixes to strings * hinting * add aiosqlite and mypy typings for (optional) typechecking * relocate config & remove configurable schema location * oop * add new base cog which factors out some common functionality use it in basic cogs that dont need additional changes * relocate schema * add package manifest * docs: update info on config * rewrite bot.py with async database + some code style changes * rewrite main.py with aiosqlite and code style changes * rewrite banner cog with aiosqlite and code style changes * rewrite currency cog with aiosqlite and code style changes * rewrite customreactions cog with aiosqlite and refactoring * rewrite games cog with new base cog * rewrite helpers cog and images cog with new base cog * rewrite mod cog with aiosqlite and new base cog * change music cog to use new base cog * change quote cog to use aiosqlite and new base cog * change reminder cog to use new base cog * make add_member_if_needed util async * change score cog to new base cog + aiosqlite * comment * move Reminder.check_reminders to aiosqlite * convert mod cog to use aiosqlite * convert reminder cog to use aiosqlite * type hints for roles cog * remove unused import in score cog * cleanup in role check utils * add settings key del function in base cog * convert games cog to aiosqlite * convert helpers cog to aiosqlite * convert role restoration to aiosqlite * fix fetch_saved_roles not being async * respond with error msg if keydates encounters an http error * add error message if tex rendering fails * linting and autoformatting fixes * type fixes * lint * fix some typing complaints * fix another typing complaint * add bot health check function which checks if guild ID is set right * switch subscribers cog to new base cog fix guild errors switch to async fetch for metro status * change: switched to using lxml parser instead of python html.parser when invoking using bs4. (#573) * fix STM subscriber (?) by disabling content type checking in custom requests * add hashbang to hangman * mild refactor of customreactions cog * feat: higher level abstraction for fetching lists * lint * score code style * score reformatting * fix some funky strings * add a fetch_one higher level fn to base cog do a bit of reminder refactoring * clarifying parens * more reminders refactoring + lint * add (de)serialization to settings key methods; some related refactoring * f string * chore: more typing * chore: update dev dependencies & lockfile * lint * lint&hint * banner cog cleanup * more banner cleanup * currency cleanup * a bit of spacing * lint * update bot.py year * redo config class * type hint context in main.load fn * update dependencies, require poetry 1.4+ * update python & actions ver * new config integration work * single year range var for course url templates * new config: impl bet roll * ignore poetry toml * add example env file * fix supported python ver * ci: remove old ubuntus from matrix * chore [noci]: update copyright * chore: update more deps * chore: update pillow * lint * lint * fix: defaults for currency and music nested settings * fix: setting log levels with new config * fix: developer/moderator role checks * chore: port image config to new config object * fix: missing await for db fetchone * chore: port games config to new config model * fix: muted role checks * fix: music config model default start vol value * chore: port legacy assignable roles config to new config model * ci: tweak formatting check * fix: music config access * chore: update discordpy to 1.7.3 * fix: type hints causing bad conversions in currency cog * fix: type hints causing bad conversions in memes and roles cogs * chore: add log webhook env vars to example env * chore: remove old config class * fix: listing all roles not working * example env wording * [fix]: fixed field name in example.env * update course year range to 24-25 * steal #519 * update dependencies * dockerfile work * some paginator type hinting * fix add_quote full name * fix some member converters in currency/quotes * custom reactions elifs * lint: run black * remove old config.ini * docs: update config / deployment details * ci: update actions * chore: clear apt lists + combine apt RUN statements * chore(deps): update uvloop * ci: build an edge (master-branch) image too --------- Co-authored-by: namemcguffin <[email protected]> Co-authored-by: Mathieu B <[email protected]>
- Loading branch information