Commit ae085957 authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook GitHub Bot

use set literals and generators in gdb scripst

Summary: Presume Python 3 v.s. attempting to support all versions of Python.

Differential Revision: D34232485

fbshipit-source-id: 6a8e4755b1cac750dc30c4d6f678c99d05da7deb
parent 8ea4ee70
......@@ -166,7 +166,7 @@ def simple_cycles(G): # noqa: C901
"""
def _unblock(thisnode, blocked, B):
stack = set([thisnode])
stack = {thisnode}
while stack:
node = stack.pop()
if node in blocked:
......
......@@ -905,7 +905,7 @@ def get_fiber_manager_map_vevb():
# reset the caches when we continue; the current fibers will almost certainly change
def clear_fiber_caches(*args):
# default to only clearing manager and info caches
caches = set(arg.string() for arg in args) or {"managers", "info"}
caches = {arg.string() for arg in args} or {"managers", "info"}
cleared = set()
if "managers" in caches:
cleared.add("manager")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment