The following issues were found
numpy/fft/helper.py
12 issues
Line: 15
Column: 29
integer_types = (int, integer)
def _fftshift_dispatcher(x, axes=None):
return (x,)
@array_function_dispatch(_fftshift_dispatcher, module='numpy.fft')
def fftshift(x, axes=None):
Reported by Pylint.
Line: 15
Column: 1
integer_types = (int, integer)
def _fftshift_dispatcher(x, axes=None):
return (x,)
@array_function_dispatch(_fftshift_dispatcher, module='numpy.fft')
def fftshift(x, axes=None):
Reported by Pylint.
Line: 20
Column: 1
@array_function_dispatch(_fftshift_dispatcher, module='numpy.fft')
def fftshift(x, axes=None):
"""
Shift the zero-frequency component to the center of the spectrum.
This function swaps half-spaces for all axes listed (defaults to all).
Note that ``y[0]`` is the Nyquist component only if ``len(x)`` is even.
Reported by Pylint.
Line: 77
Column: 1
@array_function_dispatch(_fftshift_dispatcher, module='numpy.fft')
def ifftshift(x, axes=None):
"""
The inverse of `fftshift`. Although identical for even-length `x`, the
functions differ by one sample for odd-length `x`.
Parameters
Reported by Pylint.
Line: 124
Column: 1
@set_module('numpy.fft')
def fftfreq(n, d=1.0):
"""
Return the Discrete Fourier Transform sample frequencies.
The returned float array `f` contains the frequency bin centers in cycles
per unit of the sample spacing (with zero at the start). For instance, if
Reported by Pylint.
Line: 124
Column: 1
@set_module('numpy.fft')
def fftfreq(n, d=1.0):
"""
Return the Discrete Fourier Transform sample frequencies.
The returned float array `f` contains the frequency bin centers in cycles
per unit of the sample spacing (with zero at the start). For instance, if
Reported by Pylint.
Line: 164
Column: 5
raise ValueError("n should be an integer")
val = 1.0 / (n * d)
results = empty(n, int)
N = (n-1)//2 + 1
p1 = arange(0, N, dtype=int)
results[:N] = p1
p2 = arange(-(n//2), 0, dtype=int)
results[N:] = p2
return results * val
Reported by Pylint.
Line: 165
Column: 5
val = 1.0 / (n * d)
results = empty(n, int)
N = (n-1)//2 + 1
p1 = arange(0, N, dtype=int)
results[:N] = p1
p2 = arange(-(n//2), 0, dtype=int)
results[N:] = p2
return results * val
Reported by Pylint.
Line: 167
Column: 5
N = (n-1)//2 + 1
p1 = arange(0, N, dtype=int)
results[:N] = p1
p2 = arange(-(n//2), 0, dtype=int)
results[N:] = p2
return results * val
@set_module('numpy.fft')
Reported by Pylint.
Line: 173
Column: 1
@set_module('numpy.fft')
def rfftfreq(n, d=1.0):
"""
Return the Discrete Fourier Transform sample frequencies
(for usage with rfft, irfft).
The returned float array `f` contains the frequency bin centers in cycles
Reported by Pylint.
doc/example.py
12 issues
Line: 34
Column: 1
# be able to paste and execute docstrings after importing only the
# numpy module itself, unabbreviated.
from my_module import my_func, other_func
def foo(var1, var2, long_var_name='hi'):
r"""A one-line summary that does not use variable names or the
function name.
Reported by Pylint.
Line: 11
Column: 1
a line by itself, preferably preceded by a blank line.
"""
import os # standard library imports first
# Do NOT import using *, e.g. from numpy import *
#
# Import the module using
#
Reported by Pylint.
Line: 26
Column: 1
# If you prefer the use of abbreviated module names, we suggest the
# convention used by NumPy itself::
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
# These abbreviated names are not to be used in docstrings; users must
# be able to paste and execute docstrings after importing only the
Reported by Pylint.
Line: 27
Column: 1
# convention used by NumPy itself::
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
# These abbreviated names are not to be used in docstrings; users must
# be able to paste and execute docstrings after importing only the
# numpy module itself, unabbreviated.
Reported by Pylint.
Line: 28
Column: 1
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
# These abbreviated names are not to be used in docstrings; users must
# be able to paste and execute docstrings after importing only the
# numpy module itself, unabbreviated.
Reported by Pylint.
Line: 34
Column: 1
# be able to paste and execute docstrings after importing only the
# numpy module itself, unabbreviated.
from my_module import my_func, other_func
def foo(var1, var2, long_var_name='hi'):
r"""A one-line summary that does not use variable names or the
function name.
Reported by Pylint.
Line: 34
Column: 1
# be able to paste and execute docstrings after importing only the
# numpy module itself, unabbreviated.
from my_module import my_func, other_func
def foo(var1, var2, long_var_name='hi'):
r"""A one-line summary that does not use variable names or the
function name.
Reported by Pylint.
Line: 36
Column: 21
from my_module import my_func, other_func
def foo(var1, var2, long_var_name='hi'):
r"""A one-line summary that does not use variable names or the
function name.
Several sentences providing an extended description. Refer to
variables using back-ticks, e.g. `var`.
Reported by Pylint.
Line: 36
Column: 15
from my_module import my_func, other_func
def foo(var1, var2, long_var_name='hi'):
r"""A one-line summary that does not use variable names or the
function name.
Several sentences providing an extended description. Refer to
variables using back-ticks, e.g. `var`.
Reported by Pylint.
Line: 36
Column: 9
from my_module import my_func, other_func
def foo(var1, var2, long_var_name='hi'):
r"""A one-line summary that does not use variable names or the
function name.
Several sentences providing an extended description. Refer to
variables using back-ticks, e.g. `var`.
Reported by Pylint.
numpy/typing/tests/data/fail/modules.py
12 issues
Line: 3
Column: 1
import numpy as np
np.testing.bob # E: Module has no attribute
np.bob # E: Module has no attribute
# Stdlib modules in the namespace by accident
np.warnings # E: Module has no attribute
np.sys # E: Module has no attribute
np.os # E: Module has no attribute
Reported by Pylint.
Line: 3
Column: 1
import numpy as np
np.testing.bob # E: Module has no attribute
np.bob # E: Module has no attribute
# Stdlib modules in the namespace by accident
np.warnings # E: Module has no attribute
np.sys # E: Module has no attribute
np.os # E: Module has no attribute
Reported by Pylint.
Line: 4
Column: 1
import numpy as np
np.testing.bob # E: Module has no attribute
np.bob # E: Module has no attribute
# Stdlib modules in the namespace by accident
np.warnings # E: Module has no attribute
np.sys # E: Module has no attribute
np.os # E: Module has no attribute
Reported by Pylint.
Line: 7
Column: 1
np.bob # E: Module has no attribute
# Stdlib modules in the namespace by accident
np.warnings # E: Module has no attribute
np.sys # E: Module has no attribute
np.os # E: Module has no attribute
np.math # E: Module has no attribute
# Public sub-modules that are not imported to their parent module by default;
Reported by Pylint.
Line: 8
Column: 1
# Stdlib modules in the namespace by accident
np.warnings # E: Module has no attribute
np.sys # E: Module has no attribute
np.os # E: Module has no attribute
np.math # E: Module has no attribute
# Public sub-modules that are not imported to their parent module by default;
# e.g. one must first execute `import numpy.lib.recfunctions`
Reported by Pylint.
Line: 9
Column: 1
# Stdlib modules in the namespace by accident
np.warnings # E: Module has no attribute
np.sys # E: Module has no attribute
np.os # E: Module has no attribute
np.math # E: Module has no attribute
# Public sub-modules that are not imported to their parent module by default;
# e.g. one must first execute `import numpy.lib.recfunctions`
np.lib.recfunctions # E: Module has no attribute
Reported by Pylint.
Line: 10
Column: 1
np.warnings # E: Module has no attribute
np.sys # E: Module has no attribute
np.os # E: Module has no attribute
np.math # E: Module has no attribute
# Public sub-modules that are not imported to their parent module by default;
# e.g. one must first execute `import numpy.lib.recfunctions`
np.lib.recfunctions # E: Module has no attribute
Reported by Pylint.
Line: 14
Column: 1
# Public sub-modules that are not imported to their parent module by default;
# e.g. one must first execute `import numpy.lib.recfunctions`
np.lib.recfunctions # E: Module has no attribute
np.__NUMPY_SETUP__ # E: Module has no attribute
np.__deprecated_attrs__ # E: Module has no attribute
np.__expired_functions__ # E: Module has no attribute
Reported by Pylint.
Line: 16
Column: 1
# e.g. one must first execute `import numpy.lib.recfunctions`
np.lib.recfunctions # E: Module has no attribute
np.__NUMPY_SETUP__ # E: Module has no attribute
np.__deprecated_attrs__ # E: Module has no attribute
np.__expired_functions__ # E: Module has no attribute
Reported by Pylint.
Line: 17
Column: 1
np.lib.recfunctions # E: Module has no attribute
np.__NUMPY_SETUP__ # E: Module has no attribute
np.__deprecated_attrs__ # E: Module has no attribute
np.__expired_functions__ # E: Module has no attribute
Reported by Pylint.
numpy/typing/tests/data/reveal/arrayprint.py
11 issues
Line: 4
Column: 5
from typing import Any, Callable
import numpy as np
AR: np.ndarray[Any, Any]
func_float: Callable[[np.floating[Any]], str]
func_int: Callable[[np.integer[Any]], str]
reveal_type(np.get_printoptions()) # E: TypedDict
reveal_type(np.array2string( # E: str
Reported by Pylint.
Line: 5
Column: 23
import numpy as np
AR: np.ndarray[Any, Any]
func_float: Callable[[np.floating[Any]], str]
func_int: Callable[[np.integer[Any]], str]
reveal_type(np.get_printoptions()) # E: TypedDict
reveal_type(np.array2string( # E: str
AR, formatter={'float_kind': func_float, 'int_kind': func_int}
Reported by Pylint.
Line: 8
Column: 1
func_float: Callable[[np.floating[Any]], str]
func_int: Callable[[np.integer[Any]], str]
reveal_type(np.get_printoptions()) # E: TypedDict
reveal_type(np.array2string( # E: str
AR, formatter={'float_kind': func_float, 'int_kind': func_int}
))
reveal_type(np.format_float_scientific(1.0)) # E: str
reveal_type(np.format_float_positional(1)) # E: str
Reported by Pylint.
Line: 9
Column: 1
func_int: Callable[[np.integer[Any]], str]
reveal_type(np.get_printoptions()) # E: TypedDict
reveal_type(np.array2string( # E: str
AR, formatter={'float_kind': func_float, 'int_kind': func_int}
))
reveal_type(np.format_float_scientific(1.0)) # E: str
reveal_type(np.format_float_positional(1)) # E: str
reveal_type(np.array_repr(AR)) # E: str
Reported by Pylint.
Line: 12
Column: 1
reveal_type(np.array2string( # E: str
AR, formatter={'float_kind': func_float, 'int_kind': func_int}
))
reveal_type(np.format_float_scientific(1.0)) # E: str
reveal_type(np.format_float_positional(1)) # E: str
reveal_type(np.array_repr(AR)) # E: str
reveal_type(np.array_str(AR)) # E: str
reveal_type(np.printoptions()) # E: contextlib._GeneratorContextManager
Reported by Pylint.
Line: 13
Column: 1
AR, formatter={'float_kind': func_float, 'int_kind': func_int}
))
reveal_type(np.format_float_scientific(1.0)) # E: str
reveal_type(np.format_float_positional(1)) # E: str
reveal_type(np.array_repr(AR)) # E: str
reveal_type(np.array_str(AR)) # E: str
reveal_type(np.printoptions()) # E: contextlib._GeneratorContextManager
with np.printoptions() as dct:
Reported by Pylint.
Line: 14
Column: 1
))
reveal_type(np.format_float_scientific(1.0)) # E: str
reveal_type(np.format_float_positional(1)) # E: str
reveal_type(np.array_repr(AR)) # E: str
reveal_type(np.array_str(AR)) # E: str
reveal_type(np.printoptions()) # E: contextlib._GeneratorContextManager
with np.printoptions() as dct:
reveal_type(dct) # E: TypedDict
Reported by Pylint.
Line: 15
Column: 1
reveal_type(np.format_float_scientific(1.0)) # E: str
reveal_type(np.format_float_positional(1)) # E: str
reveal_type(np.array_repr(AR)) # E: str
reveal_type(np.array_str(AR)) # E: str
reveal_type(np.printoptions()) # E: contextlib._GeneratorContextManager
with np.printoptions() as dct:
reveal_type(dct) # E: TypedDict
Reported by Pylint.
Line: 17
Column: 1
reveal_type(np.array_repr(AR)) # E: str
reveal_type(np.array_str(AR)) # E: str
reveal_type(np.printoptions()) # E: contextlib._GeneratorContextManager
with np.printoptions() as dct:
reveal_type(dct) # E: TypedDict
Reported by Pylint.
Line: 19
Column: 5
reveal_type(np.printoptions()) # E: contextlib._GeneratorContextManager
with np.printoptions() as dct:
reveal_type(dct) # E: TypedDict
Reported by Pylint.
numpy/distutils/fcompiler/vast.py
11 issues
Line: 7
Column: 1
compilers = ['VastFCompiler']
class VastFCompiler(GnuFCompiler):
compiler_type = 'vast'
compiler_aliases = ()
description = 'Pacific-Sierra Research Fortran 90 Compiler'
version_pattern = (r'\s*Pacific-Sierra Research vf90 '
r'(Personal|Professional)\s+(?P<version>[^\s]*)')
Reported by Pylint.
Line: 7
Column: 1
compilers = ['VastFCompiler']
class VastFCompiler(GnuFCompiler):
compiler_type = 'vast'
compiler_aliases = ()
description = 'Pacific-Sierra Research Fortran 90 Compiler'
version_pattern = (r'\s*Pacific-Sierra Research vf90 '
r'(Personal|Professional)\s+(?P<version>[^\s]*)')
Reported by Pylint.
Line: 27
Column: 2
'archiver' : ["ar", "-cr"],
'ranlib' : ["ranlib"]
}
module_dir_switch = None #XXX Fix me
module_include_switch = None #XXX Fix me
def find_executables(self):
pass
Reported by Pylint.
Line: 28
Column: 2
'ranlib' : ["ranlib"]
}
module_dir_switch = None #XXX Fix me
module_include_switch = None #XXX Fix me
def find_executables(self):
pass
def get_version_cmd(self):
Reported by Pylint.
Line: 43
Column: 9
vast_version = self.get_version()
gnu = GnuFCompiler()
gnu.customize(None)
self.version = gnu.get_version()
opt = GnuFCompiler.get_flags_arch(self)
self.version = vast_version
return opt
if __name__ == '__main__':
Reported by Pylint.
Line: 45
Column: 9
gnu.customize(None)
self.version = gnu.get_version()
opt = GnuFCompiler.get_flags_arch(self)
self.version = vast_version
return opt
if __name__ == '__main__':
from distutils import log
log.set_verbosity(2)
Reported by Pylint.
Line: 1
Column: 1
import os
from numpy.distutils.fcompiler.gnu import GnuFCompiler
compilers = ['VastFCompiler']
class VastFCompiler(GnuFCompiler):
compiler_type = 'vast'
compiler_aliases = ()
Reported by Pylint.
Line: 7
Column: 1
compilers = ['VastFCompiler']
class VastFCompiler(GnuFCompiler):
compiler_type = 'vast'
compiler_aliases = ()
description = 'Pacific-Sierra Research Fortran 90 Compiler'
version_pattern = (r'\s*Pacific-Sierra Research vf90 '
r'(Personal|Professional)\s+(?P<version>[^\s]*)')
Reported by Pylint.
Line: 33
Column: 5
def find_executables(self):
pass
def get_version_cmd(self):
f90 = self.compiler_f90[0]
d, b = os.path.split(f90)
vf90 = os.path.join(d, 'v'+b)
return vf90
Reported by Pylint.
Line: 35
Column: 12
def get_version_cmd(self):
f90 = self.compiler_f90[0]
d, b = os.path.split(f90)
vf90 = os.path.join(d, 'v'+b)
return vf90
def get_flags_arch(self):
vast_version = self.get_version()
Reported by Pylint.
numpy/ma/tests/test_deprecations.py
11 issues
Line: 11
Column: 5
class TestArgsort:
""" gh-8701 """
def _test_base(self, argsort, cls):
arr_0d = np.array(1).view(cls)
argsort(arr_0d)
arr_1d = np.array([1, 2, 3]).view(cls)
argsort(arr_1d)
Reported by Pylint.
Line: 28
Column: 5
argsort(arr_2d, axis=None)
argsort(arr_2d, axis=-1)
def test_function_ndarray(self):
return self._test_base(np.ma.argsort, np.ndarray)
def test_function_maskedarray(self):
return self._test_base(np.ma.argsort, np.ma.MaskedArray)
Reported by Pylint.
Line: 31
Column: 5
def test_function_ndarray(self):
return self._test_base(np.ma.argsort, np.ndarray)
def test_function_maskedarray(self):
return self._test_base(np.ma.argsort, np.ma.MaskedArray)
def test_method(self):
return self._test_base(np.ma.MaskedArray.argsort, np.ma.MaskedArray)
Reported by Pylint.
Line: 34
Column: 5
def test_function_maskedarray(self):
return self._test_base(np.ma.argsort, np.ma.MaskedArray)
def test_method(self):
return self._test_base(np.ma.MaskedArray.argsort, np.ma.MaskedArray)
class TestMinimumMaximum:
def test_minimum(self):
Reported by Pylint.
Line: 38
Column: 1
return self._test_base(np.ma.MaskedArray.argsort, np.ma.MaskedArray)
class TestMinimumMaximum:
def test_minimum(self):
assert_warns(DeprecationWarning, np.ma.minimum, np.ma.array([1, 2]))
def test_maximum(self):
assert_warns(DeprecationWarning, np.ma.maximum, np.ma.array([1, 2]))
Reported by Pylint.
Line: 39
Column: 5
class TestMinimumMaximum:
def test_minimum(self):
assert_warns(DeprecationWarning, np.ma.minimum, np.ma.array([1, 2]))
def test_maximum(self):
assert_warns(DeprecationWarning, np.ma.maximum, np.ma.array([1, 2]))
Reported by Pylint.
Line: 39
Column: 5
class TestMinimumMaximum:
def test_minimum(self):
assert_warns(DeprecationWarning, np.ma.minimum, np.ma.array([1, 2]))
def test_maximum(self):
assert_warns(DeprecationWarning, np.ma.maximum, np.ma.array([1, 2]))
Reported by Pylint.
Line: 42
Column: 5
def test_minimum(self):
assert_warns(DeprecationWarning, np.ma.minimum, np.ma.array([1, 2]))
def test_maximum(self):
assert_warns(DeprecationWarning, np.ma.maximum, np.ma.array([1, 2]))
def test_axis_default(self):
# NumPy 1.13, 2017-05-06
Reported by Pylint.
Line: 42
Column: 5
def test_minimum(self):
assert_warns(DeprecationWarning, np.ma.minimum, np.ma.array([1, 2]))
def test_maximum(self):
assert_warns(DeprecationWarning, np.ma.maximum, np.ma.array([1, 2]))
def test_axis_default(self):
# NumPy 1.13, 2017-05-06
Reported by Pylint.
Line: 45
Column: 5
def test_maximum(self):
assert_warns(DeprecationWarning, np.ma.maximum, np.ma.array([1, 2]))
def test_axis_default(self):
# NumPy 1.13, 2017-05-06
data1d = np.ma.arange(6)
data2d = data1d.reshape(2, 3)
Reported by Pylint.
numpy/typing/_scalars.py
11 issues
Line: 1
Column: 1
from typing import Union, Tuple, Any
import numpy as np
# NOTE: `_StrLike_co` and `_BytesLike_co` are pointless, as `np.str_` and
# `np.bytes_` are already subclasses of their builtin counterpart
_CharLike_co = Union[str, bytes]
Reported by Pylint.
Line: 8
Column: 1
# NOTE: `_StrLike_co` and `_BytesLike_co` are pointless, as `np.str_` and
# `np.bytes_` are already subclasses of their builtin counterpart
_CharLike_co = Union[str, bytes]
# The 6 `<X>Like_co` type-aliases below represent all scalars that can be
# coerced into `<X>` (with the casting rule `same_kind`)
_BoolLike_co = Union[bool, np.bool_]
_UIntLike_co = Union[_BoolLike_co, np.unsignedinteger]
Reported by Pylint.
Line: 12
Column: 1
# The 6 `<X>Like_co` type-aliases below represent all scalars that can be
# coerced into `<X>` (with the casting rule `same_kind`)
_BoolLike_co = Union[bool, np.bool_]
_UIntLike_co = Union[_BoolLike_co, np.unsignedinteger]
_IntLike_co = Union[_BoolLike_co, int, np.integer]
_FloatLike_co = Union[_IntLike_co, float, np.floating]
_ComplexLike_co = Union[_FloatLike_co, complex, np.complexfloating]
_TD64Like_co = Union[_IntLike_co, np.timedelta64]
Reported by Pylint.
Line: 13
Column: 1
# The 6 `<X>Like_co` type-aliases below represent all scalars that can be
# coerced into `<X>` (with the casting rule `same_kind`)
_BoolLike_co = Union[bool, np.bool_]
_UIntLike_co = Union[_BoolLike_co, np.unsignedinteger]
_IntLike_co = Union[_BoolLike_co, int, np.integer]
_FloatLike_co = Union[_IntLike_co, float, np.floating]
_ComplexLike_co = Union[_FloatLike_co, complex, np.complexfloating]
_TD64Like_co = Union[_IntLike_co, np.timedelta64]
Reported by Pylint.
Line: 14
Column: 1
# coerced into `<X>` (with the casting rule `same_kind`)
_BoolLike_co = Union[bool, np.bool_]
_UIntLike_co = Union[_BoolLike_co, np.unsignedinteger]
_IntLike_co = Union[_BoolLike_co, int, np.integer]
_FloatLike_co = Union[_IntLike_co, float, np.floating]
_ComplexLike_co = Union[_FloatLike_co, complex, np.complexfloating]
_TD64Like_co = Union[_IntLike_co, np.timedelta64]
_NumberLike_co = Union[int, float, complex, np.number, np.bool_]
Reported by Pylint.
Line: 15
Column: 1
_BoolLike_co = Union[bool, np.bool_]
_UIntLike_co = Union[_BoolLike_co, np.unsignedinteger]
_IntLike_co = Union[_BoolLike_co, int, np.integer]
_FloatLike_co = Union[_IntLike_co, float, np.floating]
_ComplexLike_co = Union[_FloatLike_co, complex, np.complexfloating]
_TD64Like_co = Union[_IntLike_co, np.timedelta64]
_NumberLike_co = Union[int, float, complex, np.number, np.bool_]
_ScalarLike_co = Union[
Reported by Pylint.
Line: 16
Column: 1
_UIntLike_co = Union[_BoolLike_co, np.unsignedinteger]
_IntLike_co = Union[_BoolLike_co, int, np.integer]
_FloatLike_co = Union[_IntLike_co, float, np.floating]
_ComplexLike_co = Union[_FloatLike_co, complex, np.complexfloating]
_TD64Like_co = Union[_IntLike_co, np.timedelta64]
_NumberLike_co = Union[int, float, complex, np.number, np.bool_]
_ScalarLike_co = Union[
int,
Reported by Pylint.
Line: 17
Column: 1
_IntLike_co = Union[_BoolLike_co, int, np.integer]
_FloatLike_co = Union[_IntLike_co, float, np.floating]
_ComplexLike_co = Union[_FloatLike_co, complex, np.complexfloating]
_TD64Like_co = Union[_IntLike_co, np.timedelta64]
_NumberLike_co = Union[int, float, complex, np.number, np.bool_]
_ScalarLike_co = Union[
int,
float,
Reported by Pylint.
Line: 19
Column: 1
_ComplexLike_co = Union[_FloatLike_co, complex, np.complexfloating]
_TD64Like_co = Union[_IntLike_co, np.timedelta64]
_NumberLike_co = Union[int, float, complex, np.number, np.bool_]
_ScalarLike_co = Union[
int,
float,
complex,
str,
Reported by Pylint.
Line: 20
Column: 1
_TD64Like_co = Union[_IntLike_co, np.timedelta64]
_NumberLike_co = Union[int, float, complex, np.number, np.bool_]
_ScalarLike_co = Union[
int,
float,
complex,
str,
bytes,
Reported by Pylint.
tools/changelog.py
11 issues
Line: 41
Column: 1
import sys
import re
from git import Repo
from github import Github
if sys.version_info[:2] < (3, 6):
raise RuntimeError("Python version must be >= 3.6")
this_repo = Repo(os.path.join(os.path.dirname(__file__), ".."))
Reported by Pylint.
Line: 61
Column: 18
def get_authors(revision_range):
lst_release, cur_release = [r.strip() for r in revision_range.split('..')]
authors_pat = r'^.*\t(.*)$'
# authors and co-authors in current and previous releases.
grp1 = '--group=author'
grp2 = '--group=trailer:co-authored-by'
Reported by Pylint.
Line: 114
Column: 18
def main(token, revision_range):
lst_release, cur_release = [r.strip() for r in revision_range.split('..')]
github = Github(token)
github_repo = github.get_repo('numpy/numpy')
# document authors
Reported by Pylint.
Line: 114
Column: 5
def main(token, revision_range):
lst_release, cur_release = [r.strip() for r in revision_range.split('..')]
github = Github(token)
github_repo = github.get_repo('numpy/numpy')
# document authors
Reported by Pylint.
Line: 48
Column: 1
this_repo = Repo(os.path.join(os.path.dirname(__file__), ".."))
author_msg =\
"""
A total of %d people contributed to this release. People with a "+" by their
names contributed a patch for the first time.
"""
Reported by Pylint.
Line: 54
Column: 1
names contributed a patch for the first time.
"""
pull_request_msg =\
"""
A total of %d pull requests were merged for this release.
"""
Reported by Pylint.
Line: 60
Column: 1
"""
def get_authors(revision_range):
lst_release, cur_release = [r.strip() for r in revision_range.split('..')]
authors_pat = r'^.*\t(.*)$'
# authors and co-authors in current and previous releases.
grp1 = '--group=author'
Reported by Pylint.
Line: 82
Column: 1
# Append '+' to new authors.
authors_new = [s + ' +' for s in authors_cur - authors_pre]
authors_old = [s for s in authors_cur & authors_pre]
authors = authors_new + authors_old
authors.sort()
return authors
Reported by Pylint.
Line: 88
Column: 1
return authors
def get_pull_requests(repo, revision_range):
prnums = []
# From regular merges
merges = this_repo.git.log(
'--oneline', '--merges', revision_range)
Reported by Pylint.
Line: 113
Column: 1
return prs
def main(token, revision_range):
lst_release, cur_release = [r.strip() for r in revision_range.split('..')]
github = Github(token)
github_repo = github.get_repo('numpy/numpy')
Reported by Pylint.
numpy/_pytesttester.py
11 issues
Line: 128
Column: 9
True
"""
import pytest
import warnings
module = sys.modules[self.module_name]
module_path = os.path.abspath(module.__path__[0])
Reported by Pylint.
Line: 43
Column: 12
print("NumPy version %s" % np.__version__)
relaxed_strides = np.ones((10, 1), order="C").flags.f_contiguous
print("NumPy relaxed strides checking option:", relaxed_strides)
info = np.lib.utils._opt_info()
print("NumPy CPU features: ", (info if info else 'nothing enabled'))
class PytestTester:
Reported by Pylint.
Line: 145
Column: 13
# so fetch module for suppression here.
with warnings.catch_warnings():
warnings.simplefilter("always")
from numpy.distutils import cpuinfo
# Filter out annoying import messages. Want these in both develop and
# release mode.
pytest_args += [
"-W ignore:Not importing directory",
Reported by Pylint.
Line: 38
Column: 5
def _show_numpy_info():
import numpy as np
print("NumPy version %s" % np.__version__)
relaxed_strides = np.ones((10, 1), order="C").flags.f_contiguous
print("NumPy relaxed strides checking option:", relaxed_strides)
info = np.lib.utils._opt_info()
Reported by Pylint.
Line: 48
Column: 1
class PytestTester:
"""
Pytest test runner.
A test function is typically added to a package's __init__.py like so::
Reported by Pylint.
Line: 81
Column: 5
def __init__(self, module_name):
self.module_name = module_name
def __call__(self, label='fast', verbose=1, extra_argv=None,
doctests=False, coverage=False, durations=-1, tests=None):
"""
Run tests for module using pytest.
Parameters
Reported by Pylint.
Line: 81
Column: 5
def __init__(self, module_name):
self.module_name = module_name
def __call__(self, label='fast', verbose=1, extra_argv=None,
doctests=False, coverage=False, durations=-1, tests=None):
"""
Run tests for module using pytest.
Parameters
Reported by Pylint.
Line: 128
Column: 9
True
"""
import pytest
import warnings
module = sys.modules[self.module_name]
module_path = os.path.abspath(module.__path__[0])
Reported by Pylint.
Line: 129
Column: 9
"""
import pytest
import warnings
module = sys.modules[self.module_name]
module_path = os.path.abspath(module.__path__[0])
# setup the pytest arguments
Reported by Pylint.
Line: 145
Column: 13
# so fetch module for suppression here.
with warnings.catch_warnings():
warnings.simplefilter("always")
from numpy.distutils import cpuinfo
# Filter out annoying import messages. Want these in both develop and
# release mode.
pytest_args += [
"-W ignore:Not importing directory",
Reported by Pylint.
numpy/distutils/fcompiler/pg.py
11 issues
Line: 11
Column: 1
compilers = ['PGroupFCompiler', 'PGroupFlangCompiler']
class PGroupFCompiler(FCompiler):
compiler_type = 'pg'
description = 'Portland Group Fortran Compiler'
version_pattern = r'\s*pg(f77|f90|hpf|fortran) (?P<version>[\d.-]+).*'
Reported by Pylint.
Line: 11
Column: 1
compilers = ['PGroupFCompiler', 'PGroupFlangCompiler']
class PGroupFCompiler(FCompiler):
compiler_type = 'pg'
description = 'Portland Group Fortran Compiler'
version_pattern = r'\s*pg(f77|f90|hpf|fortran) (?P<version>[\d.-]+).*'
Reported by Pylint.
Line: 61
Column: 42
def get_flags_linker_so(self):
return ["-shared", '-fpic']
def runtime_library_dir_option(self, dir):
return '-R%s' % dir
import functools
Reported by Pylint.
Line: 117
Column: 42
def get_flags_arch(self):
return []
def runtime_library_dir_option(self, dir):
raise NotImplementedError
if __name__ == '__main__':
from distutils import log
Reported by Pylint.
Line: 1
Column: 1
# http://www.pgroup.com
import sys
from numpy.distutils.fcompiler import FCompiler
from sys import platform
from os.path import join, dirname, normpath
compilers = ['PGroupFCompiler', 'PGroupFlangCompiler']
Reported by Pylint.
Line: 5
Column: 1
import sys
from numpy.distutils.fcompiler import FCompiler
from sys import platform
from os.path import join, dirname, normpath
compilers = ['PGroupFCompiler', 'PGroupFlangCompiler']
Reported by Pylint.
Line: 6
Column: 1
from numpy.distutils.fcompiler import FCompiler
from sys import platform
from os.path import join, dirname, normpath
compilers = ['PGroupFCompiler', 'PGroupFlangCompiler']
class PGroupFCompiler(FCompiler):
Reported by Pylint.
Line: 11
Column: 1
compilers = ['PGroupFCompiler', 'PGroupFlangCompiler']
class PGroupFCompiler(FCompiler):
compiler_type = 'pg'
description = 'Portland Group Fortran Compiler'
version_pattern = r'\s*pg(f77|f90|hpf|fortran) (?P<version>[\d.-]+).*'
Reported by Pylint.
Line: 65
Column: 1
return '-R%s' % dir
import functools
class PGroupFlangCompiler(FCompiler):
compiler_type = 'flang'
description = 'Portland Group Fortran LLVM Compiler'
version_pattern = r'\s*(flang|clang) version (?P<version>[\d.-]+).*'
Reported by Pylint.
Line: 65
Column: 1
return '-R%s' % dir
import functools
class PGroupFlangCompiler(FCompiler):
compiler_type = 'flang'
description = 'Portland Group Fortran LLVM Compiler'
version_pattern = r'\s*(flang|clang) version (?P<version>[\d.-]+).*'
Reported by Pylint.