Skip to content

Commit db883e1

Browse files
committed
Remove instances of trailing whitespace + whitespace on new lines
1 parent d772561 commit db883e1

15 files changed

+47
-47
lines changed

Diff for: src/scripts/healthsystem/impact_of_const_capabilities_expansion/scenario_impact_of_capabilities_expansion_combined.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def _get_scenarios(self) -> Dict[str, Dict]:
8686
},
8787
}
8888
),
89-
89+
9090
"GDP growth":
9191
mix_scenarios(
9292
get_parameters_for_status_quo(),
@@ -105,7 +105,7 @@ def _get_scenarios(self) -> Dict[str, Dict]:
105105
},
106106
}
107107
),
108-
108+
109109
"GDP growth fHE growth case 1":
110110
mix_scenarios(
111111
get_parameters_for_status_quo(),
@@ -124,7 +124,7 @@ def _get_scenarios(self) -> Dict[str, Dict]:
124124
},
125125
}
126126
),
127-
127+
128128
"GDP growth fHE growth case 3":
129129
mix_scenarios(
130130
get_parameters_for_status_quo(),
@@ -143,7 +143,7 @@ def _get_scenarios(self) -> Dict[str, Dict]:
143143
},
144144
}
145145
),
146-
146+
147147
"GDP growth fHE growth case 4":
148148
mix_scenarios(
149149
get_parameters_for_status_quo(),
@@ -162,7 +162,7 @@ def _get_scenarios(self) -> Dict[str, Dict]:
162162
},
163163
}
164164
),
165-
165+
166166
"GDP growth fHE growth case 6":
167167
mix_scenarios(
168168
get_parameters_for_status_quo(),
@@ -181,7 +181,7 @@ def _get_scenarios(self) -> Dict[str, Dict]:
181181
},
182182
}
183183
),
184-
184+
185185
"GDP growth FL case 1 const i":
186186
mix_scenarios(
187187
get_parameters_for_status_quo(),
@@ -200,7 +200,7 @@ def _get_scenarios(self) -> Dict[str, Dict]:
200200
},
201201
}
202202
),
203-
203+
204204
"GDP growth FL case 2 const i":
205205
mix_scenarios(
206206
get_parameters_for_status_quo(),
@@ -219,7 +219,7 @@ def _get_scenarios(self) -> Dict[str, Dict]:
219219
},
220220
}
221221
),
222-
222+
223223
"GDP growth FL case 1 vary i":
224224
mix_scenarios(
225225
get_parameters_for_status_quo(),
@@ -238,7 +238,7 @@ def _get_scenarios(self) -> Dict[str, Dict]:
238238
},
239239
}
240240
),
241-
241+
242242
"GDP growth FL case 2 vary i":
243243
mix_scenarios(
244244
get_parameters_for_status_quo(),

Diff for: src/scripts/healthsystem/impact_of_const_capabilities_expansion/scenario_impact_of_capabilities_expansion_scaling.py

+16-16
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ def draw_parameters(self, draw_number, rng):
7070
def _get_scenarios(self) -> Dict[str, Dict]:
7171
"""Return the Dict with values for the parameters that are changed, keyed by a name for the scenario.
7272
"""
73-
73+
7474
self.YEAR_OF_CHANGE = 2019
7575

7676
return {
77-
77+
7878
# =========== STATUS QUO ============
7979
"No growth status quo":
8080
mix_scenarios(
@@ -85,7 +85,7 @@ def _get_scenarios(self) -> Dict[str, Dict]:
8585
},
8686
}
8787
),
88-
88+
8989
"GDP growth status quo":
9090
mix_scenarios(
9191
self._baseline(),
@@ -95,7 +95,7 @@ def _get_scenarios(self) -> Dict[str, Dict]:
9595
},
9696
}
9797
),
98-
98+
9999
"GDP growth fHE growth case 1 status quo":
100100
mix_scenarios(
101101
self._baseline(),
@@ -105,7 +105,7 @@ def _get_scenarios(self) -> Dict[str, Dict]:
105105
},
106106
}
107107
),
108-
108+
109109
"GDP growth fHE growth case 3 status quo":
110110
mix_scenarios(
111111
self._baseline(),
@@ -116,7 +116,7 @@ def _get_scenarios(self) -> Dict[str, Dict]:
116116
}
117117
),
118118

