Showing 5,781 of 10,536 total issues

Avoid deeply nested control flow statements.
Open

                    if common_start_datetime_utc < min(energy_hourly.keys()):
                        common_start_datetime_utc = min(energy_hourly.keys())
                    if common_end_datetime_utc > max(energy_hourly.keys()):
Severity: Major
Found in myems-aggregation/space_energy_input_category.py - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                        if common_end_datetime_utc > max(energy_hourly.keys()):
                            common_end_datetime_utc = max(energy_hourly.keys())
    
    
    Severity: Major
    Found in myems-aggregation/space_energy_input_category.py - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                          if common_end_datetime_utc > max(energy_hourly.keys()):
                              common_end_datetime_utc = max(energy_hourly.keys())
      
      
      Severity: Major
      Found in myems-aggregation/space_energy_input_category.py - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                            if current_tariff is not None \
                                    and isinstance(current_tariff, Decimal) \
                                    and current_energy is not None \
                                    and isinstance(current_energy, Decimal):
                                billing_dict[current_datetime_utc] = current_energy * current_tariff
        Severity: Major
        Found in myems-aggregation/microgrid_billing_charge.py - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                              if common_end_datetime_utc > max(energy_hourly.keys()):
                                  common_end_datetime_utc = max(energy_hourly.keys())
          
          
          Severity: Major
          Found in myems-aggregation/space_energy_input_category.py - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                    for energy_category_id, actual_value in meta_data_dict.items():
                                        aggregated_value['meta_data'][energy_category_id] = \
                                            aggregated_value['meta_data'].get(energy_category_id, Decimal(0.0)) + actual_value
            
            
            Severity: Major
            Found in myems-aggregation/space_energy_input_category.py - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                  if common_end_datetime_utc > max(energy_hourly.keys()):
                                      common_end_datetime_utc = max(energy_hourly.keys())
              
              
              Severity: Major
              Found in myems-aggregation/combined_equipment_energy_input_item.py - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                    if common_end_datetime_utc > max(energy_hourly.keys()):
                                        common_end_datetime_utc = max(energy_hourly.keys())
                
                
                Severity: Major
                Found in myems-aggregation/combined_equipment_energy_input_item.py - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                      if common_start_datetime_utc < min(energy_hourly.keys()):
                                          common_start_datetime_utc = min(energy_hourly.keys())
                                      if common_end_datetime_utc > max(energy_hourly.keys()):
                  Severity: Major
                  Found in myems-aggregation/combined_equipment_energy_input_item.py - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                        if common_end_datetime_utc > max(energy_hourly.keys()):
                                            common_end_datetime_utc = max(energy_hourly.keys())
                    
                    
                    Severity: Major
                    Found in myems-aggregation/store_energy_input_item.py - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                          if common_end_datetime_utc > max(energy_hourly.keys()):
                                              common_end_datetime_utc = max(energy_hourly.keys())
                      
                      
                      Severity: Major
                      Found in myems-aggregation/combined_equipment_energy_input_item.py - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                            if common_start_datetime_utc < min(energy_hourly.keys()):
                                                common_start_datetime_utc = min(energy_hourly.keys())
                                            if common_end_datetime_utc > max(energy_hourly.keys()):
                        Severity: Major
                        Found in myems-aggregation/space_energy_input_category.py - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                              if common_end_datetime_utc > max(energy_hourly.keys()):
                                                  common_end_datetime_utc = max(energy_hourly.keys())
                          
                          
                          Severity: Major
                          Found in myems-aggregation/store_energy_input_item.py - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                    if current_datetime_utc not in energy_store_hourly[store_id]:
                                                        energy_store_hourly[store_id][current_datetime_utc] = dict()
                                                    energy_category_id = row_energy_value[1]
                            Severity: Major
                            Found in myems-aggregation/space_energy_input_category.py - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                  if common_start_datetime_utc < min(energy_hourly.keys()):
                                                      common_start_datetime_utc = min(energy_hourly.keys())
                                                  if common_end_datetime_utc > max(energy_hourly.keys()):
                              Severity: Major
                              Found in myems-aggregation/space_energy_output_category.py - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                    if common_end_datetime_utc > max(energy_hourly.keys()):
                                                        common_end_datetime_utc = max(energy_hourly.keys())
                                
                                
                                Severity: Major
                                Found in myems-aggregation/equipment_energy_input_category.py - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                      if current_factor is not None \
                                                              and isinstance(current_factor, Decimal) \
                                                              and current_energy is not None \
                                                              and isinstance(current_energy, Decimal):
                                                          aggregated_value['actual_value'] = current_energy * current_factor
                                  Severity: Major
                                  Found in myems-aggregation/offline_meter_carbon.py - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                        if common_end_datetime_utc > max(energy_hourly.keys()):
                                                            common_end_datetime_utc = max(energy_hourly.keys())
                                    
                                    
                                    Severity: Major
                                    Found in myems-aggregation/equipment_energy_input_category.py - About 45 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                                          if common_end_datetime_utc > max(energy_hourly.keys()):
                                                              common_end_datetime_utc = max(energy_hourly.keys())
                                      
                                      
                                      Severity: Major
                                      Found in myems-aggregation/space_energy_input_category.py - About 45 mins to fix

                                        Avoid deeply nested control flow statements.
                                        Open

                                                            if common_start_datetime_utc < min(energy_hourly.keys()):
                                                                common_start_datetime_utc = min(energy_hourly.keys())
                                                            if common_end_datetime_utc > max(energy_hourly.keys()):
                                        Severity: Major
                                        Found in myems-aggregation/store_energy_input_item.py - About 45 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language