Skip to content

Commit a874755

Browse files
🔧 MAINTAIN: Remove unused import readline logic (#68)
Co-authored-by: Chris Sewell <[email protected]>
1 parent 947d4c6 commit a874755

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

markdown_it/cli/parse.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,11 @@ def convert_file(filename):
4040
sys.exit('Cannot open file "{}".'.format(filename))
4141

4242

43-
def interactive(import_readline=False):
43+
def interactive():
4444
"""
4545
Parse user input, dump to stdout, rinse and repeat.
4646
Python REPL style.
4747
"""
48-
if import_readline:
49-
_import_readline()
5048
print_heading()
5149
contents = []
5250
more = False
@@ -98,13 +96,6 @@ def parse_args(args):
9896
return parser.parse_args(args)
9997

10098

101-
def _import_readline():
102-
try:
103-
import readline # noqa: F401
104-
except ImportError:
105-
print("[warning] readline library not available.")
106-
107-
10899
def print_heading():
109100
print("{} (interactive)".format(version_str))
110101
print("Type Ctrl-D to complete input, or Ctrl-C to exit.")

tests/test_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ def mock_input(prompt):
2424

2525
with patch("builtins.print") as patched:
2626
with patch("builtins.input", mock_input):
27-
parse.interactive(import_readline=False)
27+
parse.interactive()
2828
patched.assert_called()

0 commit comments

Comments
 (0)