Skip to content

Commit 409a19f

Browse files
committed
Fix typo in ConsoleHandler and fix comment format in JLineConsoleHandler.
1 parent 309cb85 commit 409a19f

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

graalpython/com.oracle.graal.python.shell/src/com/oracle/graal/python/shell/ConsoleHandler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* The Universal Permissive License (UPL), Version 1.0
@@ -111,7 +111,7 @@ public int read() throws IOException {
111111
}
112112

113113
public int getTerminalWidth() {
114-
// deafult value
114+
// default value
115115
return 80;
116116
}
117117

graalpython/com.oracle.graal.python.shell/src/com/oracle/graal/python/shell/JLineConsoleHandler.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,10 @@ public void complete(LineReader r, ParsedLine pl, List<Candidate> candidates) {
118118
builder.parser(new DefaultParser() {
119119
@Override
120120
public boolean isDelimiterChar(CharSequence buffer, int pos) {
121-
// Never count a last character of a char sequence as delimiter. The REPL completer implemented
122-
// by `rlcompleter.py` adds a trailing whitespace to keywords, e.g. 'raise '. The default DefaultParser
123-
// implementation always escaped this whitespace leading to wrong completions like 'raise\ '.
121+
// Never count a last character of a char sequence as delimiter. The REPL completer
122+
// implemented by `rlcompleter.py` adds a trailing whitespace to keywords,
123+
// e.g. 'raise '. The default DefaultParser implementation always escaped this
124+
// whitespace leading to wrong completions like 'raise\ '.
124125
if (pos == buffer.length() - 1) {
125126
return false;
126127
}

0 commit comments

Comments
 (0)