Skip to content

Commit d003448

Browse files
andresdelfinosobolevnStanFromIreland
authored
gh-161414: Remove the backquote from the pydoc symbols (#161416)
Co-authored-by: sobolevn <mail@sobolevn.me> Co-authored-by: Stan Ulbrych <stan@python.org>
1 parent b5bffb9 commit d003448

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
@@ -2012,7 +2012,6 @@ class Helper:
20122012
':=': 'ASSIGNMENTEXPRESSIONS',
20132013
'_': 'PRIVATENAMES',
20142014
'__': 'PRIVATENAMES SPECIALMETHODS',
2015-
'`': 'BACKQUOTES',
20162015
'(': 'TUPLES FUNCTIONS CALLS',
20172016
')': 'TUPLES FUNCTIONS CALLS',
20182017
'[': 'LISTS SUBSCRIPTS SLICINGS',

‎Lib/test/test_pydoc/test_pydoc.py‎

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

2297+
def test_symbols(self):
2298+
# gh-161414
2299+
for symbol in pydoc.Helper.symbols:
2300+
with self.subTest(symbol=symbol):
2301+
buf = StringIO()
2302+
pydoc.Helper(output=buf).showsymbol(symbol)
2303+
self.assertNotIn('no documentation found', buf.getvalue())
2304+
22972305
def test_interact_empty_line_continues(self):
22982306
# gh-138568: test pressing Enter without input should continue in help session
22992307
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)