Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

Commit 626fc32

Browse files
stu1130reminisce
authored andcommitted
Disable Pylint false error in numpy_op_signature (#16370)
* hot fix to avoid pylint error * retrigger CI
1 parent 09ae7df commit 626fc32

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

python/mxnet/numpy_op_signature.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717

1818
"""Make builtin ops' signatures compatible with NumPy."""
1919

20-
from __future__ import absolute_import
21-
import sys
20+
from __future__ import absolute_import # pylint: disable=reimported
21+
from sys import version, version_info
2222
import warnings
2323
from . import _numpy_op_doc
2424
from . import numpy as mx_np
@@ -55,11 +55,11 @@ def _get_builtin_op(op_name):
5555

5656

5757
def _register_op_signatures():
58-
if sys.version_info.major < 3 or sys.version_info.minor < 5:
58+
if version_info.major < 3 or version_info.minor < 5:
5959
warnings.warn('Some mxnet.numpy operator signatures may not be displayed consistently with '
6060
'their counterparts in the official NumPy package due to too-low Python '
6161
'version {}. Python >= 3.5 is required to make the signatures display correctly.'
62-
.format(str(sys.version)))
62+
.format(str(version)))
6363
return
6464

6565
import inspect

0 commit comments

Comments
 (0)