The following issues were found
numpy/typing/tests/data/fail/warnings_and_errors.py
1 issues
Line: 1
Column: 1
import numpy as np
np.AxisError(1.0) # E: No overload variant
np.AxisError(1, ndim=2.0) # E: No overload variant
np.AxisError(2, msg_prefix=404) # E: No overload variant
Reported by Pylint.
numpy/typing/tests/data/pass/warnings_and_errors.py
1 issues
Line: 1
Column: 1
import numpy as np
np.AxisError("test")
np.AxisError(1, ndim=2)
np.AxisError(1, ndim=2, msg_prefix="error")
np.AxisError(1, ndim=2, msg_prefix=None)
Reported by Pylint.
numpy/lib/_version.py
1 issues
Line: 69
Column: 13
else:
alpha = re.match(r'a\d', vstring[ver_main.end():])
beta = re.match(r'b\d', vstring[ver_main.end():])
rc = re.match(r'rc\d', vstring[ver_main.end():])
pre_rel = [m for m in [alpha, beta, rc] if m is not None]
if pre_rel:
self.pre_release = pre_rel[0].group()
else:
self.pre_release = ''
Reported by Pylint.
numpy/lib/arrayterator.py
1 issues
Line: 89
Column: 1
self.buf_size = buf_size
self.start = [0 for dim in var.shape]
self.stop = [dim for dim in var.shape]
self.step = [1 for dim in var.shape]
def __getattr__(self, attr):
return getattr(self.var, attr)
Reported by Pylint.
numpy/distutils/command/develop.py
1 issues
Line: 8
Column: 1
"""
from setuptools.command.develop import develop as old_develop
class develop(old_develop):
__doc__ = old_develop.__doc__
def install_for_development(self):
# Build sources in-place, too.
self.reinitialize_command('build_src', inplace=1)
# Make sure scripts are built.
Reported by Pylint.
numpy/typing/tests/data/fail/numerictypes.py
1 issues
Line: 1
Column: 1
import numpy as np
# Techincally this works, but probably shouldn't. See
#
# https://github.com/numpy/numpy/issues/16366
#
np.maximum_sctype(1) # E: No overload variant
np.issubsctype(1, np.int64) # E: incompatible type
Reported by Pylint.
numpy/typing/tests/data/fail/ndarray.py
1 issues
Line: 1
Column: 1
import numpy as np
# Ban setting dtype since mutating the type of the array in place
# makes having ndarray be generic over dtype impossible. Generally
# users should use `ndarray.view` in this situation anyway. See
#
# https://github.com/numpy/numpy-stubs/issues/7
#
# for more context.
Reported by Pylint.
numpy/typing/tests/data/fail/lib_utils.py
1 issues
Line: 1
Column: 1
import numpy as np
np.deprecate(1) # E: No overload variant
np.deprecate_with_doc(1) # E: incompatible type
np.byte_bounds(1) # E: incompatible type
np.who(1) # E: incompatible type
Reported by Pylint.
numpy/typing/tests/data/fail/datasource.py
1 issues
Line: 1
Column: 1
from pathlib import Path
import numpy as np
path: Path
d1: np.DataSource
d1.abspath(path) # E: incompatible type
d1.abspath(b"...") # E: incompatible type
Reported by Pylint.
numpy/typing/tests/data/fail/constants.py
1 issues
Line: 1
Column: 1
import numpy as np
np.Inf = np.Inf # E: Cannot assign to final
np.ALLOW_THREADS = np.ALLOW_THREADS # E: Cannot assign to final
np.little_endian = np.little_endian # E: Cannot assign to final
np.UFUNC_PYVALS_NAME = "bob" # E: Incompatible types
np.CLIP = 2 # E: Incompatible types
Reported by Pylint.