-
-
Notifications
You must be signed in to change notification settings - Fork 402
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
admin: Catch set commands without arguments #1520
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch!
I made a comment for 2 reasons:
naming things (arg1 is not very expressive)edit: it wasarg1
before, so let's keep it for now!- readability is more important than saving one line,
return
should be on its own
@Exirel I would like to point out that |
Fair enough. Let's keep it that way for now then! |
Philosophical question whether return bot.say() or bot.say()
return is more readable 💥 Changed it to the latter, to keep the style consistent with the rest of the file. |
As I said on IRC, I think it's not about readability, but about intent and being explicit. My reasons is that
which is quite confusing. As pointed out by Pilate on IRC (PEP 0020):
and in that regard, an empty That's my opinion, at least. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Straightforward, this is.
Before: <Owner> .set <Sopel> AttributeError: 'NoneType' object has no attribute 'split' After: <Owner> .set <Sopel> Owner: Usage: .set section.option value
Before:
.set
AttributeError: 'NoneType' object has no attribute 'split'
After:
.set
Owner: Usage: .set section.option value