Skip to content

Commit cf94ddd

Browse files
andresdelfinosobolevnStanFromIreland
authored andcommitted
gh-161414: Remove the backquote from the pydoc symbols (GH-161416)
(cherry picked from commit d003448) Co-authored-by: Andrés Delfino <adelfino@gmail.com> Co-authored-by: sobolevn <mail@sobolevn.me> Co-authored-by: Stan Ulbrych <stan@python.org>
1 parent a475d58 commit cf94ddd

3 files changed

Lines changed: 10 additions & 1 deletion

File tree

‎Lib/pydoc.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1886,7 +1886,6 @@ class Helper:
18861886
':=': 'ASSIGNMENTEXPRESSIONS',
18871887
'_': 'PRIVATENAMES',
18881888
'__': 'PRIVATENAMES SPECIALMETHODS',
1889-
'`': 'BACKQUOTES',
18901889
'(': 'TUPLES FUNCTIONS CALLS',
18911890
')': 'TUPLES FUNCTIONS CALLS',
18921891
'[': 'LISTS SUBSCRIPTS SLICINGS',

‎Lib/test/test_pydoc/test_pydoc.py‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2200,6 +2200,14 @@ def test_keywords(self):
22002200
self.assertEqual(sorted(pydoc.Helper.keywords),
22012201
sorted(keyword.kwlist + ['case', 'match', 'lazy']))
22022202

2203+
def test_symbols(self):
2204+
# gh-161414
2205+
for symbol in pydoc.Helper.symbols:
2206+
with self.subTest(symbol=symbol):
2207+
buf = StringIO()
2208+
pydoc.Helper(output=buf).showsymbol(symbol)
2209+
self.assertNotIn('no documentation found', buf.getvalue())
2210+
22032211
def test_interact_empty_line_continues(self):
22042212
# gh-138568: test pressing Enter without input should continue in help session
22052213
self.assertEqual(
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Remove the backquote from the symbols listed by :func:`help`, asking for help on it reported that no
2+
documentation was found.

0 commit comments

Comments
 (0)