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

Remove unnecessary comprehension #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sopel/coretasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ def track_modes(bot, trigger):
modes.append(sign + char)

# Try to map modes to arguments, after sanity-checking
if len(modes) != len(nicks) or not all([nick.is_nick() for nick in nicks]):
if len(modes) != len(nicks) or not all(nick.is_nick() for nick in nicks):
# Something fucky happening, like unusual batching of non-privilege
# modes together with the ones we expect. Way easier to just re-WHO
# than try to account for non-standard parameter-taking modes.
Expand Down
6 changes: 2 additions & 4 deletions sopel/modules/tld.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,11 +303,9 @@ def gettld(bot, trigger):
_update_tld_data(bot, 'list')
tld_list = bot.memory['tld_list_cache']

if not any([
name in tld_list
if not any(name in tld_list
for name
in [tld, idna.ToASCII(tld).decode('utf-8')]
]):
in [tld, idna.ToASCII(tld).decode('utf-8')]):
bot.reply(
"The top-level domain '{}' is not in IANA's list of valid TLDs."
.format(tld))
Expand Down