Showing 5,781 of 10,536 total issues
Avoid deeply nested control flow statements. Open
Open
if common_end_datetime_utc > max(energy_hourly.keys()):
common_end_datetime_utc = max(energy_hourly.keys())
Avoid deeply nested control flow statements. Open
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()):
Avoid deeply nested control flow statements. Open
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
Avoid deeply nested control flow statements. Open
Open
if aggregated_value['actual_value'] is not None and \
isinstance(aggregated_value['actual_value'], Decimal):
add_values += " (" + str(offline_meter['id']) + ","
add_values += "'" + aggregated_value['start_datetime_utc'].isoformat()[0:19] + "',"
add_values += str(aggregated_value['actual_value']) + "), "
Avoid deeply nested control flow statements. Open
Open
if common_end_datetime_utc > max(energy_hourly.keys()):
common_end_datetime_utc = max(energy_hourly.keys())
Avoid deeply nested control flow statements. Open
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
Avoid deeply nested control flow statements. Open
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()):
Avoid deeply nested control flow statements. Open
Open
if current_datetime_utc not in energy_child_space_hourly[child_space_id]:
energy_child_space_hourly[child_space_id][current_datetime_utc] = dict()
energy_category_id = row_energy_value[1]
Avoid deeply nested control flow statements. Open
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
Avoid deeply nested control flow statements. Open
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()):
Avoid deeply nested control flow statements. Open
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
Avoid deeply nested control flow statements. Open
Open
if current_billing is not None and isinstance(current_billing, Decimal):
add_values += " (" + str(energy_storage_power_station['id']) + ","
add_values += "'" + current_datetime_utc.isoformat()[0:19] + "',"
add_values += str(current_billing) + "), "
print("add_values:" + add_values)
Avoid deeply nested control flow statements. Open
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
Avoid deeply nested control flow statements. Open
Open
if current_factor is not None \
and isinstance(current_factor, Decimal) \
and current_energy is not None \
and isinstance(current_energy, Decimal):
carbon_dict[current_datetime_utc] = current_energy * current_factor
Avoid deeply nested control flow statements. Open
Open
if current_billing is not None and isinstance(current_billing, Decimal):
add_values += " (" + str(microgrid['id']) + ","
add_values += "'" + current_datetime_utc.isoformat()[0:19] + "',"
add_values += str(current_billing) + "), "
print("add_values:" + add_values)
Avoid deeply nested control flow statements. Open
Open
for energy_category_id in energy_category_list:
current_factor = factor_dict[energy_category_id]
current_energy = energy_dict[current_datetime_utc].get(energy_category_id)
if current_factor is not None \
and isinstance(current_factor, Decimal) \
Avoid deeply nested control flow statements. Open
Open
if current_datetime_utc not in energy_tenant_hourly[tenant_id]:
energy_tenant_hourly[tenant_id][current_datetime_utc] = dict()
energy_category_id = row_energy_value[1]
Avoid deeply nested control flow statements. Open
Open
if common_end_datetime_utc > max(energy_hourly.keys()):
common_end_datetime_utc = max(energy_hourly.keys())
Avoid deeply nested control flow statements. Open
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()):
Avoid deeply nested control flow statements. Open
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()):