Skip to content

Commit 41c713c

Browse files
committed
black
1 parent b871068 commit 41c713c

5 files changed

Lines changed: 16 additions & 12 deletions

File tree

demos/config.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,7 @@ class DEMOSConfig(BaseModel):
186186
kids_moving_module_config: KidsMovingModuleConfig = Field(
187187
default_factory=KidsMovingModuleConfig
188188
)
189-
income_module_config: IncomeModuleConfig = Field(
190-
default_factory=IncomeModuleConfig
191-
)
189+
income_module_config: IncomeModuleConfig = Field(default_factory=IncomeModuleConfig)
192190

193191
def model_post_init(self, __context) -> None:
194192
if self.output_fname is None:

demos/models/household_reorg.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,9 @@ def update_cohabitating_households(
851851
households.local.loc[new_households, module_config.geoid_col] = geoid_assignment
852852
county_assignment = households.local.loc[old_household_id, "lcm_county_id"].values
853853
households.local.loc[new_households, "lcm_county_id"] = county_assignment
854-
not_met_area_assignment = households.local.loc[old_household_id, "not_met_area"].values
854+
not_met_area_assignment = households.local.loc[
855+
old_household_id, "not_met_area"
856+
].values
855857
households.local.loc[new_households, "not_met_area"] = not_met_area_assignment
856858

857859

demos/models/income.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,11 @@ def run_and_calibrate_income_model(households):
3232

3333
# Calibrate if needed
3434
if income_config.calibration_procedure is not None:
35-
predicted = np.exp(income_config.calibration_procedure.calibrate_and_run_model(
36-
model, model_data
37-
))
35+
predicted = np.exp(
36+
income_config.calibration_procedure.calibrate_and_run_model(
37+
model, model_data
38+
)
39+
)
3840
else:
3941
predicted = np.exp(model.predict(model_data))
4042

@@ -107,9 +109,7 @@ def _apply_inflation_adjustment(
107109
f"years: {missing}. Ensure the table covers all simulation years."
108110
)
109111

110-
cumulative_factor = float(
111-
(1 + adj_table.loc[list(years), "adjustment"]).prod()
112-
)
112+
cumulative_factor = float((1 + adj_table.loc[list(years), "adjustment"]).prod())
113113
if not forward:
114114
cumulative_factor = 1.0 / cumulative_factor
115115

demos/models/kids_moving.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,9 @@ def update_households_after_kids(persons, households, kids_moving, get_new_house
126126
].values
127127
county_assignment = households.local.loc[old_household_id, "lcm_county_id"].values
128128

129-
not_met_area_assignment = households.local.loc[old_household_id, "not_met_area"].values
129+
not_met_area_assignment = households.local.loc[
130+
old_household_id, "not_met_area"
131+
].values
130132

131133
new_households = get_new_households(kids_moving_index.sum())
132134
persons.local.loc[kids_moving_index, "household_id"] = new_households

demos/models/marriage.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,9 @@ def update_divorce(persons, households, divorce_list, get_new_households):
310310
households.local.loc[new_households, module_config.geoid_col] = geoid_assignment
311311
county_assignment = households.local.loc[old_household_id, "lcm_county_id"].values
312312
households.local.loc[new_households, "lcm_county_id"] = county_assignment
313-
not_met_area_assignment = households.local.loc[old_household_id, "not_met_area"].values
313+
not_met_area_assignment = households.local.loc[
314+
old_household_id, "not_met_area"
315+
].values
314316
households.local.loc[new_households, "not_met_area"] = not_met_area_assignment
315317

316318
## Updates for people staying

0 commit comments

Comments
 (0)