pbrod/numdifftools

View on GitHub
src/numdifftools/testing.py

Summary

Maintainability
A
0 mins
Test Coverage

Unable to import 'numpy'
Open

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

Used when pylint has been unable to import a module.

Line break after binary operator
Open

    doctest.testmod(optionflags=doctest.NORMALIZE_WHITESPACE |
Severity: Minor
Found in src/numdifftools/testing.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)

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

    print('Testing docstrings in {}'.format(name))
Severity: Info
Found in src/numdifftools/testing.py by pylint

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.

Import outside toplevel (doctest)
Open

    import doctest
Severity: Info
Found in src/numdifftools/testing.py by pylint

Used when an import statement is used anywhere other than the module toplevel. Move this import to the top of the file.

Missing function or method docstring
Open

def test_docstrings(name=''):
Severity: Info
Found in src/numdifftools/testing.py by pylint

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

There are no issues that match your filters.

Category
Status