Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quote plugin (updated) #186

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from
Draft

Conversation

alanbriolat
Copy link
Member

Same as #123, but updated for most recent test framework, linting, etc.

bensimner and others added 13 commits February 19, 2022 12:42
Adds extra commands:
  - !quote <nick> [<pattern>]
  - !quote.list [<pattern>]                   # on a channel
  - !qote.list <channel> [<pattern>]  # in a privmsg
  - !quote.remove <id> [, <id>]*
Also adds `!quotes * <pattern>`, for channel-wide quoting.
Does some re-naming !quote -> !remember and !quotes -> !quote, also limits the use of !quote.list and !quote.remove to only authenticated users with the correct permissions.
Also adds tests for the formatter
Each @command is now a dispatch to a simpler function based off a regexp cli definition.
This could probably be formalised into a @command.group() decorator or something later.
Moving all the quote data into an attrs class makes it easier to work with over a dictionary.
Then hiding the database implementation as a mixin made the plugin class itself easier to understand.
I'm not 100% sure what this was doing. I think we don't need it anymore.
@codecov-commenter
Copy link

codecov-commenter commented Feb 19, 2022

Codecov Report

Merging #186 (02af8e9) into main (645fbd5) will increase coverage by 0.50%.
The diff coverage is 76.96%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #186      +/-   ##
==========================================
+ Coverage   75.85%   76.36%   +0.50%     
==========================================
  Files          28       29       +1     
  Lines        2990     3194     +204     
  Branches      501      549      +48     
==========================================
+ Hits         2268     2439     +171     
- Misses        652      672      +20     
- Partials       70       83      +13     
Impacted Files Coverage Δ
src/csbot/util.py 83.42% <14.28%> (-2.69%) ⬇️
src/csbot/plugins/quote.py 79.18% <79.18%> (ø)
src/csbot/plugins/auth.py 88.15% <0.00%> (+18.42%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 645fbd5...02af8e9. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants