pbrod/numdifftools

View on GitHub

Showing 591 of 591 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    (1, 9): (np.array([3., -32, 168, -672, 0, 672, -168, 32, -3]) / 840.0,
             np.arange(-4, 5)),
Severity: Minor
Found in src/numdifftools/fornberg.py and 1 other location - About 30 mins to fix
src/numdifftools/fornberg.py on lines 23..25

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 32.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 10 locations. Consider refactoring.
Open

    __doc__ = _CMN_DOC % dict(
Severity: Major
Found in src/numdifftools/core.py and 9 other locations - About 30 mins to fix
src/numdifftools/core.py on lines 116..116
src/numdifftools/core.py on lines 436..436
src/numdifftools/core.py on lines 498..498
src/numdifftools/core.py on lines 543..543
src/numdifftools/nd_algopy.py on lines 169..169
src/numdifftools/nd_algopy.py on lines 233..233
src/numdifftools/nd_algopy.py on lines 294..294
src/numdifftools/nd_algopy.py on lines 376..376
src/numdifftools/nd_algopy.py on lines 441..441

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 32.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

    vec = np.reshape(vec / np.linalg.norm(vec.ravel()), x0.shape)
Severity: Minor
Found in src/numdifftools/nd_algopy.py and 1 other location - About 30 mins to fix
src/numdifftools/core.py on lines 340..340

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 32.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

    vec = np.reshape(vec / np.linalg.norm(vec.ravel()), x0.shape)
Severity: Minor
Found in src/numdifftools/core.py and 1 other location - About 30 mins to fix
src/numdifftools/nd_algopy.py on lines 547..547

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 32.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 10 locations. Consider refactoring.
Open

    __doc__ = _cmn_doc % dict(
Severity: Major
Found in src/numdifftools/nd_algopy.py and 9 other locations - About 30 mins to fix
src/numdifftools/core.py on lines 116..116
src/numdifftools/core.py on lines 346..346
src/numdifftools/core.py on lines 436..436
src/numdifftools/core.py on lines 498..498
src/numdifftools/core.py on lines 543..543
src/numdifftools/nd_algopy.py on lines 169..169
src/numdifftools/nd_algopy.py on lines 233..233
src/numdifftools/nd_algopy.py on lines 376..376
src/numdifftools/nd_algopy.py on lines 441..441

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 32.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 10 locations. Consider refactoring.
Open

    __doc__ = _CMN_DOC % dict(
Severity: Major
Found in src/numdifftools/core.py and 9 other locations - About 30 mins to fix
src/numdifftools/core.py on lines 346..346
src/numdifftools/core.py on lines 436..436
src/numdifftools/core.py on lines 498..498
src/numdifftools/core.py on lines 543..543
src/numdifftools/nd_algopy.py on lines 169..169
src/numdifftools/nd_algopy.py on lines 233..233
src/numdifftools/nd_algopy.py on lines 294..294
src/numdifftools/nd_algopy.py on lines 376..376
src/numdifftools/nd_algopy.py on lines 441..441

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 32.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 10 locations. Consider refactoring.
Open

    __doc__ = _cmn_doc % dict(
Severity: Major
Found in src/numdifftools/nd_algopy.py and 9 other locations - About 30 mins to fix
src/numdifftools/core.py on lines 116..116
src/numdifftools/core.py on lines 346..346
src/numdifftools/core.py on lines 436..436
src/numdifftools/core.py on lines 498..498
src/numdifftools/core.py on lines 543..543
src/numdifftools/nd_algopy.py on lines 169..169
src/numdifftools/nd_algopy.py on lines 233..233
src/numdifftools/nd_algopy.py on lines 294..294
src/numdifftools/nd_algopy.py on lines 376..376

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 32.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 10 locations. Consider refactoring.
Open

    __doc__ = _cmn_doc % dict(
Severity: Major
Found in src/numdifftools/nd_algopy.py and 9 other locations - About 30 mins to fix
src/numdifftools/core.py on lines 116..116
src/numdifftools/core.py on lines 346..346
src/numdifftools/core.py on lines 436..436
src/numdifftools/core.py on lines 498..498
src/numdifftools/core.py on lines 543..543
src/numdifftools/nd_algopy.py on lines 169..169
src/numdifftools/nd_algopy.py on lines 294..294
src/numdifftools/nd_algopy.py on lines 376..376
src/numdifftools/nd_algopy.py on lines 441..441

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 32.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 10 locations. Consider refactoring.
Open

    __doc__ = _cmn_doc % dict(
Severity: Major
Found in src/numdifftools/nd_algopy.py and 9 other locations - About 30 mins to fix
src/numdifftools/core.py on lines 116..116
src/numdifftools/core.py on lines 346..346
src/numdifftools/core.py on lines 436..436
src/numdifftools/core.py on lines 498..498
src/numdifftools/core.py on lines 543..543
src/numdifftools/nd_algopy.py on lines 233..233
src/numdifftools/nd_algopy.py on lines 294..294
src/numdifftools/nd_algopy.py on lines 376..376
src/numdifftools/nd_algopy.py on lines 441..441

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 32.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 10 locations. Consider refactoring.
Open

    __doc__ = _cmn_doc % dict(
Severity: Major
Found in src/numdifftools/nd_algopy.py and 9 other locations - About 30 mins to fix
src/numdifftools/core.py on lines 116..116
src/numdifftools/core.py on lines 346..346
src/numdifftools/core.py on lines 436..436
src/numdifftools/core.py on lines 498..498
src/numdifftools/core.py on lines 543..543
src/numdifftools/nd_algopy.py on lines 169..169
src/numdifftools/nd_algopy.py on lines 233..233
src/numdifftools/nd_algopy.py on lines 294..294
src/numdifftools/nd_algopy.py on lines 441..441

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 32.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 10 locations. Consider refactoring.
Open

    __doc__ = _CMN_DOC % dict(
Severity: Major
Found in src/numdifftools/core.py and 9 other locations - About 30 mins to fix
src/numdifftools/core.py on lines 116..116
src/numdifftools/core.py on lines 346..346
src/numdifftools/core.py on lines 498..498
src/numdifftools/core.py on lines 543..543
src/numdifftools/nd_algopy.py on lines 169..169
src/numdifftools/nd_algopy.py on lines 233..233
src/numdifftools/nd_algopy.py on lines 294..294
src/numdifftools/nd_algopy.py on lines 376..376
src/numdifftools/nd_algopy.py on lines 441..441

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 32.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 10 locations. Consider refactoring.
Open

    __doc__ = _CMN_DOC % dict(
Severity: Major
Found in src/numdifftools/core.py and 9 other locations - About 30 mins to fix
src/numdifftools/core.py on lines 116..116
src/numdifftools/core.py on lines 346..346
src/numdifftools/core.py on lines 436..436
src/numdifftools/core.py on lines 498..498
src/numdifftools/nd_algopy.py on lines 169..169
src/numdifftools/nd_algopy.py on lines 233..233
src/numdifftools/nd_algopy.py on lines 294..294
src/numdifftools/nd_algopy.py on lines 376..376
src/numdifftools/nd_algopy.py on lines 441..441

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 32.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    (2, 9): (np.array([-9., 128, -1008, 8064, -14350,
                       8064, -1008, 128, -9]) / 5040.0,
             np.arange(-4, 5))}
Severity: Minor
Found in src/numdifftools/fornberg.py and 1 other location - About 30 mins to fix
src/numdifftools/fornberg.py on lines 17..18

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 32.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Function do_profile has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def do_profile(follow=(), follow_all_methods=False):
        """
        Decorator to profile a function or class method

        It uses line_profiler to give detailed reports on time spent on each
Severity: Minor
Found in src/numdifftools/profiletools.py - About 25 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function build_main has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def build_main(version):
        """Build and update {} version, documentation and package.

        The script remove the previous built binaries and generated documentation
        before it generate the documentation and build the binaries
Severity: Minor
Found in build_package.py - About 25 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Missing whitespace around arithmetic operator
Open

        return np.array([(f(x + j_1*ih) + f(x - j_1*ih)).imag for ih in steps])
Severity: Minor
Found in src/numdifftools/finite_difference.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

                self.method in ['forward', 'backward'] 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 operator
Open

    approx_hess1=approx_hess2=approx_hess3=approx_hess_cs=_get_epsilon=None
Severity: Minor
Found in src/numdifftools/nd_statsmodels.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)

Continuation line missing indentation or outdented
Open

#    'fncychap': '\\usepackage{fncychap}',
Severity: Minor
Found in docs/conf.py by pep8

Continuation lines indentation.

Continuation lines should align wrapped elements either vertically
using Python's implicit line joining inside parentheses, brackets
and braces, or using a hanging indent.

When using a hanging indent these considerations should be applied:
- there should be no arguments on the first line, and
- further indentation should be used to clearly distinguish itself
  as a continuation line.

Okay: a = (\n)
E123: a = (\n    )

Okay: a = (\n    42)
E121: a = (\n   42)
E122: a = (\n42)
E123: a = (\n    42\n    )
E124: a = (24,\n     42\n)
E125: if (\n    b):\n    pass
E126: a = (\n        42)
E127: a = (24,\n      42)
E128: a = (24,\n    42)
E129: if (a or\n    b):\n    pass
E131: a = (\n    42\n 24)

Line break after binary operator
Open

                self._complex_high_order and
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)
Severity
Category
Status
Source
Language