mirror of
https://github.com/python/cpython.git
synced 2025-10-09 08:31:26 +00:00
Issue #22823: Use set literals in lib2to3.
This commit is contained in:
parent
bd62f0a6e4
commit
db9b65d9e5
4 changed files with 8 additions and 8 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue