Showing 5,781 of 10,536 total issues

Consider simplifying this complex logical expression.
Open

    if (energy_meter_hourly is None or len(energy_meter_hourly) == 0) and \
            (energy_virtual_meter_hourly is None or len(energy_virtual_meter_hourly) == 0) and \
            (energy_offline_meter_hourly is None or len(energy_offline_meter_hourly) == 0):
        # There isn't any energy data
        print("There isn't any energy data")
Severity: Major
Found in myems-aggregation/tenant_energy_input_item.py - About 40 mins to fix

    Consider simplifying this complex logical expression.
    Open

        if (energy_meter_hourly is None or len(energy_meter_hourly) == 0) and \
                (energy_virtual_meter_hourly is None or len(energy_virtual_meter_hourly) == 0) and \
                (energy_offline_meter_hourly is None or len(energy_offline_meter_hourly) == 0):
            # There isn't any energy data
            print("There isn't any energy data")
    Severity: Major
    Found in myems-aggregation/store_energy_input_category.py - About 40 mins to fix

      Consider simplifying this complex logical expression.
      Open

          if (meter_list is None or len(meter_list) == 0) and \
                  (virtual_meter_list is None or len(virtual_meter_list) == 0) and \
                  (offline_meter_list is None or len(offline_meter_list) == 0):
              print("This is an empty equipment ")
              return None
      Severity: Major
      Found in myems-aggregation/equipment_energy_input_category.py - About 40 mins to fix

        Consider simplifying this complex logical expression.
        Open

            if (energy_combined_equipment_hourly is None or len(energy_combined_equipment_hourly) == 0) and \
                    (energy_equipment_hourly is None or len(energy_equipment_hourly) == 0) and \
                    (energy_child_space_hourly is None or len(energy_child_space_hourly) == 0):
                # There isn't any energy data
                print("There isn't any energy data")
        Severity: Major
        Found in myems-aggregation/space_energy_output_category.py - About 40 mins to fix

          Consider simplifying this complex logical expression.
          Open

              if (energy_meter_hourly is None or len(energy_meter_hourly) == 0) and \
                      (energy_virtual_meter_hourly is None or len(energy_virtual_meter_hourly) == 0) and \
                      (energy_offline_meter_hourly is None or len(energy_offline_meter_hourly) == 0):
                  # There isn't any energy data
                  print("There isn't any energy data")
          Severity: Major
          Found in myems-aggregation/equipment_energy_input_category.py - About 40 mins to fix

            Consider simplifying this complex logical expression.
            Open

                if (meter_list is None or len(meter_list) == 0) and \
                        (virtual_meter_list is None or len(virtual_meter_list) == 0) and \
                        (offline_meter_list is None or len(offline_meter_list) == 0):
                    print("This is an empty store ")
                    return None
            Severity: Major
            Found in myems-aggregation/store_energy_input_item.py - About 40 mins to fix

              Consider simplifying this complex logical expression.
              Open

                  if (energy_meter_hourly is None or len(energy_meter_hourly) == 0) and \
                          (energy_virtual_meter_hourly is None or len(energy_virtual_meter_hourly) == 0) and \
                          (energy_offline_meter_hourly is None or len(energy_offline_meter_hourly) == 0):
                      # There isn't any energy data
                      print("There isn't any energy data")
              Severity: Major
              Found in myems-aggregation/store_energy_input_item.py - About 40 mins to fix

                Consider simplifying this complex logical expression.
                Open

                    if ((combined_equipment_list is None or len(combined_equipment_list) == 0) and
                            (equipment_list is None or len(equipment_list) == 0) and
                            (child_space_list is None or len(child_space_list) == 0)):
                        print("This is an empty space ")
                        return None
                Severity: Major
                Found in myems-aggregation/space_energy_output_category.py - About 40 mins to fix

                  Consider simplifying this complex logical expression.
                  Open

                      if "non_working_days_subtotals" not in report['reporting_period'].keys() or \
                              report['reporting_period']['non_working_days_subtotals'] is None or \
                              len(report['reporting_period']['non_working_days_subtotals']) == 0 or \
                              "working_days_subtotals" not in report['reporting_period'].keys() or \
                              report['reporting_period']['working_days_subtotals'] is None or \
                  Severity: Major
                  Found in myems-api/excelexporters/spaceenergycategory.py - About 40 mins to fix

                    Consider simplifying this complex logical expression.
                    Open

                        if "non_working_days_subtotals" not in report['reporting_period'].keys() or \
                                report['reporting_period']['non_working_days_subtotals'] is None or \
                                len(report['reporting_period']['non_working_days_subtotals']) == 0 or \
                                "working_days_subtotals" not in report['reporting_period'].keys() or \
                                report['reporting_period']['working_days_subtotals'] is None or \
                    Severity: Major
                    Found in myems-api/excelexporters/shopfloorenergycategory.py - About 40 mins to fix

                      Consider simplifying this complex logical expression.
                      Open

                          if "non_working_days_subtotals" not in report['reporting_period'].keys() or \
                                  report['reporting_period']['non_working_days_subtotals'] is None or \
                                  len(report['reporting_period']['non_working_days_subtotals']) == 0 or \
                                  "working_days_subtotals" not in report['reporting_period'].keys() or \
                                  report['reporting_period']['working_days_subtotals'] is None or \
                      Severity: Major
                      Found in myems-api/excelexporters/tenantenergycategory.py - About 40 mins to fix

                        Consider simplifying this complex logical expression.
                        Open

                            if "non_working_days_subtotals" not in report['reporting_period'].keys() or \
                                    report['reporting_period']['non_working_days_subtotals'] is None or \
                                    len(report['reporting_period']['non_working_days_subtotals']) == 0 or \
                                    "working_days_subtotals" not in report['reporting_period'].keys() or \
                                    report['reporting_period']['working_days_subtotals'] is None or \
                        Severity: Major
                        Found in myems-api/excelexporters/storeenergycategory.py - About 40 mins to fix

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

                                  function Resolvable(arg1, resolveFn, deps, policy, data) {
                          Severity: Minor
                          Found in myems-admin/js/ui-router/angular-ui-router.js - About 35 mins to fix

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

                                    draw = function(context, qr, modules, tile, color) {
                            Severity: Minor
                            Found in myems-admin/js/angular/angular-qrcode.js - About 35 mins to fix

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

                                  function getType(cfg, urlType, location, id, paramTypes) {
                              Severity: Minor
                              Found in myems-admin/js/ui-router/angular-ui-router.js - About 35 mins to fix

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

                                    function createProxyFunctions(source, target, bind, fnNames, latebind) {
                                Severity: Minor
                                Found in myems-admin/js/ui-router/angular-ui-router.js - About 35 mins to fix

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

                                      link: function(scope, $element, attrs, ctrl, $transclude) {
                                  Severity: Minor
                                  Found in myems-admin/js/angular/angular-animate.js - About 35 mins to fix

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

                                        function clickHook(el, $state, $timeout, type, getDef) {
                                    Severity: Minor
                                    Found in myems-admin/js/ui-router/angular-ui-router.js - About 35 mins to fix

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

                                          function $ViewDirectiveFill($compile, $controller, $transitions, $view, $q) {
                                      Severity: Minor
                                      Found in myems-admin/js/ui-router/angular-ui-router.js - About 35 mins to fix

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

                                                function Param(id, type, location, urlConfig, state) {
                                        Severity: Minor
                                        Found in myems-admin/js/ui-router/angular-ui-router.js - About 35 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language