Showing 218 of 305 total issues
Function find_mappable
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def find_mappable(*axes):
"""Find the most recently added mappable layer in the given axes
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"
Further reading
Function average_spectrogram
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def average_spectrogram(timeseries, method_func, stride, *args, **kwargs):
"""Generate an average spectrogram using a method function
Each time bin of the resulting spectrogram is a PSD generated using
the method_func
- 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 _make_inset_axes
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _make_inset_axes(
ax,
location='right',
width=0.012,
length=1.,
- 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 _auto_unit
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _auto_unit(self, axis):
vmin, vmax = self._lim(axis)
duration = vmax - vmin
for scale in TIME_UNITS[::-1]:
base = scale.decompose().scale
- 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 _plot
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _plot(self, method, *args, **kwargs):
from matplotlib import rcParams
from ..plot import Plot
from ..plot.tex import label_to_latex
- 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 fetch_catalog
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def fetch_catalog(catalog, host=DEFAULT_GWOSC_URL):
catalog = fetch_catalog_json(catalog, host=host)
data = catalog["events"]
# get the list of all 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"
Further reading
Function convert_zpk_units
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def convert_zpk_units(filt, unit):
"""Convert zeros and poles created for a freq response in Hz to rad/s.
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"
Further reading
Function _read_last_line
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _read_last_line(path, bufsize=2, encoding="utf-8"):
"""Read the last line of a file.
"""
with open(path, "rb") as fobj:
# go to end of 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 parse_nds_env
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def parse_nds_env(env='NDSSERVER'):
"""Parse the NDSSERVER environment variable into a list of hosts
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"
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 _format_metadata_attribute
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _format_metadata_attribute(value):
"""Format a value for writing to HDF5 as a `h5py.Dataset` attribute
"""
if value is None or (isinstance(value, Index) and value.regular):
raise IgnoredAttribute
- 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 _parse_name
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _parse_name(self, name):
"""Internal method to parse a `string` name into constituent
`ifo, `name` and `version` components.
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"
Further reading
Function dy
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def dy(self):
"""Y-axis sample separation
:type: `~astropy.units.Quantity` scalar
"""
- 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 dx
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def dx(self):
"""X-axis sample separation
:type: `~astropy.units.Quantity` scalar
"""
- 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
Function parse_nds2_enums
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def parse_nds2_enums(func):
"""Decorate a function to translate a type string into an integer
"""
@wraps(func)
def wrapped_func(*args, **kwargs): # pylint: disable=missing-docstring
- 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 from_spectra
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def from_spectra(cls, *spectra, **kwargs):
"""Build a new `Spectrogram` from a list of spectra.
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"
Further reading
Function is_ligolw
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def is_ligolw(origin, filepath, fileobj, *args, **kwargs):
"""Identify a file object as LIGO_LW-format XML
"""
# pylint: disable=unused-argument
if fileobj is not None:
- 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"