Skip to content

Quote plugin#115

Closed
JohnBee wants to merge 7 commits into
HackSoc:masterfrom
JohnBee:master
Closed

Quote plugin#115
JohnBee wants to merge 7 commits into
HackSoc:masterfrom
JohnBee:master

Conversation

@JohnBee

@JohnBee JohnBee commented Oct 1, 2016

Copy link
Copy Markdown
  • Moved to MongoDB
  • Simpler interface only requiring nick to add and recall.

@LordAro LordAro left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much better, IMO :)

Did the old PRQ need closing though? I'd have preferred a rebase (you'll have to do this at some point to get my test fixes from #114 into your tree so the tests pass)

Writing tests is the next step :)

Comment thread csbot/plugins/quote.py
raise self.QuoteError("No nick!")

quote = {} #output
quote["quote"] = last.last_message(nick)[2]

@LordAro LordAro Oct 2, 2016

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would be very surprised if this worked at all... Plugins aren't generally good at interacting with each other like that. Have you tested this?

Comment thread csbot/plugins/quote.py
def _quoteExists(self, quote_post):
"""Checks to see if a nick + quote already exists to stop repeats."""
if self.db.find(quote_post).count > 0:
return True

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Come on, boolean logic please :)

Comment thread csbot/plugins/quote.py
else:
return False

def _addquote(self, nick=""):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why use a default parameter if you just error on it anyway? Better to have a TypeError if you manage to call without a nick, imo

@coveralls

coveralls commented Oct 30, 2016

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-1.4%) to 68.024% when pulling 07be5d1 on JohnBee:master into 2fb243e on HackSoc:master.

@LordAro

LordAro commented Sep 26, 2017

Copy link
Copy Markdown
Member

Superseded by #123

@LordAro LordAro closed this Sep 26, 2017
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