From: Ralf Jung Date: Mon, 15 Apr 2024 13:56:47 +0000 (+0200) Subject: prefer extending with tuples over lists X-Git-Url: https://git.ralfj.de/bubblebox.git/commitdiff_plain/9688cc0c73f7582302cdc8fa1efdc81e2c472c7e?hp=-c prefer extending with tuples over lists --- 9688cc0c73f7582302cdc8fa1efdc81e2c472c7e diff --git a/bubblebox.py b/bubblebox.py index 02bcb5a..a806e09 100644 --- a/bubblebox.py +++ b/bubblebox.py @@ -71,7 +71,7 @@ class DbusProxyDirective: os.set_inheritable(bwrap_end, True) # Put this at the usual location for the bus insode the sandbox. # TODO: What if DBUS_SESSION_BUS_ADDRESS says something else? - bwrap.flags.extend(["--bind", filename, XDG_RUNTIME_DIR + "/bus", "--sync-fd", str(bwrap_end)]) + bwrap.flags.extend(("--bind", filename, XDG_RUNTIME_DIR + "/bus", "--sync-fd", str(bwrap_end))) # Constructors that should be used instead of directly mentioning the class above. def bwrap_flags(*flags): @@ -141,7 +141,7 @@ def host_access(dirs): recursive_host_access(path, desc, out) else: # Allow access to this path - out.extend([Access.flag(desc), path, path]) + out.extend((Access.flag(desc), path, path)) # Start the recursive traversal out = [] recursive_host_access("", dirs, out)