choderalab/yank

View on GitHub
Yank/commands/analyze.py

Summary

Maintainability
A
2 hrs
Test Coverage

Function dispatch has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
Wontfix

def dispatch(args):

    import os
    import pickle
    from .. import utils, analyze
Severity: Minor
Found in Yank/commands/analyze.py - About 2 hrs 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 dispatch_extract_trajectory has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

def dispatch_extract_trajectory(args):

    import os
    from .. import analyze

Severity: Minor
Found in Yank/commands/analyze.py - About 1 hr 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 dispatch_report has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

def dispatch_report(args):

    import io
    import os
    import re
Severity: Minor
Found in Yank/commands/analyze.py - About 55 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 extract_analyzer_kwargs has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

def extract_analyzer_kwargs(args, quantities_as_strings=False):

    import simtk.unit as unit

    """Return a dictionary with the keyword arguments to pass to the analyzer."""
Severity: Minor
Found in Yank/commands/analyze.py - About 35 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

There are no issues that match your filters.

Category
Status