Showing 105 of 105 total issues
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function get_params
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
def get_params(
tensor: torch.Tensor,
patch_size: np.ndarray,
num_iterations: int,
) -> List[Tuple[TypeTripletInt, TypeTripletInt]]:
- 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 download_and_extract_archive
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def download_and_extract_archive(
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function _set_resampler_reference
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _set_resampler_reference(
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function add_artifact
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def add_artifact(
Function _parse_range
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _parse_range(
Function get_mask_from_masking_method
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def get_mask_from_masking_method(
Function _normalize
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _normalize(
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function add_artifact
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def add_artifact(
Function extract_patch
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def extract_patch( # type: ignore[override]
Function _write_sitk
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _write_sitk(
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function parse_params
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def parse_params(self, params, around, name, make_ranges=True, **kwargs):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(