pbrod/numdifftools

View on GitHub

Showing 591 of 591 total issues

Missing whitespace around arithmetic operator
Open

            error = err2 + abs(res-e_2) + err3
Severity: Minor
Found in src/numdifftools/extrapolation.py by pep8

Surround operators with a single space on either side.

- Always surround these binary operators with a single space on
  either side: assignment (=), augmented assignment (+=, -= etc.),
  comparisons (==, <, >, !=, <=, >=, in, not in, is, is not),
  Booleans (and, or, not).

- If operators with different priorities are used, consider adding
  whitespace around the operators with the lowest priorities.

Okay: i = i + 1
Okay: submitted += 1
Okay: x = x * 2 - 1
Okay: hypot2 = x * x + y * y
Okay: c = (a + b) * (a - b)
Okay: foo(bar, key='word', *args, **kwargs)
Okay: alpha[:-i]

E225: i=i+1
E225: submitted +=1
E225: x = x /2 - 1
E225: z = x **y
E225: z = 1and 1
E226: c = (a+b) * (a-b)
E226: hypot2 = x*x + y*y
E227: c = a|b
E228: msg = fmt%(errno, errmsg)

Line break after binary operator
Open

                    (abs(der) > (a_median * trim_fact))) * (a_median > 1e-8) +
Severity: Minor
Found in src/numdifftools/limits.py by pep8

Avoid breaks after binary operators.

The preferred place to break around a binary operator is before the
operator, not after it.

W504: (width == 0 +\n height == 0)
W504: (width == 0 and\n height == 0)
W504: var = (1 &\n       ~2)

