Function read_hdf5_dict
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def read_hdf5_dict(h5f, names=None, path=None, on_missing='error', **kwargs):
"""Read a `DataQualityDict` from an HDF5 file
"""
if path:
h5f = h5f[path]
- Read upRead up
- Create a ticketCreate a ticket
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 write_hdf5_dict
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def write_hdf5_dict(flags, output, path=None, append=False, overwrite=False,
**kwargs):
"""Write this `DataQualityFlag` to a `h5py.Group`.
This allows writing to an HDF5-format file.
- Read upRead up
- Create a ticketCreate a ticket
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 find_flag_groups
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def find_flag_groups(h5group, strict=True):
"""Returns all HDF5 Groups under the given group that contain a flag
The check is just that the sub-group has a ``'name'`` attribute, so its
not fool-proof by any means.
- Read upRead up
- Create a ticketCreate a ticket
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 write_hdf5_flag_group
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def write_hdf5_flag_group(flag, h5group, **kwargs):
"""Write a `DataQualityFlag` into the given HDF5 group
"""
# write segmentlists
flag.active.write(h5group, 'active', **kwargs)
- Read upRead up
- Create a ticketCreate a ticket
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
FIXME found Open
# allow alternative keyword argument name (FIXME)
- Create a ticketCreate a ticket
- Exclude checks