Acknowledge Tkinter's GC-reference idiom with a scoped type ignore
Tkinter's `Label` only stores `PhotoImage` references at the C level, so Python GC eats them unless something on the Python side keeps a reference. The canonical fix is to stash the reference on the widget itself: `label.image = photo`. Tkinter widgets are plain Python objects, so the assignment works at runtime, but the stub declares no `image` attribute (correctly — there isn't one; we're adding it). Narrow the suppression to `# type: ignore[attr-defined]` on the one line. The existing comment above the assignment already documents why.
This commit is contained in:
@@ -114,7 +114,6 @@
|
||||
"src/pipecat/transports/heygen/transport.py",
|
||||
"src/pipecat/transports/lemonslice/transport.py",
|
||||
"src/pipecat/transports/livekit/transport.py",
|
||||
"src/pipecat/transports/local/tk.py",
|
||||
"src/pipecat/transports/smallwebrtc/connection.py",
|
||||
"src/pipecat/transports/smallwebrtc/request_handler.py",
|
||||
"src/pipecat/transports/smallwebrtc/transport.py",
|
||||
|
||||
Reference in New Issue
Block a user