Skip to content

Commit aa34df2

Browse files
committed
Type optional readline adapter
Make the optional readline module's protocol boundary explicit. This keeps runtime behavior unchanged and allows strict mypy checks to agree across Unix and Windows.
1 parent 6067d21 commit aa34df2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎src/codex32/_cli_input.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import os
77
import sys
88
from collections.abc import Callable, Iterator
9-
from typing import Protocol
9+
from typing import Protocol, cast
1010

1111
from codex32.bip93 import (
1212
Secret,
@@ -46,7 +46,7 @@ def set_startup_hook(self, function: Callable[[], object] | None) -> None: ...
4646
except ImportError:
4747
_line_editor = None
4848
else:
49-
_line_editor = _readline
49+
_line_editor = cast(_LineEditor, _readline)
5050

5151

5252
class InputError(Exception):

0 commit comments

Comments
 (0)