Showing 42 of 42 total issues
File diffusion.py
has 787 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""
The modules is focused on tools for the evaluation of the mean squared displacement and resulting
diffusion coefficient from a material.
"""
File parser.py
has 640 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""
Parser functions, including implementation for :py:mod:`pymatgen` compatible VASP files and :py:mod:`MDAnalysis`
compatible trajectories.
This parser borrows heavily from the :py:class:`pymatgen.analysis.diffusion_analyzer.DiffusionAnalyzer` class,
Function _group_to_dict
has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring. Open
def _group_to_dict(h5file: 'h5py._hl.files.File', path: str) -> dict:
"""
A recursive function to load data from hdf5 files.
:param h5file: Open hdf5 file.
- 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
File analyzer.py
has 371 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""
This module contains the base class for the different :py:class:`Analyzer` objects used by :py:mod:`kinisi`.
"""
# Copyright (c) Andrew R. McCluskey and Benjamin J. Morgan
Bootstrap
has 24 functions (exceeds 20 allowed). Consider refactoring. Open
class Bootstrap:
"""
The top-level class for bootstrapping.
:param delta_t: An array of the timestep values.
Function _dict_to_group
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
def _dict_to_group(h5file: 'h5py._hl.files.File', path: str, my_dict: dict):
"""
A recursive function to help with saving to hdf5 file formats.
:param h5file: Open hdf5 file.
- 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 __init__
has 17 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
Function __init__
has 16 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
Function __init__
has 16 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
Function __init__
has 13 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
Function __init__
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self,
delta_t: np.ndarray,
disp_3d: List[np.ndarray],
ionic_charge: Union[np.ndarray, int],
n_o: np.ndarray,
- 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 __init__
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
Function __init__
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
Function __init__
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
Function __init__
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self,
delta_t: np.ndarray,
disp_3d: List[np.ndarray],
n_o: np.ndarray,
sub_sample_dt: int = 1,
- 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 __init__
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self,
delta_t: np.ndarray,
disp_3d: List[np.ndarray],
n_o: np.ndarray,
sub_sample_dt: int = 1,
- 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 bootstrap_GLS
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
def bootstrap_GLS(self,
Function __init__
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
def __init__(self,
delta_t: np.ndarray,
disp_3d: List[np.ndarray],
n_o: np.ndarray,
sub_sample_dt: int = 1,
Function from_dict
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def from_dict(cls, my_dict: dict) -> 'Bootstrap':
"""
Generate a :py:class:`Bootstrap` object from a dictionary.
:param my_dict: The input dictionary.
Function __init__
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self,
universe: "MDAnalysis.core.universe.Universe",
specie: str,
time_step: float,
step_skip: int,
- 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"