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
- Read upRead up
- Exclude checks
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
- Read upRead up
- Exclude checks
Used when a line is longer than a given number of characters.
Missing function or method docstring Open
def initialize_options(self):
- Read upRead up
- Exclude checks
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,
- Read upRead up
- Exclude checks
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
- Read upRead up
- Exclude checks
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)
- Read upRead up
- Exclude checks
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):
- Read upRead up
- Exclude checks
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
- Read upRead up
- Exclude checks
Used when a module has no docstring. Empty modules do not require a docstring.
Missing class docstring Open
class Doctest(Command):
- Read upRead up
- Exclude checks
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
- Exclude checks
FIXME found Open
notes=FIXME,XXX,TODO
- Exclude checks
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):
- Read upRead up
- Exclude checks
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)]
- Read upRead up
- Exclude checks
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)
- Read upRead up
- Exclude checks
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
- Read upRead up
- Exclude checks
Used when pylint has been unable to import a module.
Missing function or method docstring Open
def finalize_options(self):
- Read upRead up
- Exclude checks
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,
- Read upRead up
- Exclude checks
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
- Read upRead up
- Exclude checks
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,
- Read upRead up
- Exclude checks
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)
- Read upRead up
- Exclude checks
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
.