Issue #22823: Use set literals in lib2to3.

This commit is contained in:
Serhiy Storchaka 2014-12-13 21:50:49 +02:00
parent bd62f0a6e4
commit db9b65d9e5
4 changed files with 8 additions and 8 deletions

View file

@ -57,7 +57,7 @@ def _get_head_types(pat):
# Always return leafs
if pat.type is None:
raise _EveryNode
return set([pat.type])
return {pat.type}
if isinstance(pat, pytree.NegatedPattern):
if pat.content:
@ -133,7 +133,7 @@ def _detect_future_features(source):
def advance():
tok = next(gen)
return tok[0], tok[1]
ignore = frozenset((token.NEWLINE, tokenize.NL, token.COMMENT))
ignore = frozenset({token.NEWLINE, tokenize.NL, token.COMMENT})
features = set()
try:
while True: