nstarman/utilipy

View on GitHub

Showing 95 of 96 total issues

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

def indev_attribute(
Severity: Minor
Found in utilipy/decorators/code_dev.py - About 35 mins to fix

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

        def __call__(self, fromdata, *args, _override_kws: bool = False, **kwargs):
    Severity: Minor
    Found in utilipy/data_utils/xfm/transformations.py - About 35 mins to fix

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

          def modify_parameter(
      Severity: Minor
      Found in utilipy/utils/inspect.py - About 35 mins to fix

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

        def store_function_input(
        Severity: Minor
        Found in utilipy/decorators/func_io.py - About 35 mins to fix

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

              def __init__(
          Severity: Minor
          Found in utilipy/utils/inspect.py - About 35 mins to fix

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

                def dump(
            Severity: Minor
            Found in utilipy/utils/collections.py - About 35 mins to fix

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

              def __update_wrapper_docstring(
                  wrapped: T.Callable,
                  docstring: T.Union[str, bool],
                  wrapper_doc: str,
                  _doc_style: T.Union[str, T.Callable, None],
              Severity: Minor
              Found in utilipy/utils/functools.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 __parse_sig_for_update_wrapper has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

              def __parse_sig_for_update_wrapper(
                  signature: T.Union[_FullerSig, None, bool], wrapped: T.Callable
              ):
                  """Parse signature for `~update_wrapper`.
              
              
              Severity: Minor
              Found in utilipy/utils/functools.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 printMD has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

              def printMD(
                  s: str,
                  color: T.Optional[str] = None,
                  size: T.Optional[float] = None,
                  bold: bool = False,
              Severity: Minor
              Found in utilipy/ipython/printing.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,
                      filename: T.Optional[str] = None,
                      verbose: int = 0,
                      sec_div: str = "-",
              Severity: Minor
              Found in utilipy/utils/logging/_LogFile.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

              Avoid too many return statements within this function.
              Open

                      return out
              Severity: Major
              Found in utilipy/data_utils/select.py - About 30 mins to fix

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

                    def type_set(self):
                        """A `set` of all data types present in this `TransformGraph`."""
                        if self._cached_type_set is None:
                            self._cached_type_set = set()
                            for a in self._graph:
                Severity: Minor
                Found in utilipy/data_utils/xfm/graph.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 get_transform has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                Open

                    def get_transform(self, fromtype, totype):
                        """Generate `CompositeTransform` for a datatype transformation.
                
                        Parameters
                        ----------
                Severity: Minor
                Found in utilipy/data_utils/xfm/graph.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 aimport has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                Open

                def aimport(*modules: str, autoreload: T.Union[bool, list, tuple] = True):
                    """Jupyter magic aimport.
                
                    Parameters
                    ----------
                Severity: Minor
                Found in utilipy/ipython/autoreload.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 modify_parameter has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                Open

                def modify_parameter(
                    sig: Signature,
                    param: T.Union[str, int],
                    name: T.Union[str, _empty] = _empty,
                    kind: T.Any = _empty,
                Severity: Minor
                Found in utilipy/utils/inspect.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