Okay: foo(\n    -x)
Okay: foo(x\n    [])
Okay: x = '''\n''' + ''
Okay: x = '' + '''\n'''
Okay: foo(x,\n    -y)
Okay: foo(x,  # comment\n    -y)

The following should be W504 but unary_context is tricky with these
Okay: var = (1 /\n       -2)
Okay: var = (1 +\n       -1 +\n       -2)

At least two spaces before inline comment
Open

html_theme = 'sphinx_rtd_theme' # 'alabaster'
Severity: Minor
Found in docs/conf.py by pep8

Separate inline comments by at least two spaces.

An inline comment is a comment on the same line as a statement.
Inline comments should be separated by at least two spaces from the
statement. They should start with a # and a single space.

Each line of a block comment starts with a # and a single space
(unless it is indented text inside the comment).

Okay: x = x + 1  # Increment x
Okay: x = x + 1    # Increment x
Okay: # Block comment
E261: x = x + 1 # Increment x
E262: x = x + 1  #Increment x
E262: x = x + 1  #  Increment x
E265: #Block comment
E266: ### Block comment

Line break after binary operator
Open

        if (self.method == 'complex' and self._derivative_mod_four_is_zero or
Severity: Minor
Found in src/numdifftools/finite_difference.py by pep8

Avoid breaks after binary operators.

The preferred place to break around a binary operator is before the
operator, not after it.

W504: (width == 0 +\n height == 0)
W504: (width == 0 and\n height == 0)
W504: var = (1 &\n       ~2)

Okay: foo(\n    -x)
Okay: foo(x\n    [])
Okay: x = '''\n''' + ''
Okay: x = '' + '''\n'''
Okay: foo(x,\n    -y)
Okay: foo(x,  # comment\n    -y)

The following should be W504 but unary_context is tricky with these
Okay: var = (1 /\n       -2)
Okay: var = (1 +\n       -1 +\n       -2)

Missing whitespace around arithmetic operator
Open

                n = 2*i
Severity: Minor
Found in src/numdifftools/extrapolation.py by pep8

Surround operators with a single space on either side.

- Always surround these binary operators with a single space on
  either side: assignment (=), augmented assignment (+=, -= etc.),
  comparisons (==, <, >, !=, <=, >=, in, not in, is, is not),
  Booleans (and, or, not).

- If operators with different priorities are used, consider adding
  whitespace around the operators with the lowest priorities.

Okay: i = i + 1
Okay: submitted += 1
Okay: x = x * 2 - 1
Okay: hypot2 = x * x + y * y
Okay: c = (a + b) * (a - b)
Okay: foo(bar, key='word', *args, **kwargs)
Okay: alpha[:-i]

E225: i=i+1
E225: submitted +=1
E225: x = x /2 - 1
E225: z = x **y
E225: z = 1and 1
E226: c = (a+b) * (a-b)
E226: hypot2 = x*x + y*y
E227: c = a|b
E228: msg = fmt%(errno, errmsg)

Missing whitespace around arithmetic operator
Open

            res = e_1 + 1.0/sss
Severity: Minor
Found in src/numdifftools/extrapolation.py by pep8

Surround operators with a single space on either side.

- Always surround these binary operators with a single space on
  either side: assignment (=), augmented assignment (+=, -= etc.),
  comparisons (==, <, >, !=, <=, >=, in, not in, is, is not),
  Booleans (and, or, not).

- If operators with different priorities are used, consider adding
  whitespace around the operators with the lowest priorities.

Okay: i = i + 1
Okay: submitted += 1
Okay: x = x * 2 - 1
Okay: hypot2 = x * x + y * y
Okay: c = (a + b) * (a - b)
Okay: foo(bar, key='word', *args, **kwargs)
Okay: alpha[:-i]

E225: i=i+1
E225: submitted +=1
E225: x = x /2 - 1
E225: z = x **y
E225: z = 1and 1
E226: c = (a+b) * (a-b)
E226: hypot2 = x*x + y*y
E227: c = a|b
E228: msg = fmt%(errno, errmsg)

Missing whitespace after ','
Open

                p25, median, p75 = np.nanpercentile(der, [25,50, 75], axis=0) 
Severity: Minor
Found in src/numdifftools/limits.py by pep8

Each comma, semicolon or colon should be followed by whitespace.

Okay: [a, b]
Okay: (3,)
Okay: a[1:4]
Okay: a[:4]
Okay: a[1:]
Okay: a[1:4:2]
E231: ['a','b']
E231: foo(bar,baz)
E231: [{'a':'b'}]

Block comment should start with '# '
Open

#module_dir = os.path.join(__location__, "../src", PACKAGE_NAME)
Severity: Minor
Found in docs/conf.py by pep8

Separate inline comments by at least two spaces.

An inline comment is a comment on the same line as a statement.
Inline comments should be separated by at least two spaces from the
statement. They should start with a # and a single space.

Each line of a block comment starts with a # and a single space
(unless it is indented text inside the comment).

Okay: x = x + 1  # Increment x
Okay: x = x + 1    # Increment x
Okay: # Block comment
E261: x = x + 1 # Increment x
E262: x = x + 1  #Increment x
E262: x = x + 1  #  Increment x
E265: #Block comment
E266: ### Block comment

Useless option value for '--disable', 'apply-builtin' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942.
Open

[MASTER]
Severity: Info
Found in .pylintrc by pylint

Used when a value for an option that is now deleted from pylint is encountered.

Missing function or method docstring
Open

def update_readme():
Severity: Info
Found in build_package.py by pylint

Used when a function or method has no docstring. Some special methods like init do not require a docstring.

Missing function or method docstring
Open

def update_license():
Severity: Info
Found in build_package.py by pylint

Used when a function or method has no docstring. Some special methods like init do not require a docstring.

Missing function or method docstring
Open

    def computational_graph(self, x, *args, **kwds):
Severity: Info
Found in src/numdifftools/nd_algopy.py by pylint

Used when a function or method has no docstring. Some special methods like init do not require a docstring.

Variable name cg doesn't conform to '[a-z_][a-z0-9_]{2,30}$' pattern ('[a-z_][a-z0-9_]{2,30}$' pattern)
Open

            cg = algopy.CGraph()
Severity: Info
Found in src/numdifftools/nd_algopy.py by pylint

Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).

Useless option value for '--disable', 'oct-method' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942.
Open

[MASTER]
Severity: Info
Found in .pylintrc by pylint

Used when a value for an option that is now deleted from pylint is encountered.

Useless option value for '--disable', 'import-star-module-level' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942.
Open

[MASTER]
Severity: Info
Found in .pylintrc by pylint

Used when a value for an option that is now deleted from pylint is encountered.

Useless option value for '--disable', 'dict-iter-method' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942.
Open

[MASTER]
Severity: Info
Found in .pylintrc by pylint

Used when a value for an option that is now deleted from pylint is encountered.

Useless option value for '--disable', 'using-cmp-argument' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942.
Open

[MASTER]
Severity: Info
Found in .pylintrc by pylint

Used when a value for an option that is now deleted from pylint is encountered.

Useless option value for '--disable', 'print-statement' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942.
Open

[MASTER]
Severity: Info
Found in .pylintrc by pylint

Used when a value for an option that is now deleted from pylint is encountered.

Useless option value for '--disable', 'indexing-exception' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942.
Open

[MASTER]
Severity: Info
Found in .pylintrc by pylint

Used when a value for an option that is now deleted from pylint is encountered.

Using open without explicitly specifying an encoding
Open

        with open(filename, "w") as fid:
Severity: Minor
Found in build_package.py by pylint

It is better to specify an encoding when opening documents. Using the system default implicitly can create problems on other operating systems. See https://peps.python.org/pep-0597/

Severity
Category
Status
Source
Language