Showing 5,781 of 10,536 total issues

Avoid deeply nested control flow statements.
Open

                        if digital_value_latest_dict.get(row_point[0]) is not None:
                            pcs_run_state_point_value = digital_value_latest_dict.get(row_point[0])['actual_value']

                # 0:关闭 Shutdown
                # 1:软启动中 Soft Starting
Severity: Major
Found in myems-api/reports/energystoragepowerstationlist.py - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                            for row in rows:
                                current_datetime_local = row[0].replace(tzinfo=timezone.utc) + \
                                                         timedelta(minutes=timezone_offset)
                                current_datetime = current_datetime_local.strftime('%Y-%m-%dT%H:%M:%S')
                                point_timestamps.append(current_datetime)
    Severity: Major
    Found in myems-api/reports/combinedequipmentenergycategory.py - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                              for row in rows:
                                  current_datetime_local = row[0].replace(tzinfo=timezone.utc) + \
                                                           timedelta(minutes=timezone_offset)
                                  current_datetime = current_datetime_local.strftime('%Y-%m-%dT%H:%M:%S')
                                  point_timestamps.append(current_datetime)
      Severity: Major
      Found in myems-api/reports/tenantsaving.py - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                while current_datetime_local < rows[index + 1][0].replace(tzinfo=timezone.utc) + \
                                        timedelta(minutes=timezone_offset):
                                    point_timestamps.append(current_datetime_local.strftime('%m-%d %H:%M'))
                                    point_values.append(rows[index][1])
                                    current_datetime_local += timedelta(minutes=1)
        Severity: Major
        Found in myems-api/reports/energystoragepowerstationreportingenergy.py - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                                  for row in rows:
                                      current_datetime_local = row[0].replace(tzinfo=timezone.utc) + \
                                                               timedelta(minutes=timezone_offset)
                                      current_datetime = current_datetime_local.strftime('%Y-%m-%dT%H:%M:%S')
                                      point_timestamps.append(current_datetime)
          Severity: Major
          Found in myems-api/reports/spacestatistics.py - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                    if analog_value_latest_dict.get(row_point[0]) is not None:
                                        load_power_point_value = analog_value_latest_dict.get(row_point[0])['actual_value']
            
            
            Severity: Major
            Found in myems-api/reports/energystoragepowerstationlist.py - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                      for row in rows:
                                          current_datetime_local = row[0].replace(tzinfo=timezone.utc) + \
                                                                   timedelta(minutes=timezone_offset)
                                          current_datetime = current_datetime_local.strftime('%Y-%m-%dT%H:%M:%S')
                                          point_timestamps.append(current_datetime)
              Severity: Major
              Found in myems-api/reports/shopfloorenergyitem.py - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                        for row in rows:
                                            current_datetime_local = row[0].replace(tzinfo=timezone.utc) + \
                                                                     timedelta(minutes=timezone_offset)
                                            current_datetime = current_datetime_local.strftime('%Y-%m-%dT%H:%M:%S')
                                            point_timestamps.append(current_datetime)
                Severity: Major
                Found in myems-api/reports/metercarbon.py - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                          for row in rows:
                                              current_datetime_local = row[0].replace(tzinfo=timezone.utc) + \
                                                                       timedelta(minutes=timezone_offset)
                                              current_datetime = current_datetime_local.strftime('%Y-%m-%dT%H:%M:%S')
                                              point_timestamps.append(current_datetime)
                  Severity: Major
                  Found in myems-api/reports/metercarbon.py - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                            for row in rows:
                                                current_datetime_local = row[0].replace(tzinfo=timezone.utc) + \
                                                                         timedelta(minutes=timezone_offset)
                                                current_datetime = current_datetime_local.strftime('%Y-%m-%dT%H:%M:%S')
                                                point_timestamps.append(current_datetime)
                    Severity: Major
                    Found in myems-api/reports/combinedequipmentcarbon.py - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                              for row in rows:
                                                  current_datetime_local = row[0].replace(tzinfo=timezone.utc) + \
                                                                           timedelta(minutes=timezone_offset)
                                                  current_datetime = current_datetime_local.strftime('%Y-%m-%dT%H:%M:%S')
                                                  point_timestamps.append(current_datetime)
                      Severity: Major
                      Found in myems-api/reports/combinedequipmentenergycategory.py - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                if digital_value_latest_dict.get(row_point[0]) is not None:
                                                    battery_state_point_value = digital_value_latest_dict.get(row_point[0])['actual_value']
                        
                                        # 0预留 1故障  2预警  3待机  4禁放  5禁充  6正常 7充电 8放电 9空闲
                                        print(battery_state_point_value)
                        Severity: Major
                        Found in myems-api/reports/energystoragepowerstationlist.py - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                                  while current_datetime_local < rows[index + 1][0].replace(tzinfo=timezone.utc) + \
                                                          timedelta(minutes=timezone_offset):
                                                      point_timestamps.append(current_datetime_local.strftime('%m-%d %H:%M'))
                                                      point_values.append(rows[index][1])
                                                      current_datetime_local += timedelta(minutes=1)
                          Severity: Major
                          Found in myems-api/reports/microgridreportingrevenue.py - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                    for row in rows:
                                                        current_datetime_local = row[0].replace(tzinfo=timezone.utc) + \
                                                                                 timedelta(minutes=timezone_offset)
                                                        current_datetime = current_datetime_local.strftime('%Y-%m-%dT%H:%M:%S')
                                                        point_timestamps.append(current_datetime)
                            Severity: Major
                            Found in myems-api/reports/combinedequipmentcarbon.py - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                      for row in rows:
                                                          current_datetime_local = row[0].replace(tzinfo=timezone.utc) + \
                                                                                   timedelta(minutes=timezone_offset)
                                                          current_datetime = current_datetime_local.strftime('%Y-%m-%dT%H:%M:%S')
                                                          point_timestamps.append(current_datetime)
                              Severity: Major
                              Found in myems-api/reports/spaceplan.py - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                        for row in rows:
                                                            current_datetime_local = row[0].replace(tzinfo=timezone.utc) + \
                                                                                     timedelta(minutes=timezone_offset)
                                                            current_datetime = current_datetime_local.strftime('%Y-%m-%dT%H:%M:%S')
                                                            point_timestamps.append(current_datetime)
                                Severity: Major
                                Found in myems-api/reports/shopfloorload.py - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                          for row in rows:
                                                              current_datetime_local = row[0].replace(tzinfo=timezone.utc) + \
                                                                                       timedelta(minutes=timezone_offset)
                                                              current_datetime = current_datetime_local.strftime('%Y-%m-%dT%H:%M:%S')
                                                              point_timestamps.append(current_datetime)
                                  Severity: Major
                                  Found in myems-api/reports/tenantsaving.py - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                            for row in rows:
                                                                current_datetime_local = row[0].replace(tzinfo=timezone.utc) + \
                                                                                         timedelta(minutes=timezone_offset)
                                                                current_datetime = current_datetime_local.strftime('%Y-%m-%dT%H:%M:%S')
                                                                point_timestamps.append(current_datetime)
                                    Severity: Major
                                    Found in myems-api/reports/storecost.py - About 45 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                                              for row in rows:
                                                                  current_datetime_local = row[0].replace(tzinfo=timezone.utc) + \
                                                                                           timedelta(minutes=timezone_offset)
                                                                  current_datetime = current_datetime_local.strftime('%Y-%m-%dT%H:%M:%S')
                                                                  point_timestamps.append(current_datetime)
                                      Severity: Major
                                      Found in myems-api/reports/combinedequipmentenergyitem.py - About 45 mins to fix

                                        Avoid deeply nested control flow statements.
                                        Open

                                                                for row in rows:
                                                                    current_datetime_local = row[0].replace(tzinfo=timezone.utc) + \
                                                                                             timedelta(minutes=timezone_offset)
                                                                    current_datetime = current_datetime_local.strftime('%Y-%m-%dT%H:%M:%S')
                                                                    point_timestamps.append(current_datetime)
                                        Severity: Major
                                        Found in myems-api/reports/tenantstatistics.py - About 45 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language