Skip to content

Commit

Permalink
Updated formatting with new black version
Browse files Browse the repository at this point in the history
  • Loading branch information
s-simoncelli committed Feb 17, 2024
1 parent 4d0fff6 commit 5ec91f9
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 15 deletions.
6 changes: 3 additions & 3 deletions pywr_editor/form/parameter_form.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ def __init__(
# (for example for table and external file)
self.clean_keys()
self.section_form_data["parameter_obj"] = self.parameter_obj
self.section_form_data[
"enable_optimisation_section"
] = enable_optimisation_section
self.section_form_data["enable_optimisation_section"] = (
enable_optimisation_section
)
self.params_data = model_config.pywr_parameter_data
self.show_warning = False

Expand Down
6 changes: 3 additions & 3 deletions pywr_editor/form/recorder_form.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ def __init__(
# (for example for table and external file)
self.clean_keys()
self.section_form_data["recorder_obj"] = self.recorder_obj
self.section_form_data[
"enable_optimisation_section"
] = enable_optimisation_section
self.section_form_data["enable_optimisation_section"] = (
enable_optimisation_section
)
self.recorders_data = self.model_config.pywr_recorder_data
self.show_warning = False

Expand Down
6 changes: 3 additions & 3 deletions pywr_editor/model/model_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,9 +492,9 @@ def schematic_size(self) -> list[float]:
return self.editor_config[schematic_size_key]
else:
# store the schematic size if it is not set or wrong
self.editor_config[
Constants.SCHEMATIC_SIZE_KEY.value
] = default_schematic_size
self.editor_config[Constants.SCHEMATIC_SIZE_KEY.value] = (
default_schematic_size
)
return default_schematic_size

def update_schematic_size(self, size: list[float]) -> None:
Expand Down
6 changes: 3 additions & 3 deletions tests/json_models/files/custom_parameter.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ def after(self):
timestep = self.model.timestepper.current # get current timestep
flow_during_timestep = self._node.flow * timestep.days # see explanation below
self._remaining -= flow_during_timestep
self._remaining[
self._remaining < 0
] = 0 # volume remaining cannot be less than zero
self._remaining[self._remaining < 0] = (
0 # volume remaining cannot be less than zero
)

@classmethod
def load(cls, model, data):
Expand Down
4 changes: 1 addition & 3 deletions tests/widgets/test_line_edit_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,7 @@ def test_invalid(self, qtbot, model_config, param_name, message):
assert "must provide a valid parameter" in validation_obj.error_message

@staticmethod
def add_parameter_with_checks(
qtbot, model_config
) -> [
def add_parameter_with_checks(qtbot, model_config) -> [
ParameterLineEditWidget,
ModelComponentPickerDialog,
ParametersDialog,
Expand Down

0 comments on commit 5ec91f9

Please sign in to comment.