chore: reduce lint and type-check noise #187
@@ -38,11 +38,11 @@ def filter_select(
|
|||||||
except OSError:
|
except OSError:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
try:
|
# Note: Don't close tty_fd here. FileIO in _run_picker wraps the same
|
||||||
result = _run_picker(items, title=title, tty_fd=tty_fd.fileno())
|
# file descriptor and manages its lifecycle. Closing tty_fd would close
|
||||||
finally:
|
# the underlying fd, causing "Bad file descriptor" errors when FileIO
|
||||||
tty_fd.close()
|
# tries to use it. Let the file object be closed by garbage collection.
|
||||||
|
result = _run_picker(items, title=title, tty_fd=tty_fd.fileno())
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user