Python Splatting *("-s", "1")
React, Django and SQL developer at Forma.ai
Why do something like this?
subprocess.check_call(
(
"git",
*("-c", "protocol.version=2")
*("--depth", "1"),
)
)
Because the black formatter will format it like this which is less readable
subprocess.check_call(
(
"git",
"-c",
"protocol.version=2",
"--depth",
"1",
)
)