Skip to content

Commit ddabc2f

Browse files
fix(inverter): restore indentation lost applying a Copilot autofix
604e43a took Copilot's suggestion to reuse is_entity_id() in is_real_entity_configured(), but the applied patch put the return at column 0, dedenting it out of the method and making the whole file unparseable - black and ruff both failed on the syntax error rather than on anything stylistic. Restore the indentation and fold the now-unused `value` local into the return, which ruff's F841 would otherwise flag. The refactor itself was correct: is_entity_id() is exactly the isinstance/"." test it replaced. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent 604e43a commit ddabc2f

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎apps/predbat/inverter.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,8 +313,7 @@ def is_real_entity_configured(self, arg):
313313
values = self.base.args.get(arg)
314314
if not isinstance(values, list) or self.id >= len(values):
315315
return False
316-
value = values[self.id]
317-
return is_entity_id(values[self.id])
316+
return is_entity_id(values[self.id])
318317

319318
def __init__(self, base, id=0, quiet=False):
320319
"""

0 commit comments

Comments
 (0)