Skip to content

Commit

Permalink
chore: lint modules
Browse files Browse the repository at this point in the history
  • Loading branch information
rouille committed Dec 11, 2023
1 parent cb1c409 commit 8fa55c0
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 9 deletions.
4 changes: 1 addition & 3 deletions src/data_cleaning.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import pandas as pd
import numpy as np
import os
import sqlalchemy as sa

import pudl.analysis.allocate_gen_fuel as allocate_gen_fuel
import pudl.analysis.epacamd_eia as epacamd_eia
Expand All @@ -12,7 +10,7 @@
import emissions
from emissions import CLEAN_FUELS
from column_checks import get_dtypes, apply_dtypes
from filepaths import manual_folder, outputs_folder, downloads_folder
from filepaths import manual_folder, outputs_folder
from logging_util import get_logger

logger = get_logger(__name__)
Expand Down
2 changes: 1 addition & 1 deletion src/eia930.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# Tell gridemissions where to find config before we load gridemissions
os.environ["GRIDEMISSIONS_CONFIG_FILE_PATH"] = top_folder("config/gridemissions.json")

from gridemissions.workflows import make_dataset
from gridemissions.workflows import make_dataset # noqa E402

logger = get_logger(__name__)

Expand Down
3 changes: 1 addition & 2 deletions src/gross_to_net_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import os
import pandas as pd
import statsmodels.formula.api as smf
import sqlalchemy as sa
import warnings

# import pudl packages
Expand All @@ -13,7 +12,7 @@
import data_cleaning
import validation
from column_checks import get_dtypes
from filepaths import outputs_folder, downloads_folder
from filepaths import outputs_folder
from logging_util import get_logger

logger = get_logger(__name__)
Expand Down
1 change: 0 additions & 1 deletion src/load_data.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import pandas as pd
import numpy as np
import os
import sqlalchemy as sa
import warnings
from pathlib import Path
Expand Down
2 changes: 1 addition & 1 deletion src/output_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ def write_power_sector_results(ba_fuel_data, path_prefix, skip_outputs):

if not skip_outputs:
for ba in list(ba_fuel_data.ba_code.unique()):
if type(ba) is not str:
if not isinstance(ba, str):
logger.warning(
f"not aggregating {sum(ba_fuel_data.ba_code.isna())} plants with numeric BA {ba}"
)
Expand Down
2 changes: 1 addition & 1 deletion src/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def check_for_orphaned_cc_part_in_subplant(subplant_crosswalk):
"prime_mover_code"
].agg(["unique"])
cc_subplants["unique_cc_pms"] = [
",".join(map(str, l)) for l in cc_subplants["unique"]
",".join(map(str, L)) for L in cc_subplants["unique"]
]
cc_subplants = cc_subplants.drop(columns="unique")
# identify where there are subplants that only contain a single CC part
Expand Down

0 comments on commit 8fa55c0

Please sign in to comment.