LiberTEM/LiberTEM

View on GitHub

Showing 902 of 903 total issues

Take the required action to fix the issue indicated by this "FIXME" comment.
Open

        # FIXME more testing for optimum backend

FIXME tags are commonly used to mark places where a bug is suspected, but which the developer wants to deal with later.

Sometimes the developer will not have the time or will simply forget to get back to that tag.

This rule is meant to track those tags and to ensure that they do not go unnoticed.

Noncompliant Code Example

def divide(numerator, denominator):
  return numerator / denominator              # FIXME denominator value might be 0

See

Take the required action to fix the issue indicated by this "FIXME" comment.
Open

    # FIXME: implement these when we want to support CORS later
Severity: Major
Found in src/libertem/web/base.py by sonar-python

FIXME tags are commonly used to mark places where a bug is suspected, but which the developer wants to deal with later.

Sometimes the developer will not have the time or will simply forget to get back to that tag.

This rule is meant to track those tags and to ensure that they do not go unnoticed.

Noncompliant Code Example

def divide(numerator, denominator):
  return numerator / denominator              # FIXME denominator value might be 0

See

Refactor this function to reduce its Cognitive Complexity from 16 to the 15 allowed.
Open

def correct_dot_masks(masks, gain_map, excluded_pixels=None, allow_empty=False):

Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

See

Take the required action to fix the issue indicated by this "FIXME" comment.
Open

        # FIXME: this veto may break if the base shape was adjusted

FIXME tags are commonly used to mark places where a bug is suspected, but which the developer wants to deal with later.

Sometimes the developer will not have the time or will simply forget to get back to that tag.

This rule is meant to track those tags and to ensure that they do not go unnoticed.

Noncompliant Code Example

def divide(numerator, denominator):
  return numerator / denominator              # FIXME denominator value might be 0

See

Take the required action to fix the issue indicated by this "FIXME" comment.
Open

                None, None, None,  # FIXME: exc_type, exc_value, traceback?
Severity: Major
Found in src/libertem/executor/base.py by sonar-python

FIXME tags are commonly used to mark places where a bug is suspected, but which the developer wants to deal with later.

Sometimes the developer will not have the time or will simply forget to get back to that tag.

This rule is meant to track those tags and to ensure that they do not go unnoticed.

Noncompliant Code Example

def divide(numerator, denominator):
  return numerator / denominator              # FIXME denominator value might be 0

See

Refactor this function to reduce its Cognitive Complexity from 16 to the 15 allowed.
Open