119-
119+
120120
"GDP growth fHE growth case 4 status quo":
121121
mix_scenarios(
122122
self._baseline(),
@@ -136,7 +136,7 @@ def _get_scenarios(self) -> Dict[str, Dict]:
136136
},
137137
}
138138
),
139-
139+
140140
# =========== PERFECT CONSUMABLES AVAILABILITY ============
141141
"No growth perfect consumables":
142142
mix_scenarios(
@@ -149,7 +149,7 @@ def _get_scenarios(self) -> Dict[str, Dict]:
149149
},
150150
}
151151
),
152-
152+
153153
"GDP growth perfect consumables":
154154
mix_scenarios(
155155
self._baseline(),
@@ -161,7 +161,7 @@ def _get_scenarios(self) -> Dict[str, Dict]:
161161
},
162162
}
163163
),
164-
164+
165165
"GDP growth fHE growth case 1 perfect consumables":
166166
mix_scenarios(
167167
self._baseline(),
@@ -173,7 +173,7 @@ def _get_scenarios(self) -> Dict[str, Dict]:
173173
},
174174
}
175175
),
176-
176+
177177
"GDP growth fHE growth case 3 perfect consumables":
178178
mix_scenarios(
179179
self._baseline(),
@@ -186,7 +186,7 @@ def _get_scenarios(self) -> Dict[str, Dict]:
186186
}
187187
),
188188

189-
189+
190190
"GDP growth fHE growth case 4 perfect consumables":
191191
mix_scenarios(
192192
self._baseline(),
@@ -227,7 +227,7 @@ def _get_scenarios(self) -> Dict[str, Dict]:
227227
},
228228
}
229229
),
230-
230+
231231
"GDP growth perfect healthsystem":
232232
mix_scenarios(
233233
self._baseline(),
@@ -243,7 +243,7 @@ def _get_scenarios(self) -> Dict[str, Dict]:
243243
},
244244
}
245245
),
246-
246+
247247
"GDP growth fHE growth case 1 perfect healthsystem":
248248
mix_scenarios(
249249
self._baseline(),
@@ -259,7 +259,7 @@ def _get_scenarios(self) -> Dict[str, Dict]:
259259
},
260260
}
261261
),
262-
262+
263263
"GDP growth fHE growth case 3 perfect healthsystem":
264264
mix_scenarios(
265265
self._baseline(),
@@ -276,7 +276,7 @@ def _get_scenarios(self) -> Dict[str, Dict]:
276276
}
277277
),
278278

279-
279+
280280
"GDP growth fHE growth case 4 perfect healthsystem":
281281
mix_scenarios(
282282
self._baseline(),
@@ -310,7 +310,7 @@ def _get_scenarios(self) -> Dict[str, Dict]:
310310
),
311311

312312
}
313-
313+
314314
def _baseline(self) -> Dict:
315315
"""Return the Dict with values for the parameter changes that define the baseline scenario. """
316316
return mix_scenarios(

Diff for: src/scripts/healthsystem/impact_of_const_capabilities_expansion/scenario_impact_of_capabilities_expansion_test_scaling.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def _get_scenarios(self) -> Dict[str, Dict]:
8686
},
8787
}
8888
),
89-
89+
9090
"GDP growth":
9191
mix_scenarios(
9292
get_parameters_for_status_quo(),
@@ -105,7 +105,7 @@ def _get_scenarios(self) -> Dict[str, Dict]:
105105
},
106106
}
107107
),
108-
108+
109109
"GDP growth fHE growth case 1":
110110
mix_scenarios(
111111
get_parameters_for_status_quo(),
@@ -124,7 +124,7 @@ def _get_scenarios(self) -> Dict[str, Dict]:
124124
},
125125
}
126126
),
127-
127+
128128
"GDP growth fHE growth case 6":
129129
mix_scenarios(
130130
get_parameters_for_status_quo(),

Diff for: src/scripts/profiling/run_profiling.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ def run_profiling(
295295
print(f"Writing {output_ipysession_file}", end="...", flush=True)
296296
scale_run_session.save(output_ipysession_file)
297297
print("done")
298-
298+
299299
if write_flat_html:
300300
output_html_file = output_dir / f"{output_name}.flat.html"
301301
console_renderer = ConsoleRenderer(

Diff for: src/scripts/profiling/scale_run.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ def save_arguments_to_json(arguments_dict: dict, output_path: Path):
2626
with open(output_path, "w") as f:
2727
json.dump(
2828
{
29-
k: str(v) if isinstance(v, Path) else v
29+
k: str(v) if isinstance(v, Path) else v
3030
for k, v in arguments_dict.items()
31-
},
32-
f,
31+
},
32+
f,
3333
indent=4
3434
)
3535

Diff for: src/scripts/task_runner/generate_html.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ def get_html_for_commit(commit_dir: Path) -> str:
101101
<body>
102102
<h1>$title</h1>
103103
<p style="font-size: small;">
104-
This page was generated on $generated_time. The
105-
<a href="https://github.com/UCL/TLOmodel/actions/workflows/calibration.yaml">calibration workflow</a> runs every
104+
This page was generated on $generated_time. The
105+
<a href="https://github.com/UCL/TLOmodel/actions/workflows/calibration.yaml">calibration workflow</a> runs every
106106
night on the latest new commit on the master branch. <a href="#" id="toggleIncomplete">toggle incomplete</a>
107107
</p>
108108
$body

Diff for: src/tlo/analysis/utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1131,7 +1131,7 @@ def get_parameters_for_status_quo() -> Dict:
11311131
"equip_availability": "all", # <--- NB. Existing calibration is assuming all equipment is available
11321132
},
11331133
}
1134-
1134+
11351135
def get_parameters_for_standard_mode2_runs() -> Dict:
11361136
"""
11371137
Returns a dictionary of parameters and their updated values to indicate

Diff for: src/tlo/core.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def _default_value(self) -> Any:
170170
"""
171171
Default value for this property, which will be used to fill the respective columns
172172
of the population dataframe, for example.
173-
173+
174174
If not explicitly set, it will fall back on the ``PANDAS_TYPE_DEFAULT_TYPE_MAP``.
175175
If a value is provided, it must:
176176
@@ -386,8 +386,8 @@ def initialise_population(self, population: Population) -> None:
386386
387387
Modules that wish to implement this behaviour do not need to implement this method,
388388
it will be inherited automatically. Modules that wish to perform additional steps
389-
during the initialise_population stage should reimplement this method and call
390-
389+
during the initialise_population stage should reimplement this method and call
390+
391391
```python
392392
super().initialise_population(population=population)
393393
```

