lucasmiranda42/deepof

View on GitHub

Showing 344 of 362 total issues

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

    def __init__(
Severity: Major
Found in deepof/models.py - About 1 hr to fix

    Function setOffset has 34 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        setOffset: function( elem, options, i ) {
            var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
                position = jQuery.css( elem, "position" ),
                curElem = jQuery( elem ),
                props = {};
    Severity: Minor
    Found in docs/build/html/_static/jquery-3.6.0.js - About 1 hr to fix

      Function handlers has 34 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          handlers: function( event, handlers ) {
              var i, handleObj, sel, matchedHandlers, matchedSelectors,
                  handlerQueue = [],
                  delegateCount = handlers.delegateCount,
                  cur = event.target;
      Severity: Minor
      Found in docs/build/html/_static/jquery-3.6.0.js - About 1 hr to fix

        Function throttle has 34 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          function throttle(func, wait, options) {
            var timeout, context, args, result;
            var previous = 0;
            if (!options) options = {};
        
        
        Severity: Minor
        Found in docs/build/html/_static/underscore-1.13.1.js - About 1 hr to fix

          Consider simplifying this complex logical expression.
          Open

              if ( ( !support.boxSizingReliable() && isBorderBox ||
          
                  // Support: IE 10 - 11+, Edge 15 - 18+
                  // IE/Edge misreport `getComputedStyle` of table rows with width/height
                  // set in CSS while `offset*` properties report correct values.
          Severity: Critical
          Found in docs/build/html/_static/jquery-3.6.0.js - About 1 hr to fix

            Function showHide has 33 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function showHide( elements, show ) {
                var display, elem,
                    values = [],
                    index = 0,
                    length = elements.length;
            Severity: Minor
            Found in docs/build/html/_static/jquery-3.6.0.js - About 1 hr to fix

              Function handler has 32 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      handler: function( event ) {
                          var notAsync, result,
                              saved = dataPriv.get( this, type );
              
                          if ( ( event.isTrigger & 1 ) && this[ type ] ) {
              Severity: Minor
              Found in docs/build/html/_static/jquery-3.6.0.js - About 1 hr to fix

                Function output_cluster_video has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                Open

                def output_cluster_video(
                    cap: Any,
                    out: Any,
                    frame_mask: list,
                    v_width: int,
                Severity: Minor
                Found in deepof/visuals.py - About 1 hr 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 output_videos_per_cluster has 10 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                def output_videos_per_cluster(
                Severity: Major
                Found in deepof/visuals.py - About 1 hr to fix

                  Function output_unsupervised_annotated_video has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                  Open

                  def output_unsupervised_annotated_video(
                      video_path: str,
                      breaks: list,
                      soft_counts: np.ndarray,
                      frame_rate: int = 25,
                  Severity: Minor
                  Found in deepof/visuals.py - About 1 hr 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 supervised_tagging has 10 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  def supervised_tagging(
                  Severity: Major
                  Found in deepof/annotation_utils.py - About 1 hr to fix

                    Function heatmap has 10 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                    def heatmap(
                    Severity: Major
                    Found in deepof/visuals.py - About 1 hr to fix

                      Function _process_animation_data has 10 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                      def _process_animation_data(
                      Severity: Major
                      Found in deepof/visuals.py - About 1 hr to fix

                        Function plot_arena has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                        Open

                        def plot_arena(
                            coordinates: coordinates, center: str, color: str, ax: Any, i: Union[int, str]
                        ):
                            """Plot the arena in the given canvas.
                        
                        
                        Severity: Minor
                        Found in deepof/visuals.py - About 1 hr 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 filter_columns has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                        Open

                        def filter_columns(columns: list, selected_id: str) -> list:
                            """Given a set of TableDict columns, returns those that correspond to a given animal, specified in selected_id.
                        
                            Args:
                                columns (list): List of columns to filter.
                        Severity: Minor
                        Found in deepof/utils.py - About 1 hr 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_transformer_encoder has 10 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                        def get_transformer_encoder(
                        Severity: Major
                        Found in deepof/models.py - About 1 hr to fix

                          Function get_TCN_decoder has 10 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                          def get_TCN_decoder(
                          Severity: Major
                          Found in deepof/models.py - About 1 hr to fix

                            Function get_arenas has 10 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                            def get_arenas(
                            Severity: Major
                            Found in deepof/utils.py - About 1 hr to fix

                              Function get_vqvae has 10 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                              def get_vqvae(
                              Severity: Major
                              Found in deepof/models.py - About 1 hr to fix

                                Function load has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                jQuery.fn.load = function( url, params, callback ) {
                                    var selector, type, response,
                                        self = this,
                                        off = url.indexOf( " " );
                                
                                
                                Severity: Minor
                                Found in docs/build/html/_static/jquery-3.6.0.js - About 1 hr to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language