sahitono/geosardine

View on GitHub

Showing 37 of 50 total issues

Function __nb_raster_calc__ has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

def __nb_raster_calc__(
Severity: Major
Found in geosardine/_raster_numba.py - About 50 mins to fix

    Function save_raster has 7 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def save_raster(
    Severity: Major
    Found in geosardine/_utility.py - About 50 mins to fix

      Function _vincenty_distance has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
      Open

      def _vincenty_distance(
          long_lat1: np.ndarray,
          long_lat2: np.ndarray,
          semi_major: float = 6378137.0,
          semi_minor: float = 6356752.314245179,
      Severity: Minor
      Found in geosardine/_utility.py - About 45 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 _vincenty_distance_dispatch has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def _vincenty_distance_dispatch(
      Severity: Minor
      Found in geosardine/_utility.py - About 45 mins to fix

        Function __raster_calculation__ has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
        Open

            def __raster_calculation__(
                self,
                raster: Union[int, float, "Raster", np.ndarray],
                operator: Callable[[Any, Any], Any],
            ) -> "Raster":
        Severity: Minor
        Found in geosardine/raster.py - About 45 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 drape2raster has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        def drape2raster(
        Severity: Minor
        Found in geosardine/_geosardine.py - About 35 mins to fix

          Function __init__ has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              def __init__(
          Severity: Minor
          Found in geosardine/interpolate/_utility.py - About 35 mins to fix

            Function idw_cli has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            def idw_cli(points: Path, output, resolution, column, distance_limit):
            Severity: Minor
            Found in geosardine/__main__.py - About 35 mins to fix

              Function _harvesine_distance has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              def _harvesine_distance(
              Severity: Minor
              Found in geosardine/_utility.py - About 35 mins to fix

                Function drape_coordinates has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                def drape_coordinates(
                Severity: Minor
                Found in geosardine/_geosardine.py - About 35 mins to fix

                  Function __harvesine_distance has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  def __harvesine_distance(
                  Severity: Minor
                  Found in geosardine/_utility.py - About 35 mins to fix

                    Function _vincenty_distance has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                    def _vincenty_distance(
                    Severity: Minor
                    Found in geosardine/_utility.py - About 35 mins to fix

                      Function __harvesine_distance has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                      def __harvesine_distance(
                      Severity: Minor
                      Found in geosardine/_utility.py - About 35 mins to fix

                        Function _harvesine_distance_dispatch has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                        def _harvesine_distance_dispatch(
                        Severity: Minor
                        Found in geosardine/_utility.py - About 35 mins to fix

                          Function _idw_array has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                          Open

                          def _idw_array(
                              points: np.ndarray,
                              value: np.ndarray,
                              spatial_res: Tuple[float, float],
                              epsg: int = 4326,
                          Severity: Minor
                          Found in geosardine/interpolate/idw.py - About 25 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 __py_resample has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                          Open

                              def __py_resample(
                                  self, resolution: Union[Tuple[float, float], List[float], float]
                              ) -> "Raster":
                                  """
                                  Resample raster using nearest neighbor
                          Severity: Minor
                          Found in geosardine/raster.py - About 25 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 __getitem__ has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                          Open

                              def __getitem__(self, keys: Union[int, Tuple[Any, ...], slice]) -> np.ndarray:
                                  if isinstance(keys, slice) or isinstance(keys, int):
                                      row_col_min: List[int] = [
                                          self.parse_slicer(keys, self.__array__().shape[0]),
                                          0,
                          Severity: Minor
                          Found in geosardine/raster.py - About 25 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