def insert_at_pos(el: Any,

Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

See

Method "results_for_dataset_sync" has 8 parameters, which is greater than the 7 authorized.
Open

    def results_for_dataset_sync(self, dataset: DataSet, executor: 'DelayedJobExecutor',
            roi: Optional[np.ndarray] = None, progress: bool = False,
            corrections: Optional[CorrectionSet] = None, backends: Optional[BackendSpec] = None,
            dry: bool = False) -> Iterable[tuple]:

A long parameter list can indicate that a new structure should be created to wrap the numerous parameters or that the function is doing too many things.

Noncompliant Code Example

With a maximum number of 4 parameters:

def do_something(param1, param2, param3, param4, param5):
    ...

Compliant Solution

def do_something(param1, param2, param3, param4):
    ...

Take the required action to fix the issue indicated by this "FIXME" comment.
Open

    # FIXME write and include documentation

FIXME tags are commonly used to mark places where a bug is suspected, but which the developer wants to deal with later.

Sometimes the developer will not have the time or will simply forget to get back to that tag.

This rule is meant to track those tags and to ensure that they do not go unnoticed.

Noncompliant Code Example

def divide(numerator, denominator):
  return numerator / denominator              # FIXME denominator value might be 0

See

Take the required action to fix the issue indicated by this "FIXME" comment.
Open

        # FIXME: unused for now
Severity: Major
Found in src/libertem/web/analysis.py by sonar-python

FIXME tags are commonly used to mark places where a bug is suspected, but which the developer wants to deal with later.

Sometimes the developer will not have the time or will simply forget to get back to that tag.

This rule is meant to track those tags and to ensure that they do not go unnoticed.

Noncompliant Code Example

def divide(numerator, denominator):
  return numerator / denominator              # FIXME denominator value might be 0

See

Function "decode_swap_only_8" has 8 parameters, which is greater than the 7 authorized.
Open

def decode_swap_only_8(inp, out, idx, native_dtype, rr, origin, shape, ds_shape):

A long parameter list can indicate that a new structure should be created to wrap the numerous parameters or that the function is doing too many things.

Noncompliant Code Example

With a maximum number of 4 parameters:

def do_something(param1, param2, param3, param4, param5):
    ...

Compliant Solution

def do_something(param1, param2, param3, param4):
    ...

Method "__init__" has 8 parameters, which is greater than the 7 authorized.
Open

            self, dataset, udf, roi=None, channel=None, title=None, min_delta=1/60, udfresult=None
Severity: Major
Found in src/libertem/viz/bqp.py by sonar-python

A long parameter list can indicate that a new structure should be created to wrap the numerous parameters or that the function is doing too many things.

Noncompliant Code Example

With a maximum number of 4 parameters:

def do_something(param1, param2, param3, param4, param5):
    ...

Compliant Solution

def do_something(param1, param2, param3, param4):
    ...

Take the required action to fix the issue indicated by this "FIXME" comment.
Open

            # FIXME this might fail if the event loop policy has been overridden by something

FIXME tags are commonly used to mark places where a bug is suspected, but which the developer wants to deal with later.

Sometimes the developer will not have the time or will simply forget to get back to that tag.

This rule is meant to track those tags and to ensure that they do not go unnoticed.

Noncompliant Code Example

def divide(numerator, denominator):
  return numerator / denominator              # FIXME denominator value might be 0

See

Either remove or fill this block of code.
Open

        pass

Most of the time a block of code is empty when a piece of code is really missing. So such empty block must be either filled or removed.

Noncompliant Code Example

for i in range(3):
    pass

Exceptions

When a block contains a comment, this block is not considered to be empty.

Refactor this function to reduce its Cognitive Complexity from 16 to the 15 allowed.
Open

def environments(excluded_pixels, sigshape):

Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

See

Function "_decode_frms6" has 8 parameters, which is greater than the 7 authorized.
Open

    def _decode_frms6(inp, out, idx, native_dtype, rr, origin, shape, ds_shape):

A long parameter list can indicate that a new structure should be created to wrap the numerous parameters or that the function is doing too many things.

Noncompliant Code Example

With a maximum number of 4 parameters:

def do_something(param1, param2, param3, param4, param5):
    ...

Compliant Solution

def do_something(param1, param2, param3, param4):
    ...

Refactor this function to reduce its Cognitive Complexity from 16 to the 15 allowed.
Open

def xml_defect_coord_extractor(bad_pixel_map, map_index, map_sizes):
Severity: Critical
Found in src/libertem/io/dataset/seq.py by sonar-python

Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

See

Take the required action to fix the issue indicated by this "FIXME" comment.
Open

    # FIXME  `plt.colorbar()` creates error while testing
Severity: Major
Found in src/libertem/analysis/sd.py by sonar-python

FIXME tags are commonly used to mark places where a bug is suspected, but which the developer wants to deal with later.

Sometimes the developer will not have the time or will simply forget to get back to that tag.

This rule is meant to track those tags and to ensure that they do not go unnoticed.

Noncompliant Code Example

def divide(numerator, denominator):
  return numerator / denominator              # FIXME denominator value might be 0

See

Take the required action to fix the issue indicated by this "FIXME" comment.
Open

        # FIXME check later if the unknown root cause was fixed upstream
Severity: Major
Found in src/libertem/web/server.py by sonar-python

FIXME tags are commonly used to mark places where a bug is suspected, but which the developer wants to deal with later.

Sometimes the developer will not have the time or will simply forget to get back to that tag.

This rule is meant to track those tags and to ensure that they do not go unnoticed.

Noncompliant Code Example

def divide(numerator, denominator):
  return numerator / denominator              # FIXME denominator value might be 0

See

Take the required action to fix the issue indicated by this "FIXME" comment.
Open

        return "results.npz"  # FIXME: naming

FIXME tags are commonly used to mark places where a bug is suspected, but which the developer wants to deal with later.

Sometimes the developer will not have the time or will simply forget to get back to that tag.

This rule is meant to track those tags and to ensure that they do not go unnoticed.

Noncompliant Code Example

def divide(numerator, denominator):
  return numerator / denominator              # FIXME denominator value might be 0

See

Method "validate" has 8 parameters, which is greater than the 7 authorized.
Open

        self,
        shape: tuple[int, ...],
        ds_sig_shape: tuple[int, ...],
        size: int,
        io_max_size: int,

A long parameter list can indicate that a new structure should be created to wrap the numerous parameters or that the function is doing too many things.

Noncompliant Code Example

With a maximum number of 4 parameters:

def do_something(param1, param2, param3, param4, param5):
    ...

Compliant Solution

def do_something(param1, param2, param3, param4):
    ...
Severity
Category
Status
Source
Language