Showing 269 of 913 total issues
Function _set_skip_frames_and_nav_shape
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _set_skip_frames_and_nav_shape(self):
nav_shape = _get_nav_shape(self._path)
if nav_shape is not None:
# the sync flag appears to be set one frame too late, so
# we compensate here by setting a negative _skip_frames value.
- 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_buffers
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _get_buffers(
self, filter_allocated: bool = False
) -> Generator[tuple[str, AuxBufferWrapper], None, None]:
for k, buf in self._data.items():
if isinstance(buf, AuxBufferWrapper):
- 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_subslices_chunked_tiled
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _get_subslices_chunked_tiled(self, tiling_scheme, scheme_lookup, nav_dims, tileshape_nd):
"""
general tiled reading w/ chunking outer loop is a chunk in
signal dimensions, inner loop is over "rows in nav"
"""
- 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 webSocketSaga
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export function* webSocketSaga() {
while (true) {
const socketChannel = (yield call(createWebSocketChannel)) as SocketChannel;
yield fork(actionsFromChannel, socketChannel);
const action = (yield take([channelActions.ActionTypes.OPEN, channelActions.ActionTypes.CLOSE])) as channelActions.Actions;
- 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 _find_file_for_frame_idx
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _find_file_for_frame_idx(fileset_arr, frame_idx):
"""
Find the file in `fileset_arr` that contains
`frame_idx` and return its index using binary search.
- 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 process_frame_shifted
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def process_frame_shifted(self, frame, shifts: tuple[int, ...]):
sig_shape = self.meta.dataset_shape.sig
masks = self._get_masks()
num_masks = len(self.masks)
shifted_slice = self.meta.sig_slice.shift_by(shifts)
- 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 useDefaultFrameView
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const useDefaultFrameView = ({
scanWidth, scanHeight, compoundAnalysisId, doAutoStart,
}: {
scanWidth: number, scanHeight: number, compoundAnalysisId: string,
doAutoStart: boolean,
- 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 build_extension_map
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def build_extension_map() -> dict[str, list[str]]:
ext_map = {}
for typ_ in filetypes:
cls = get_dataset_cls(typ_)
for ext in cls.get_supported_extensions():
- 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_tiles
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def get_tiles(self, tiling_scheme, dest_dtype="float32", roi=None,
array_backend: Optional[ArrayBackend] = None):
if array_backend is None:
array_backend = self.meta.array_backends[0]
assert array_backend in (NUMPY, CUDA)
- 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"