Issue #22823: Use set literals instead of creating a set from a list

This commit is contained in:
Raymond Hettinger 2014-11-09 15:56:33 -08:00
parent bf764a1912
commit df1b699447
10 changed files with 19 additions and 20 deletions

View file

@ -57,8 +57,8 @@ from errno import EALREADY, EINPROGRESS, EWOULDBLOCK, ECONNRESET, EINVAL, \
ENOTCONN, ESHUTDOWN, EISCONN, EBADF, ECONNABORTED, EPIPE, EAGAIN, \
errorcode
_DISCONNECTED = frozenset((ECONNRESET, ENOTCONN, ESHUTDOWN, ECONNABORTED, EPIPE,
EBADF))
_DISCONNECTED = frozenset({ECONNRESET, ENOTCONN, ESHUTDOWN, ECONNABORTED, EPIPE,
EBADF})
try:
socket_map
@ -220,7 +220,7 @@ class dispatcher:
connecting = False
closing = False
addr = None
ignore_log_types = frozenset(['warning'])
ignore_log_types = frozenset({'warning'})
def __init__(self, sock=None, map=None):
if map is None: