File radial_distribution_function.py
has 713 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""
MDSuite: A Zincwarecode package.
License
-------
Function __call__
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
def __call__(
Function check_input
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def check_input(self):
"""
Check the input of the call method and store defaults if needed.
Returns
- Read upRead up
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 bin_minibatch
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def bin_minibatch(
Function run_minibatch_loop
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def run_minibatch_loop(self, atoms, stop, n_atoms, minibatch_start, positions_tensor):
Function ideal_correction
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def ideal_correction(self) -> float:
"""Get the correct ideal gas term.
In the case of a cutoff value greater than half of the box size, the ideal gas
term of the experiment must be corrected due to the lack of spherical symmetry
- Read upRead up
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 _calculate_prefactor
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _calculate_prefactor(self, species: Union[str, tuple] = None):
"""
Calculate the relevant prefactor for the analysis.
Parameters
- Read upRead up
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"