pbrod/numdifftools

View on GitHub

Showing 591 of 591 total issues

third party import import matplotlib.pyplot as plt should be placed before from numdifftools.example_functions import get_function, function_names
Open

import matplotlib.pyplot as plt

Used when PEP8 import order is not respected (standard imports first, then third-party libraries, then local imports).

Line too long (101/100)
Open

    .. |tests_img| image:: https://github.com/pbrod/numdifftools/actions/workflows/test.yml/badge.svg
Severity: Info
Found in src/numdifftools/info.py by pylint

Used when a line is longer than a given number of characters.

Missing function or method docstring
Open

    def initialize_options(self):
Severity: Info
Found in setup.py by pylint

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

Consider using Python 3 style super() without arguments
Open

        super(Residue, self).__init__(f, step=step, method=method, order=order,
Severity: Info
Found in src/numdifftools/limits.py by pylint

Emitted when calling the super() builtin with the current class and instance. On Python 3 these arguments are the default and they can be omitted.

Unable to import 'scipy.optimize._numdiff'
Open

from scipy.optimize._numdiff import approx_derivative
Severity: Critical
Found in src/numdifftools/nd_scipy.py by pylint

Used when pylint has been unable to import a module.

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

    tt = dfun(x)

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

Missing function or method docstring
Open

def benchmark(x=0.0001, dfun=None, fd=None, name='', scales=None, show_plot=True):

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

Missing module docstring
Open

from __future__ import absolute_import, division, print_function
Severity: Info
Found in src/numdifftools/nd_scipy.py by pylint

Used when a module has no docstring. Empty modules do not require a docstring.

Missing class docstring
Open

class Doctest(Command):
Severity: Info
Found in setup.py by pylint

Used when a class has no docstring. Even an empty class must have a docstring.

TODO found
Open

    # TODO: see if this can be vectorized, but usually dim is small
Severity: Minor
Found in src/numdifftools/nd_statsmodels.py by fixme

FIXME found
Open

notes=FIXME,XXX,TODO
Severity: Minor
Found in .pylintrc by fixme

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

def _compute_relative_errors(x, dfun, fd, scales):

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

Formatting a regular string which could be a f-string
Open

               "7th"] + ["%d'th" % i for i in range(8, 25)]

Used when we detect a string that is being formatted with format() or % which could potentially be a f-string. The use of f-strings is preferred. Requires Python 3.6 and py-version >= 3.6.

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

            fd = Derivative(fun0, step=epsilon, method=method, n=n, order=order)

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

Unable to import 'numpy'
Open

import numpy as np
Severity: Critical
Found in src/numdifftools/_find_default_scale.py by pylint

Used when pylint has been unable to import a module.

Missing function or method docstring
Open

    def finalize_options(self):
Severity: Info
Found in setup.py by pylint

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

Consider using '{n: n, order: order, method: method, fun: name, error: np.nan, ... }' instead of a call to 'dict'.
Open

        return dict(n=n, order=order, method=method, fun=name,

Emitted when using dict() to create a dictionary instead of a literal '{ ... }'. The literal is faster as it avoids an additional function call.

Unable to import 'matplotlib.pyplot'
Open

import matplotlib.pyplot as plt
Severity: Critical
Found in src/numdifftools/_find_default_scale.py by pylint

Used when pylint has been unable to import a module.

Consider using '{n: n, order: order, method: method, fun: name, error: error, ... }' instead of a call to 'dict'.
Open

    return dict(n=n, order=order, method=method, fun=name,

Emitted when using dict() to create a dictionary instead of a literal '{ ... }'. The literal is faster as it avoids an additional function call.

Formatting a regular string which could be a f-string
Open

        title = "The %s derivative using %s, order=%d" % (txt[n], method, order)

Used when we detect a string that is being formatted with format() or % which could potentially be a f-string. The use of f-strings is preferred. Requires Python 3.6 and py-version >= 3.6.

Severity
Category
Status
Source
Language