Skip to content

Commit 564ff54

Browse files
Fix various typos.
1 parent cd2c238 commit 564ff54

File tree

12 files changed

+17
-17
lines changed

12 files changed

+17
-17
lines changed

Diff for: src/prompt_toolkit/application/current.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class AppSession:
3535
3636
:param input: Use this as a default input for all applications
3737
running in this session, unless an input is passed to the `Application`
38-
explicitely.
38+
explicitly.
3939
:param output: Use this as a default output.
4040
"""
4141

Diff for: src/prompt_toolkit/buffer.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1589,12 +1589,12 @@ async def run() -> None:
15891589
# (We need to use `run_in_terminal`, because not all editors go to
15901590
# the alternate screen buffer, and some could influence the cursor
15911591
# position.)
1592-
succes = await run_in_terminal(
1592+
success = await run_in_terminal(
15931593
lambda: self._open_file_in_editor(filename), in_executor=True
15941594
)
15951595

15961596
# Read content again.
1597-
if succes:
1597+
if success:
15981598
with open(filename, "rb") as f:
15991599
text = f.read().decode("utf-8")
16001600

Diff for: src/prompt_toolkit/contrib/telnet/server.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def _initialize_telnet(connection: socket.socket) -> None:
6464
connection.send(IAC + DO + NAWS)
6565

6666
# Negotiate terminal type
67-
# Assume the client will accept the negociation with `IAC + WILL + TTYPE`
67+
# Assume the client will accept the negotiation with `IAC + WILL + TTYPE`
6868
connection.send(IAC + DO + TTYPE)
6969

7070
# We can then select the first terminal type supported by the client,

Diff for: src/prompt_toolkit/cursor_shapes.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class CursorShape(Enum):
2626
# before this `CursorShape` functionality was introduced into
2727
# prompt_toolkit itself, people had workarounds to send cursor shapes
2828
# escapes into the terminal, by monkey patching some of prompt_toolkit's
29-
# internals. We don't want the default prompt_toolkit implemetation to
29+
# internals. We don't want the default prompt_toolkit implementation to
3030
# interfere with that. E.g., IPython patches the `ViState.input_mode`
3131
# property. See: https://github.com/ipython/ipython/pull/13501/files
3232
_NEVER_CHANGE = "_NEVER_CHANGE"

Diff for: src/prompt_toolkit/input/vt100.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ def callback_wrapper() -> None:
165165
loop.add_reader(fd, callback_wrapper)
166166
except PermissionError:
167167
# For `EPollSelector`, adding /dev/null to the event loop will raise
168-
# `PermisisonError` (that doesn't happen for `SelectSelector`
168+
# `PermissionError` (that doesn't happen for `SelectSelector`
169169
# apparently). Whenever we get a `PermissionError`, we can raise
170170
# `EOFError`, because there's not more to be read anyway. `EOFError` is
171171
# an exception that people expect in

Diff for: src/prompt_toolkit/key_binding/bindings/vi.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1030,7 +1030,7 @@ def _swapcase_line(event: E) -> None:
10301030
buff.transform_current_line(lambda s: s.swapcase())
10311031

10321032
@handle("#", filter=vi_navigation_mode)
1033-
def _prev_occurence(event: E) -> None:
1033+
def _prev_occurrence(event: E) -> None:
10341034
"""
10351035
Go to previous occurrence of this word.
10361036
"""
@@ -1043,7 +1043,7 @@ def _prev_occurence(event: E) -> None:
10431043
b.apply_search(search_state, count=event.arg, include_current_position=False)
10441044

10451045
@handle("*", filter=vi_navigation_mode)
1046-
def _next_occurance(event: E) -> None:
1046+
def _next_occurrence(event: E) -> None:
10471047
"""
10481048
Go to next occurrence of this word.
10491049
"""
@@ -1411,7 +1411,7 @@ def _next_section(event: E) -> TextObject:
14111411
return TextObject(index)
14121412

14131413
@text_object("f", Keys.Any)
1414-
def _next_occurence(event: E) -> TextObject:
1414+
def _find_next_occurrence(event: E) -> TextObject:
14151415
"""
14161416
Go to next occurrence of character. Typing 'fx' will move the
14171417
cursor to the next occurrence of character. 'x'.
@@ -1426,7 +1426,7 @@ def _next_occurence(event: E) -> TextObject:
14261426
return TextObject(0)
14271427

14281428
@text_object("F", Keys.Any)
1429-
def _previous_occurance(event: E) -> TextObject:
1429+
def _find_previous_occurrence(event: E) -> TextObject:
14301430
"""
14311431
Go to previous occurrence of character. Typing 'Fx' will move the
14321432
cursor to the previous occurrence of character. 'x'.

Diff for: src/prompt_toolkit/key_binding/key_bindings.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def my_key_binding(event):
5858
# Avoid circular imports.
5959
from .key_processor import KeyPressEvent
6060

61-
# The only two return values for a mouse hander (and key bindings) are
61+
# The only two return values for a mouse handler (and key bindings) are
6262
# `None` and `NotImplemented`. For the type checker it's best to annotate
6363
# this as `object`. (The consumer never expects a more specific instance:
6464
# checking for NotImplemented can be done using `is NotImplemented`.)

Diff for: src/prompt_toolkit/layout/containers.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2365,7 +2365,7 @@ def get_line_height(lineno: int) -> int:
23652365
self.vertical_scroll_2 = min(
23662366
text_before_height - 1, # Keep the cursor visible.
23672367
line_height
2368-
- height, # Avoid blank lines at the bottom when scolling up again.
2368+
- height, # Avoid blank lines at the bottom when scrolling up again.
23692369
self.vertical_scroll_2,
23702370
)
23712371
self.vertical_scroll_2 = max(

Diff for: src/prompt_toolkit/layout/scrollable_pane.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ class ScrollablePane(Container):
3939
top/bottom (left/right offset is not used).
4040
:param keep_cursor_visible: When `True`, automatically scroll the pane so
4141
that the cursor (of the focused window) is always visible.
42-
:param keep_focused_window_visible: When `True`, automatically scroll th e
42+
:param keep_focused_window_visible: When `True`, automatically scroll the
4343
pane so that the focused window is visible, or as much visible as
44-
possible if it doen't completely fit the screen.
44+
possible if it doesn't completely fit the screen.
4545
:param max_available_height: Always constraint the height to this amount
4646
for performance reasons.
4747
:param width: When given, use this width instead of looking at the children.

Diff for: src/prompt_toolkit/output/base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ def get_default_color_depth(self) -> ColorDepth:
206206
"""
207207
Get default color depth for this output.
208208
209-
This value will be used if no color depth was explicitely passed to the
209+
This value will be used if no color depth was explicitly passed to the
210210
`Application`.
211211
212212
.. note::

Diff for: src/prompt_toolkit/output/win32.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ def flush(self) -> None:
375375
self.LOG.flush()
376376

377377
# Print characters one by one. This appears to be the best solution
378-
# in oder to avoid traces of vertical lines when the completion
378+
# in order to avoid traces of vertical lines when the completion
379379
# menu disappears.
380380
for b in data:
381381
written = DWORD()

Diff for: src/prompt_toolkit/utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ def in_main_thread() -> bool:
220220

221221
def get_bell_environment_variable() -> bool:
222222
"""
223-
True if env variable is set to true (true, TRUE, TrUe, 1).
223+
True if env variable is set to true (true, TRUE, True, 1).
224224
"""
225225
value = os.environ.get("PROMPT_TOOLKIT_BELL", "true")
226226
return value.lower() in ("1", "true")

0 commit comments

Comments
 (0)