diff options
author | Geoffrey Thomas <geofft@ldpreload.com> | 2024-05-22 16:35:18 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-22 16:35:18 (GMT) |
commit | ef172521a9e9dfadebe57d590bfb53a0e9ac3a0b (patch) | |
tree | 22da7f25285e842c48daf81b0ae2a57e223cc674 /Lib/_pyrepl | |
parent | 81865002aee8eaaeb3c7e402f86183afa6de77bf (diff) | |
download | cpython-ef172521a9e9dfadebe57d590bfb53a0e9ac3a0b.zip cpython-ef172521a9e9dfadebe57d590bfb53a0e9ac3a0b.tar.gz cpython-ef172521a9e9dfadebe57d590bfb53a0e9ac3a0b.tar.bz2 |
Remove almost all unpaired backticks in docstrings (#119231)
As reported in #117847 and #115366, an unpaired backtick in a docstring
tends to confuse e.g. Sphinx running on subclasses of standard library
objects, and the typographic style of using a backtick as an opening
quote is no longer in favor. Convert almost all uses of the form
The variable `foo' should do xyz
to
The variable 'foo' should do xyz
and also fix up miscellaneous other unpaired backticks (extraneous /
missing characters).
No functional change is intended here other than in human-readable
docstrings.
Diffstat (limited to 'Lib/_pyrepl')
-rw-r--r-- | Lib/_pyrepl/keymap.py | 18 | ||||
-rw-r--r-- | Lib/_pyrepl/reader.py | 8 |
2 files changed, 13 insertions, 13 deletions
diff --git a/Lib/_pyrepl/keymap.py b/Lib/_pyrepl/keymap.py index 2fb03d1..d11df4b 100644 --- a/Lib/_pyrepl/keymap.py +++ b/Lib/_pyrepl/keymap.py @@ -30,20 +30,20 @@ sequence. pyrepl uses its own keyspec format that is meant to be a strict superset of readline's KEYSEQ format. This means that if a spec is found that readline accepts that this doesn't, it should be logged as a bug. Note that this means -we're using the `\\C-o' style of readline's keyspec, not the `Control-o' sort. +we're using the '\\C-o' style of readline's keyspec, not the 'Control-o' sort. The extension to readline is that the sequence \\<KEY> denotes the sequence of characters produced by hitting KEY. Examples: -`a' - what you get when you hit the `a' key -`\\EOA' - Escape - O - A (up, on my terminal) -`\\<UP>' - the up arrow key -`\\<up>' - ditto (keynames are case-insensitive) -`\\C-o', `\\c-o' - control-o -`\\M-.' - meta-period -`\\E.' - ditto (that's how meta works for pyrepl) -`\\<tab>', `\\<TAB>', `\\t', `\\011', '\\x09', '\\X09', '\\C-i', '\\C-I' +'a' - what you get when you hit the 'a' key +'\\EOA' - Escape - O - A (up, on my terminal) +'\\<UP>' - the up arrow key +'\\<up>' - ditto (keynames are case-insensitive) +'\\C-o', '\\c-o' - control-o +'\\M-.' - meta-period +'\\E.' - ditto (that's how meta works for pyrepl) +'\\<tab>', '\\<TAB>', '\\t', '\\011', '\\x09', '\\X09', '\\C-i', '\\C-I' - all of these are the tab character. """ diff --git a/Lib/_pyrepl/reader.py b/Lib/_pyrepl/reader.py index 3dbfc34..768d45a 100644 --- a/Lib/_pyrepl/reader.py +++ b/Lib/_pyrepl/reader.py @@ -171,7 +171,7 @@ class Reader: * console: Hopefully encapsulates the OS dependent stuff. * pos: - A 0-based index into `buffer' for where the insertion point + A 0-based index into 'buffer' for where the insertion point is. * screeninfo: Ahem. This list contains some info needed to move the @@ -179,7 +179,7 @@ class Reader: * cxy, lxy: the position of the insertion point in screen ... * syntax_table: - Dictionary mapping characters to `syntax class'; read the + Dictionary mapping characters to 'syntax class'; read the emacs docs to see what this means :-) * commands: Dictionary mapping command names to command classes. @@ -431,7 +431,7 @@ class Reader: def get_arg(self, default: int = 1) -> int: """Return any prefix argument that the user has supplied, - returning `default' if there is None. Defaults to 1. + returning 'default' if there is None. Defaults to 1. """ if self.arg is None: return default @@ -440,7 +440,7 @@ class Reader: def get_prompt(self, lineno: int, cursor_on_line: bool) -> str: """Return what should be in the left-hand margin for line - `lineno'.""" + 'lineno'.""" if self.arg is not None and cursor_on_line: prompt = "(arg: %s) " % self.arg elif self.paste_mode: |