Showing 269 of 913 total issues
Function get_scheme
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
def get_scheme(
self,
udfs: Sequence[UDFProtocol],
dataset,
read_dtype: "nt.DTypeLike",
Function mitigations
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def mitigations():
'''
Enable known work-arounds to run in a threaded executor.
* Disable pyFFTW interface cache:
- 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 _shape_for_kind
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def _shape_for_kind(self, kind, orig_shape, roi_count=None):
"""
:meta private:
"""
if self._kind == "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 run
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def run(
host, port, browser, local_directory, numeric_level,
token, preload, strict_port, executor_spec, open_ds,
snooze_timeout: Optional[float] = 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 xml_generate_map_size
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def xml_generate_map_size(exc_rows, exc_cols, exc_pix, size, metadata):
"""
This function will be responsible for generating new size based on the parameters.
returns an np array with the excluded pixels as 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 rebuild_nested
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def rebuild_nested(flat: list[Any],
flat_mapping: list[list[tuple[type, Any]]],
merge_functions=None):
"""
Using the flattened version of a structure built by flatten_nested
- 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 encode_r1
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def encode_r1(inp, out):
for y in range(out.shape[0]):
row_out = out[y]
row_in = inp[y]
for stripe in range(row_out.shape[0] // 8):
- 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_dask_integration_executor
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def get_dask_integration_executor():
'''
Query the current Dask scheduler and return a :class:`~libertem.common.executor.JobExecutor`
that is compatible with it. See https://docs.dask.org/en/stable/scheduling.html
for the meaning of the different scheduler types.
- 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 10 (exceeds 5 allowed). Consider refactoring. Open
def __init__(
self,
path: str,
scan_size: Optional[tuple[int, ...]] = None,
nav_shape: Optional[tuple[int, ...]] = 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 flatten_nested
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def flatten_nested(el: Any,
unpackable_types: dict[type, Callable[[Iterable],
Iterable[tuple[Any, Any]]]] = None,
ignore_types: Optional[tuple[type, ...]] = None) -> list[Any]:
"""
- 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 _k2is_read_ranges_tile_block
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def _k2is_read_ranges_tile_block(
slices_arr, fileset_arr, slice_sig_sizes, sig_origins,
inner_indices_start, inner_indices_stop, frame_indices, sig_size,
px_to_bytes, bpp, frame_header_bytes, frame_footer_bytes, file_idxs,
slice_offset, extra, sig_shape,
- 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 createOrUpdate
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export function* createOrUpdate(
compoundAnalysis: CompoundAnalysisState, analysisId: string | undefined,
analysisIndex: number, details: AnalysisDetails
): Generator<unknown, string, any> {
if (analysisId) {
- 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 run_for_partition
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def run_for_partition(
self,
partition: Partition,
params: UDFParams,
env: Environment,
- 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 run_for_dataset_sync
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def run_for_dataset_sync(
self,
dataset: DataSet,
executor: JobExecutor,
roi: Optional[np.ndarray] = 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 createCompoundAnalysisSaga
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function* createCompoundAnalysisSaga(action: ReturnType<typeof compoundAnalysisActions.Actions.create>) {
try {
const datasetState = (yield select(selectDataset, action.payload.dataset)) as DatasetState;
if (datasetState.status !== DatasetStatus.OPEN) {
throw new Error("invalid dataset status");
Function __init__
has 12 arguments (exceeds 8 allowed). Consider refactoring. Open
def __init__(
Function main
has 12 arguments (exceeds 8 allowed). Consider refactoring. Open
def main(port, local_directory, browser, cpus, gpus, open_ds, log_level,
Function _get_read_ranges_inner
has 12 arguments (exceeds 8 allowed). Consider refactoring. Open
def _get_read_ranges_inner(
Function __init__
has 12 arguments (exceeds 8 allowed). Consider refactoring. Open
def __init__(self, path, dtype, scan_size=None, detector_size=None, enable_direct=False,
Function __init__
has 12 arguments (exceeds 8 allowed). Consider refactoring. Open
def __init__(