Skip to content

Commit c4425ad

Browse files
authored
chore: fix formatting options and VSCode autopep8 extension (#32)
1 parent a4927fe commit c4425ad

4 files changed

Lines changed: 7 additions & 5 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
with:
1919
enable-cache: true
2020
- name: Format
21-
run: uv run autopep8 --exit-code --diff .
21+
run: uv run autopep8 --recursive --exit-code --diff .
2222
- name: Lint
2323
run: uv run ruff check
2424
- name: Test

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ upgrade::
1212
uv lock --upgrade
1313

1414
lint::
15-
uv run autopep8 . --in-place
15+
uv run autopep8 --in-place --recursive .
1616
uv run ruff check --fix
1717

1818
test::

pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ dev = [
3131

3232
[tool.autopep8]
3333
max_line_length = 160
34-
recursive = true
34+
# Can't set recursive here as it breaks
35+
# the autopep8 extension for VSCode
36+
# recursive = true
3537

3638
[tool.ruff]
3739
line-length = 160

src/evopt/optimizer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,8 @@ def _setup_target_function(self):
189189
if bat.p_demand is not None:
190190
for t in self.time_steps:
191191
objective += - self.goal_penalty_power \
192-
* self.variables['p_demand_pen'][i][t] \
193-
* (1 + (self.T - t) / self.T)
192+
* self.variables['p_demand_pen'][i][t] \
193+
* (1 + (self.T - t) / self.T)
194194

195195
# Secondary strategies to implement preferences without impact to actual cost
196196
# prefer charging first, then grid export

0 commit comments

Comments
 (0)