LiberTEM/LiberTEM

View on GitHub

Showing 269 of 913 total issues

Function run_udf has 9 arguments (exceeds 8 allowed). Consider refactoring.
Open

    def run_udf(
Severity: Major
Found in src/libertem/api.py - About 35 mins to fix

    Function _run_sync has 9 arguments (exceeds 8 allowed). Consider refactoring.
    Open

        def _run_sync(
    Severity: Major
    Found in src/libertem/api.py - About 35 mins to fix

      Function __init__ has 9 arguments (exceeds 8 allowed). Consider refactoring.
      Open

          def __init__(self, path, tileshape=None, scan_size=None, disable_glob=False,
      Severity: Major
      Found in src/libertem/io/dataset/mib.py - About 35 mins to fix

        Function _run_sync has 9 arguments (exceeds 8 allowed). Consider refactoring.
        Open

            def _run_sync(
        Severity: Major
        Found in src/libertem/api.py - About 35 mins to fix

          Function _run_sync has 9 arguments (exceeds 8 allowed). Consider refactoring.
          Open

              def _run_sync(
          Severity: Major
          Found in src/libertem/api.py - About 35 mins to fix

            Function _run_async has 9 arguments (exceeds 8 allowed). Consider refactoring.
            Open

                def _run_async(
            Severity: Major
            Found in src/libertem/api.py - About 35 mins to fix

              Function _run_sync has 9 arguments (exceeds 8 allowed). Consider refactoring.
              Open

                  def _run_sync(
              Severity: Major
              Found in src/libertem/api.py - About 35 mins to fix

                Function _run_async has 9 arguments (exceeds 8 allowed). Consider refactoring.
                Open

                    def _run_async(
                Severity: Major
                Found in src/libertem/api.py - About 35 mins to fix

                  Function main has 9 arguments (exceeds 8 allowed). Consider refactoring.
                  Open

                  def main(kind, scheduler, local_directory, n_cpus, cudas,
                  Severity: Major
                  Found in src/libertem/executor/cli.py - About 35 mins to fix

                    Function _run_async has 9 arguments (exceeds 8 allowed). Consider refactoring.
                    Open

                        def _run_async(
                    Severity: Major
                    Found in src/libertem/api.py - About 35 mins to fix

                      Function _run_async has 9 arguments (exceeds 8 allowed). Consider refactoring.
                      Open

                          def _run_async(
                      Severity: Major
                      Found in src/libertem/api.py - About 35 mins to fix

                        Function _run_async has 9 arguments (exceeds 8 allowed). Consider refactoring.
                        Open

                            def _run_async(
                        Severity: Major
                        Found in src/libertem/api.py - About 35 mins to fix

                          Function _run_sync has 9 arguments (exceeds 8 allowed). Consider refactoring.
                          Open

                              def _run_sync(
                          Severity: Major
                          Found in src/libertem/api.py - About 35 mins to fix

                            Function radial_mask_factory has 9 arguments (exceeds 8 allowed). Consider refactoring.
                            Open

                            def radial_mask_factory(detector_y, detector_x, cx, cy, ri, ro, n_bins, max_order, use_sparse):
                            Severity: Major
                            Found in src/libertem/analysis/radialfourier.py - About 35 mins to fix

                              Function _run_sync has 9 arguments (exceeds 8 allowed). Consider refactoring.
                              Open

                                  def _run_sync(
                              Severity: Major
                              Found in src/libertem/api.py - About 35 mins to fix

                                Function run_for_dataset_sync has 9 arguments (exceeds 8 allowed). Consider refactoring.
                                Open

                                    def run_for_dataset_sync(
                                Severity: Major
                                Found in src/libertem/udf/base.py - About 35 mins to fix

                                  Function __init__ has 9 arguments (exceeds 8 allowed). Consider refactoring.
                                  Open

                                      def __init__(
                                  Severity: Major
                                  Found in src/libertem/udf/base.py - About 35 mins to fix

                                    Function __init__ has 9 arguments (exceeds 8 allowed). Consider refactoring.
                                    Open

                                        def __init__(self, mask_factories, use_torch=True, use_sparse=None, mask_count=None,
                                    Severity: Major
                                    Found in src/libertem/udf/masks.py - About 35 mins to fix

                                      Function get_generic_results has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                      Open

                                          def get_generic_results(self, img_sum, img_y, img_x, damage):
                                              from libertem.viz import rgb_from_2dvector, visualize_simple
                                              ref_x = self.parameters["cx"]
                                              ref_y = self.parameters["cy"]
                                              y_centers_raw, x_centers_raw = center_shifts(img_sum, img_y, img_x, ref_y, ref_x)
                                      Severity: Minor
                                      Found in src/libertem/analysis/com.py - About 35 mins to fix

                                      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 7 (exceeds 5 allowed). Consider refactoring.
                                      Open

                                          def __init__(self, path, tileshape=None, scan_size=None, disable_glob=False,
                                                       nav_shape=None, sig_shape=None, sync_offset=0, io_backend=None):
                                              super().__init__(io_backend=io_backend)
                                              self._sig_dims = 2
                                              self._path = str(path)
                                      Severity: Minor
                                      Found in src/libertem/io/dataset/mib.py - About 35 mins to fix

                                      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

                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language