Skip to content

Commit d4bc1fe

Browse files
committed
ran pre-commit
1 parent 397e512 commit d4bc1fe

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

codecarbon/core/emissions.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,7 @@ def get_private_infra_emissions(self, energy: Energy, geo: GeoMetadata) -> float
179179
geo.country_iso_code.upper() if geo.country_iso_code is not None else None
180180
)
181181
compute_with_regional_data: bool = (geo.region is not None) and (
182-
country_iso_code in ["USA", "CAN"]
183-
or self._is_supported_nordic_region(geo)
182+
country_iso_code in ["USA", "CAN"] or self._is_supported_nordic_region(geo)
184183
)
185184

186185
if compute_with_regional_data:

tests/test_emissions.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -320,9 +320,7 @@ def test_nordic_admin_regions_fall_back_to_country_without_regional_lookup(self)
320320

321321
def test_nordic_region_missing_static_data_falls_back_to_country(self):
322322
energy = Energy.from_energy(kWh=1.0)
323-
geo = GeoMetadata(
324-
country_iso_code="SWE", country_name="Sweden", region="SE2"
325-
)
323+
geo = GeoMetadata(country_iso_code="SWE", country_name="Sweden", region="SE2")
326324
expected_emissions = self._emissions.get_country_emissions(energy, geo)
327325

328326
with (

0 commit comments

Comments
 (0)