Skip to content

Commit

Permalink
Use set literals
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Apr 19, 2017
1 parent afdc704 commit c8f705c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion irc/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ def cap(self, subcommand, *args):
.cap('END')
"""
cap_subcommands = set('LS LIST REQ ACK NAK CLEAR END'.split())
client_subcommands = set(cap_subcommands) - set(['NAK'])
client_subcommands = set(cap_subcommands) - {'NAK'}
assert subcommand in client_subcommands, "invalid subcommand"

def _multi_parameter(args):
Expand Down
2 changes: 1 addition & 1 deletion irc/modes.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def _parse_modes(mode_string, unary_modes=""):
... yield random_text(min_len, max_len)
>>> import itertools
>>> texts = itertools.islice(random_texts(), 1000)
>>> set(type(_parse_modes(text)) for text in texts) == set([list])
>>> set(type(_parse_modes(text)) for text in texts) == {list}
True
"""

Expand Down

0 comments on commit c8f705c

Please sign in to comment.