From 8972b99db6d440df3adbf756cb1ed20e5584d0bd Mon Sep 17 00:00:00 2001 From: Scott Worley Date: Sun, 5 Oct 2025 23:01:51 -0700 Subject: [PATCH] Turns out we don't need to track filename in Recording The closure that updates the filesize display just captures it, it doesn't need to fish it out of the global. --- srec.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/srec.py b/srec.py index 01b5a8c..35efcaf 100644 --- a/srec.py +++ b/srec.py @@ -20,7 +20,6 @@ from gi.repository import GLib # nopep8 pylint: disable=wrong-import-position @dataclass class Recording: - filename: str process: subprocess.Popen[bytes] @@ -77,7 +76,6 @@ def on_start_recording(_: Gtk.Button, stack: Gtk.Stack) -> None: ['-f', 'pulse', '-ac', '2', '-i', 'default', filename]) # pylint: disable=consider-using-with recording = Recording( - filename=filename, process=subprocess.Popen(command, stdin=subprocess.PIPE)) stack.set_visible_child_name("recording") -- 2.50.1