From: Scott Worley Date: Mon, 6 Oct 2025 06:01:51 +0000 (-0700) Subject: Turns out we don't need to track filename in Recording X-Git-Url: http://git.scottworley.com/srec/commitdiff_plain/8972b99db6d440df3adbf756cb1ed20e5584d0bd 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. --- 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")