hugoruscitti/pilas

View on GitHub

Showing 1,009 of 1,970 total issues

Function _validar_argumentos has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
Open

    def _validar_argumentos(self, metodo, nombre_clase, funcion, k, kv):
        """Se asegura que la función iniciar del actor
        se pueda ejecutar con los argumentos indicados."""

        argumentos_esperados = inspect.getargspec(funcion)
Severity: Minor
Found in pilasengine/actores/__init__.py - About 2 hrs 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 keyPressEvent has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
Open

    def keyPressEvent(self, event):
        "Atiene el evento de pulsación de tecla."
        self._cambios_sin_guardar = True

        # Permite usar tab como seleccionador de la palabra actual
Severity: Minor
Found in pilasengine/interprete/editor.py - About 2 hrs 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 _ejecutar_colision_programada_si_existe has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
Open

    def _ejecutar_colision_programada_si_existe(self, actor_1, actor_2):
        for (grupo_a, grupo_b, funcion_a_llamar) in self._colisiones_programadas_con_respuesta:
            for a in grupo_a:
                for b in grupo_b:
                    if a in (actor_1, actor_2) and b in (actor_1, actor_2):
Severity: Minor
Found in pilasengine/colisiones/__init__.py - About 2 hrs 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 update has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
Open

    def update(self, ptime):
        """Update this tween with the time since the last frame
            if there is an update function, it is always called
            whether the tween is running or paused"""
            
Severity: Minor
Found in pilas/pytweener.py - About 2 hrs 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 remove has 51 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    remove: function( elem, types, handler, selector, mappedTypes ) {
        var j, handleObj, tmp,
            origCount, t, events,
            special, handlers, type,
            namespaces, origType,
Severity: Major
Found in data/manual/js/jquery-1.11.1.js - About 2 hrs to fix

    Function ajaxConvert has 51 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function ajaxConvert( s, response ) {
    
        var conv, conv2, current, tmp,
            // Work with a copy of dataTypes in case we need to modify it for conversion
            dataTypes = s.dataTypes.slice(),
    Severity: Major
    Found in data/asistente/js/jquery-1.8.3.js - About 2 hrs to fix

      Function data has 51 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          data: function( elem, name, data, pvt /* Internal Use Only */ ) {
              if ( !jQuery.acceptData( elem ) ) {
                  return;
              }
      
      
      Severity: Major
      Found in data/asistente/js/jquery-1.8.3.js - About 2 hrs to fix

        Function remove has 51 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            remove: function( elem, types, handler, selector, mappedTypes ) {
                var j, handleObj, tmp,
                    origCount, t, events,
                    special, handlers, type,
                    namespaces, origType,
        Severity: Major
        Found in data/api/_static/jquery-1.11.1.js - About 2 hrs to fix

          Function __init__ has 51 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              def __init__(self, pilas):
                  self.pilas = pilas
          
                  self.IZQUIERDA = 1
                  self.DERECHA = 2
          Severity: Major
          Found in pilasengine/simbolos.py - About 2 hrs to fix

            Consider simplifying this complex logical expression.
            Open

                            if ( ( mappedTypes || origType === handleObj.origType ) &&
                                ( !handler || handler.guid === handleObj.guid ) &&
                                ( !tmp || tmp.test( handleObj.namespace ) ) &&
                                ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
                                handlers.splice( j, 1 );
            Severity: Critical
            Found in data/manual/js/jquery-1.11.1.js - About 2 hrs to fix

              Function init has 50 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  init: function( selector, context, rootjQuery ) {
                      var match, elem, ret, doc;
              
                      // Handle $(""), $(null), $(undefined), $(false)
                      if ( !selector ) {
              Severity: Minor
              Found in data/asistente/js/jquery-1.8.3.js - About 2 hrs to fix

                Function open has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                          $modal.open = function (modalOptions) {
                
                            var modalResultDeferred = $q.defer();
                            var modalOpenedDeferred = $q.defer();
                
                
                Severity: Minor
                Found in data/asistente/js/ui-bootstrap-tpls.js - About 2 hrs to fix

                  Consider simplifying this complex logical expression.
                  Open

                                  if ( ( mappedTypes || origType === handleObj.origType ) &&
                                       ( !handler || handler.guid === handleObj.guid ) &&
                                       ( !namespaces || namespaces.test( handleObj.namespace ) ) &&
                                       ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
                                      eventType.splice( j--, 1 );
                  Severity: Critical
                  Found in data/asistente/js/jquery-1.8.3.js - About 2 hrs to fix

                    Consider simplifying this complex logical expression.
                    Open

                        if ( args.length === 1 && typeof first === "string" && first.length < 512 && context === document &&
                            first.charAt(0) === "<" && !rnocache.test( first ) &&
                            (jQuery.support.checkClone || !rchecked.test( first )) &&
                            (jQuery.support.html5Clone || !rnoshimcache.test( first )) ) {
                    
                    
                    Severity: Critical
                    Found in data/asistente/js/jquery-1.8.3.js - About 2 hrs to fix

                      Function performObjectSearch has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        performObjectSearch : function(object, otherterms) {
                          var filenames = this._index.filenames;
                          var objects = this._index.objects;
                          var objnames = this._index.objnames;
                          var titles = this._index.titles;
                      Severity: Minor
                      Found in data/api/_static/searchtools.js - About 2 hrs to fix

                        Consider simplifying this complex logical expression.
                        Open

                                        if ( ( mappedTypes || origType === handleObj.origType ) &&
                                            ( !handler || handler.guid === handleObj.guid ) &&
                                            ( !tmp || tmp.test( handleObj.namespace ) ) &&
                                            ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
                                            handlers.splice( j, 1 );
                        Severity: Critical
                        Found in data/api/_static/jquery-1.11.1.js - About 2 hrs to fix

                          Function internalRemoveData has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function internalRemoveData( elem, name, pvt ) {
                              if ( !jQuery.acceptData( elem ) ) {
                                  return;
                              }
                          
                          
                          Severity: Minor
                          Found in data/manual/js/jquery-1.11.1.js - About 1 hr to fix

                            Function initVML has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              function initVML() {
                            
                                /* Utility function to create a VML tag */
                                function vml(tag, attr) {
                                  return createEl('<' + tag + ' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">', attr)
                            Severity: Minor
                            Found in data/asistente/js/spin.js - About 1 hr to fix

                              Function internalRemoveData has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              function internalRemoveData( elem, name, pvt ) {
                                  if ( !jQuery.acceptData( elem ) ) {
                                      return;
                                  }
                              
                              
                              Severity: Minor
                              Found in data/api/_static/jquery-1.11.1.js - About 1 hr to fix

                                Function data has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    data: function( key, value ) {
                                        var parts, part, attr, name, l,
                                            elem = this[0],
                                            i = 0,
                                            data = null;
                                Severity: Minor
                                Found in data/asistente/js/jquery-1.8.3.js - About 1 hr to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language