Showing 5,781 of 10,536 total issues

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/combinedequipmentcost.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/equipmentefficiency.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/equipmentsaving.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/equipmentenergyitem.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/storeload.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/microgriddetails.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/spaceload.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/storecarbon.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/storecarbon.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/combinedequipmentload.py - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                          for j in range(len(line.series)):
                                              line.series[j].marker.symbol = "circle"
                                              line.series[j].smooth = True
                                          line.x_axis.crosses = 'min'
                      Severity: Major
                      Found in myems-api/excelexporters/spacesaving.py - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                            for j in range(0, ca_len):
                                                current_col_number += 1
                                                col = format_cell.get_column_letter(current_col_number)
                        
                                                ws[col + str(current_row_number)].font = title_font
                        Severity: Major
                        Found in myems-api/excelexporters/spacecarbon.py - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                              for j in range(0, reporting_period_data_ca_len):
                                                  current_col_number += 1
                                                  col = format_cell.get_column_letter(current_col_number)
                          
                                                  ws[col + str(current_row_number)].font = title_font
                          Severity: Major
                          Found in myems-api/excelexporters/spacecarbon.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/spacecost.py - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                  for j in range(0, reporting_period_data_ca_len):
                                                      current_col_number += 1
                                                      col = format_cell.get_column_letter(current_col_number)
                              
                                                      ws[col + str(current_row_number)].font = title_font
                              Severity: Major
                              Found in myems-api/excelexporters/spacesaving.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/spaceoutput.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/storestatistics.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/spaceoutput.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/combinedequipmentload.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/spacecost.py - About 45 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language