Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cbdb3a1

Browse files
committed
Remove a redundant comparison that raises an exception in Python 3
sphinx.__version__ is a string, 1.1 is a float: the comparison always returns True in Python 2. In Python 3 however the > <, <=, > and >= operators will raise a TypeError exception when > comparing a complex number with another built-in numeric type, when > the objects are of different types that cannot be compared, or in > other cases where there is no defined ordering [0]. str and float are such unorderable types. [0] http://docs.python.org/3.3/library/stdtypes.html#comparisons
1 parent 2d051f2 commit cbdb3a1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

doc/conf.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@
5353

5454
autosummary_generate = True
5555

56-
if sphinx.__version__ >= 1.1:
57-
autodoc_docstring_signature = True
56+
autodoc_docstring_signature = True
5857

5958
# Add any paths that contain templates here, relative to this directory.
6059
templates_path = ['_templates']

0 commit comments

Comments
 (0)