Diff for: src/tlo/logging/helpers.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ def get_dataframe_row_as_dict_for_logging(
5959
columns: Optional[Iterable[str]] = None,
6060
) -> dict:
6161
"""Get row of a pandas dataframe in a format suitable for logging.
62-
62+
6363
Retrieves entries for all or a subset of columns for a particular row in a dataframe
6464
and returns a dict keyed by column name, with values NumPy or pandas extension types
6565
which should be the same for all rows in dataframe.
66-
66+
6767
:param dataframe: Population properties dataframe to get properties from.
6868
:param row_label: Unique index label identifying row in dataframe.
6969
:param columns: Set of column names to extract - if ``None``, the default, all

Diff for: src/tlo/methods/alri.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3040,7 +3040,7 @@ def apply(self, person_id):
30403040

30413041
assert 'fast_breathing_pneumonia' == \
30423042
self.module.get_imci_classification_based_on_symptoms(
3043-
child_is_younger_than_2_months=False,
3043+
child_is_younger_than_2_months=False,
30443044
symptoms=self.sim.modules['SymptomManager'].has_what(person_id=person_id)
30453045
)
30463046

Diff for: src/tlo/methods/consumables.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ def _lookup_availability_of_consumables(self,
266266

267267
def on_simulation_end(self):
268268
"""Do tasks at the end of the simulation.
269-
269+
270270
Raise warnings and enter to log about item_codes not recognised.
271271
"""
272272
if self._not_recognised_item_codes:

Diff for: src/tlo/methods/demography.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def __init__(self, name=None, resourcefilepath=None, equal_allocation_by_distric
134134
),
135135

136136
'district_num_of_residence': Property(
137-
Types.CATEGORICAL,
137+
Types.CATEGORICAL,
138138
'The district number in which the person is resident',
139139
categories=['SET_AT_RUNTIME']
140140
),

Diff for: src/tlo/population.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ def individual_properties(
212212
In this case on exit from the ``with`` block in which the context is entered,
213213
any updates to the individual properties will be written back to the population
214214
dataframe.
215-
215+
216216
Once the ``with`` block in which the context is entered has been exited the view
217217
returned will raise an error on any subsequent attempts at reading or writing
218218
properties.

Diff for: tests/test_healthburden.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def test_arithmetic_of_disability_aggregation_calcs(seed):
131131
rfp = Path(os.path.dirname(__file__)) / '../resources'
132132

133133
class ModuleWithPersonsAffected(Module):
134-
134+
135135
def __init__(self, persons_affected, name=None):
136136
super().__init__(name=name)
137137
self.persons_affected = persons_affected
@@ -249,7 +249,7 @@ def report_daly_values(self):
249249
DiseaseThatCausesB(persons_affected=1),
250250
DiseaseThatCausesAandB(persons_affected=2),
251251
# intentionally two instances of DiseaseThatCausesC
252-
DiseaseThatCausesC(persons_affected=3, name='DiseaseThatCausesC1'),
252+
DiseaseThatCausesC(persons_affected=3, name='DiseaseThatCausesC1'),
253253
DiseaseThatCausesC(persons_affected=3, name='DiseaseThatCausesC2'),
254254
DiseaseThatCausesNothing(),
255255
# Disable sorting to allow registering multiple instances of DiseaseThatCausesC

Diff for: tests/test_symptommanager.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ def test_has_what_via_individual_properties(seed, supply_disease_module: bool):
237237
5 0 1 0
238238
6 0 0 1
239239
7 0 0 0
240-
240+
241241
We will then assert that has_what returns the expected symptoms for the
242242
individuals, and that supplying either the person_id keyword or the
243243
individual_properties keyword gives the same answer.

0 commit comments

Comments
 (0)