gwpy/timeseries/io/gwf/__init__.py
Function register_gwf_api
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
Open
def register_gwf_api(library):
"""Register a full set of GWF I/O methods for the given library
The given frame library must define the following methods
- 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 read_timeseriesdict
has 9 arguments (exceeds 8 allowed). Consider refactoring. Open
Open
def read_timeseriesdict(source, channels, start=None, end=None,
- Create a ticketCreate a ticket
Function channel_dict_kwarg
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
def channel_dict_kwarg(value, channels, types=None, astype=None):
"""Format the given kwarg value in a dict with one value per channel
Parameters
----------
- 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"