3
0
Fork 0

fix: fix 'assignment-from-none' for pylint

This commit is contained in:
Lance Edgar 2025-08-30 19:07:41 -05:00
parent 3a263d272c
commit 6ac1cacdb3
2 changed files with 3 additions and 2 deletions

View file

@ -4,6 +4,7 @@
disable=all
enable=anomalous-backslash-in-string,
assignment-from-no-return,
assignment-from-none,
bare-except,
broad-exception-caught,
dangerous-default-value,

View file

@ -468,11 +468,11 @@ class BatchHandler(GenericHandler):
if batch.executed:
raise ValueError(f"batch has already been executed: {batch}")
reason = self.why_not_execute(batch, user=user, **kwargs)
reason = self.why_not_execute(batch, user=user, **kwargs) # pylint: disable=assignment-from-none
if reason:
raise RuntimeError(f"batch execution not allowed: {reason}")
result = self.execute(batch, user=user, progress=progress, **kwargs)
result = self.execute(batch, user=user, progress=progress, **kwargs) # pylint: disable=assignment-from-none
batch.executed = datetime.datetime.now()
batch.executed_by = user
return result