Closed stevenhua0320 closed 5 months ago
For this one, please can you try and run tests and make sure they pass? Let me know here on the PR and when tests pass I can merge.
for the E722, I am not sure how that would fail and raise an exception. I will try and play with it a bit.
@stevenhua0320 I think we can just remove that try except clause, so it becomes
if index:
task["preamble"] = (
f"({task.get('importance')})({task.get('days_to_due')} days): ({task.get('running_index', 0)}) "
)
else:
task["preamble"] = ""
@stevenhua0320 I think we can just remove that try except clause, so it becomes
if index: task["preamble"] = ( f"({task.get('importance')})({task.get('days_to_due')} days): ({task.get('running_index', 0)}) " ) else: task["preamble"] = ""
yeah, I think the code here should be an if statement, then it could pass. Let me try it and if it works, I would push it.
the if statement was already there. I just removed the try/except
@stevenhua0320 please confirm that this is passing tests and I can merge it.
Yes, I have verified that it is a passing test.
I leave E722 for check, which is
do not leave bare except
. However, the code structure is like this: