Skip to content

Commit afc3deb

Browse files
committed
newer syntax is just better
1 parent 2fb6ab8 commit afc3deb

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed

packaging/MSWindows/BUILD.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ def build_service() -> None:
388388
os.rename(os.path.join(SERVICE_SRC_DIR, XPRA_SERVICE_EXE), XPRA_SERVICE_EXE)
389389

390390

391-
VersionInfo = namedtuple("VersionInfo", "string,value,revision,full_string,arch_info,extra,padded")
391+
VersionInfo = namedtuple("VersionInfo", ("string", "value", "revision", "full_string", "arch_info", "extra", "padded"))
392392
version_info = VersionInfo("invalid", (0, 0), 0, "invalid", "arch", "extra", (0, 0, 0, 0))
393393

394394

xpra/audio/wrapper.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ def start_sending_audio(plugins, audio_source_plugin: str, device: str, codec: s
390390
remote_decoders, remote_pulseaudio_server, remote_pulseaudio_id))
391391
with log.trap_error("Error setting up %r audio source" % (audio_source_plugin or "auto")):
392392
# info about the remote end:
393-
PAInfo = namedtuple("PAInfo", "pulseaudio_server,pulseaudio_id,remote_decoders")
393+
PAInfo = namedtuple("PAInfo", ("pulseaudio_server", "pulseaudio_id", "remote_decoders"))
394394
remote = PAInfo(pulseaudio_server=remote_pulseaudio_server,
395395
pulseaudio_id=remote_pulseaudio_id,
396396
remote_decoders=remote_decoders)

xpra/client/gtk3/opengl/client_window.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414

1515
log = Logger("opengl", "window")
1616

17-
Rectangle = namedtuple("Rectangle", "x,y,width,height")
18-
DrawEvent = namedtuple("DrawEvent", "area")
17+
Rectangle = namedtuple("Rectangle", ("x", "y", "width", "height"))
18+
DrawEvent = namedtuple("DrawEvent", ("area", ))
1919

2020
MONITOR_REINIT = envbool("XPRA_OPENGL_MONITOR_REINIT", False)
2121

xpra/net/quic/asyncio_thread.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
UVLOOP = envbool("XPRA_UVLOOP", not WIN32)
2626

27-
ExceptionWrapper = namedtuple("ExceptionWrapper", "exception,args")
27+
ExceptionWrapper = namedtuple("ExceptionWrapper", ("exception", "args"))
2828

2929

3030
class ThreadedAsyncioLoop:

xpra/server/dbus/server.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
log = Logger("dbus", "server")
2323

24-
Rectangle = namedtuple("Rectangle", "x,y,width,height")
24+
Rectangle = namedtuple("Rectangle", ("x", "y", "width", "height"))
2525

2626

2727
def n(*args):

xpra/server/shadow/root_window_model.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ def notify(self, prop: str) -> None:
188188
if listeners is None:
189189
log.warn(f"Warning: ignoring notify for {prop!r}")
190190
return
191-
PSpec = namedtuple("PSpec", "name")
191+
PSpec = namedtuple("PSpec", ("name", ))
192192
pspec = PSpec(name=prop)
193193
for listener, *args in listeners:
194194
with log.trap_error(f"Error on {prop!r} signal listener {listener}"):

xpra/x11/desktop/monitor_model.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
MIN_SIZE = 640, 350
2121
MAX_SIZE = 8192, 8192
2222

23-
MonitorDamageNotify = namedtuple("MonitorDamageNotify", "x,y,width,height")
23+
MonitorDamageNotify = namedtuple("MonitorDamageNotify", ("x", "y", "width", "height"))
2424

2525

2626
class MonitorDesktopModel(DesktopModelBase):

0 commit comments

Comments
 (0)