Showing 269 of 913 total issues
File base.py
has 2244 lines of code (exceeds 400 allowed). Consider refactoring. Open
from collections import defaultdict, OrderedDict
from contextlib import contextmanager
import typing
from typing import (
Any, Optional,
File api.py
has 1483 lines of code (exceeds 400 allowed). Consider refactoring. Open
from typing import (
TYPE_CHECKING, Any, Optional, Union, overload
)
from collections.abc import Iterable, Generator, Coroutine
from typing_extensions import Literal
File mib.py
has 1009 lines of code (exceeds 400 allowed). Consider refactoring. Open
import re
import os
import platform
from glob import glob, escape
import logging
File pipelined.py
has 1005 lines of code (exceeds 400 allowed). Consider refactoring. Open
import itertools
import os
import sys
import logging
import functools
File k2is.py
has 849 lines of code (exceeds 400 allowed). Consider refactoring. Open
import os
import re
import glob
import math
import typing
File buffers.py
has 825 lines of code (exceeds 400 allowed). Consider refactoring. Open
from typing import Any, Optional, Union, TYPE_CHECKING, Generic, TypeVar
from collections.abc import Iterable
from typing_extensions import Literal
import mmap
import math
Function _execution_plan
has a Cognitive Complexity of 64 (exceeds 5 allowed). Consider refactoring. Open
def _execution_plan(
udfs, ds: Union[DataSet, DataSetMeta], device_class: Optional[DeviceClass] = None,
available_backends: Iterable[ArrayBackend] = BACKENDS
) -> tuple[ArrayBackend, ExecutionPlan]:
'''
- 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
File hdf5.py
has 729 lines of code (exceeds 400 allowed). Consider refactoring. Open
import os
import contextlib
import typing
from typing import Optional
import warnings
Function DatasetOpen
has a Cognitive Complexity of 59 (exceeds 5 allowed). Consider refactoring. Open
const DatasetOpen = () => {
const dispatch = useDispatch();
const openState = useSelector((state: RootReducer) => state.openDataset);
const [didReset, setReset] = React.useState(false);
- 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
File dask.py
has 693 lines of code (exceeds 400 allowed). Consider refactoring. Open
import os
import contextlib
from copy import deepcopy
import functools
import logging
File messages.ts
has 609 lines of code (exceeds 400 allowed). Consider refactoring. Open
import { JobList } from "./analysis/types"
/*
* Common
*/
Function _correct_numba_inplace
has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring. Open
def _correct_numba_inplace(buffer, dark_image, gain_map, exclude_pixels, repair_environments,
repair_counts):
'''
Numerical work horse to perform detector corrections
- 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
File frms6.py
has 596 lines of code (exceeds 400 allowed). Consider refactoring. Open
import os
import re
import csv
from glob import glob, escape
import typing
File com.py
has 595 lines of code (exceeds 400 allowed). Consider refactoring. Open
from enum import IntEnum
from typing import NamedTuple, Optional, Union
from typing_extensions import Literal
import numpy as np
File executor.py
has 567 lines of code (exceeds 400 allowed). Consider refactoring. Open
import queue
from typing import (
Callable, Optional, Any, TYPE_CHECKING,
TypeVar,
)
File seq.py
has 565 lines of code (exceeds 400 allowed). Consider refactoring. Open
# Based on the SEQ reader of the PIMS project, with the following license:
#
# Copyright (c) 2013-2014 PIMS contributors
# https://github.com/soft-matter/pims
# All rights reserved
Function radial_bins
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
def radial_bins(centerX, centerY, imageSizeX, imageSizeY,
radius=None, radius_inner=0, n_bins=None, normalize=False, use_sparse=None, dtype=None):
'''
Generate antialiased rings
'''
- 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
File raw_csr.py
has 511 lines of code (exceeds 400 allowed). Consider refactoring. Open
import typing
import os
import scipy.sparse
import numpy as np
Function _read_metadata
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
def _read_metadata(cls, path, use_ds=None):
with ncempy.io.dm.fileDM(path, on_memory=True) as fp:
tags = fp.allTags
array_map = {}
start_from = 1 if fp.thumbnail else 0
- 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
File state.py
has 492 lines of code (exceeds 400 allowed). Consider refactoring. Open
import os
import copy
import typing
import itertools
import logging