File tree 1 file changed +6
-7
lines changed
Filter options
1 file changed +6
-7
lines changed
Original file line number Diff line number Diff line change @@ -1588,13 +1588,12 @@ def foo(ax, *args, **kwargs)
1588
1588
1589
1589
def param (func ):
1590
1590
new_sig = None
1591
- ver_info = sys .version_info
1592
- # py2.6 compatible version, use line below as soon as we can
1593
- python_has_signature = ver_info [0 ] > 2 and ver_info [1 ] > 2
1594
- # python_has_signature = ver_info.major > 2 and ver_info.minor > 2
1595
- python_has_wrapped = ver_info [0 ] > 2 and ver_info [1 ] > 1
1596
- # python_has_wrapped = ver_info.major > 2 and ver_info.minor > 1
1597
- if not python_has_signature :
1591
+ python_has_signature = major >= 3 and minor1 >= 3
1592
+ python_has_wrapped = major >= 3 and minor1 >= 2
1593
+
1594
+ # if in a legacy version of python and IPython is already imported
1595
+ # try to use their back-ported signature
1596
+ if not python_has_signature and 'IPython' in sys .modules :
1598
1597
try :
1599
1598
import IPython .utils .signatures
1600
1599
signature = IPython .utils .signatures .signature
You can’t perform that action at this time.
0 commit comments