Showing 42 of 42 total issues
Avoid deeply nested control flow statements. Open
if isinstance(value, h5py._hl.dataset.Dataset):
if isinstance(value[()], (str, bytes)):
if value[()] == b'NULL':
my_dict[key].append(None)
else:
Function from_pymatgen
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def from_pymatgen(cls,
Function from_universe
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def from_universe(cls,
Function from_ase
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def from_ase(cls,
Function from_Xdatcar
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def from_Xdatcar(cls,
Function _get_molecules
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _get_molecules(structure: "ase.atoms.Atoms" or "pymatgen.core.structure.Structure"
Function from_file
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def from_file(cls,
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
Function sample_until_normal
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def sample_until_normal(array: np.ndarray,
Function _from_file
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _from_file(cls, trajectory: Union[str, List[str]], parser_params: dict, dtype: str = None, **kwargs):
"""
Create a :py:class:`Analyzer` object from a single or a list of Xdatcar file(s).
:param trajectory: The file or list of Xdatcar files to be analysed.
- 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 get_indices
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def get_indices(structure: "ase.atoms.Atoms", specie: "str",
framework_indices: List[int]) -> Tuple[np.ndarray, np.ndarray]:
"""
Determine framework and non-framework indices for a :py:mod:`ase` compatible 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 bootstrap_GLS
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def bootstrap_GLS(self,
start_dt: float,
cond_max: float = 1e16,
model: bool = False,
fit_intercept: bool = True,
- 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 get_indices
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def get_indices(structure: "MDAnalysis.universe.Universe", specie: str,
framework_indices: List[int]) -> Tuple[np.ndarray, np.ndarray]:
"""
Determine framework and non-framework indices for an :py:mod:`MDAnalysis` compatible 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 get_indices
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def get_indices(structure: "pymatgen.core.structure.Structure",
specie: Union["pymatgen.core.periodic_table.Element", "pymatgen.core.periodic_table.Specie",
"pymatgen.core.periodic_table.Species", List["pymatgen.core.periodic_table.Element"],
List["pymatgen.core.periodic_table.Specie"],
List["pymatgen.core.periodic_table.Species"]],
- 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 _from_Xdatcar
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _from_Xdatcar(cls,
trajectory: Union['pymatgen.io.vasp.outputs.Xdatcar', List['pymatgen.io.vasp.outputs.Xdatcar']],
parser_params: dict,
dtype: str = None,
**kwargs):
- 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 to_dict
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def to_dict(self) -> dict:
"""
:return: Dictionary description of the :py:class:`Bootstrap`.
"""
my_dict = {
- 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 _from_pymatgen
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _from_pymatgen(cls,
trajectory: List[Union['pymatgen.core.structure.Structure',
List['pymatgen.core.structure.Structure']]],
parser_params: dict,
dtype: str = None,
- 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 6 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self,
atoms: List["ase.atoms.Atoms"],
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"
Further reading
Function _from_universe
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _from_universe(cls,
trajectory: 'MDAnalysis.core.universe.Universe',
parser_params: dict,
dtype: str = None,
**kwargs):
- 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 6 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self,
structures: List["pymatgen.core.structure.Structure"],
specie: Union["pymatgen.core.periodic_table.Element", "pymatgen.core.periodic_table.Specie"],
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"