Skip to content

Commit

Permalink
chore: lint modules
Browse files Browse the repository at this point in the history
  • Loading branch information
rouille committed Nov 30, 2023
1 parent c3763ce commit 43a3597
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 9 deletions.
1 change: 0 additions & 1 deletion src/column_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,6 @@ def get_dtypes():
"equipment_tech_description": "str",
"pm_control_id": "str",
"so2_control_id": "str",
"nox_control_id": "str",
"hg_control_id": "str",
"operational_status": "str",
"hours_in_service": "float64",
Expand Down
1 change: 0 additions & 1 deletion src/data_cleaning.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 pudl.analysis.allocate_net_gen as allocate_gen_fuel
Expand Down
3 changes: 2 additions & 1 deletion src/eia930.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
# 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
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
6 changes: 2 additions & 4 deletions test/test_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@
sys.path.append("../src")
sys.path.append("..")

import src.eia930 as eia930
from src.filepaths import top_folder

from src.logging_util import get_logger, configure_root_logger
from src.filepaths import top_folder # noqa E402
from src.logging_util import get_logger, configure_root_logger # noqa E402

pudl_logger = logging.getLogger(name="catalystcoop.pudl")

Expand Down

0 comments on commit 43a3597

Please sign in to comment.