Skip to content

Commit e2cf264

Browse files
committed
MNT: use already imported version variables
1 parent 572c1e2 commit e2cf264

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

lib/matplotlib/__init__.py

+3-6
Original file line numberDiff line numberDiff line change
@@ -1588,12 +1588,9 @@ def foo(ax, *args, **kwargs)
15881588

15891589
def param(func):
15901590
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
1591+
python_has_signature = major >= 3 and minor1 >= 3
1592+
python_has_wrapped = major >= 3 and minor1 >= 2
1593+
15971594
if not python_has_signature:
15981595
try:
15991596
import IPython.utils.signatures

0 commit comments

Comments
 (0)