From: Christian Heller Date: Thu, 18 Jul 2024 04:24:21 +0000 (+0200) Subject: More variable renaming for better readability. X-Git-Url: https://plomlompom.com/repos/%7B%7Bdb.prefix%7D%7D/static/%7B%7Bprefix%7D%7D/day_todos?a=commitdiff_plain;h=9004c8fe3cc8f620992a4919bc6829a4f0075d4e;p=plomtask More variable renaming for better readability. --- diff --git a/plomtask/http.py b/plomtask/http.py index f61a9f1..cb131e2 100644 --- a/plomtask/http.py +++ b/plomtask/http.py @@ -644,22 +644,22 @@ class TaskHandler(BaseHTTPRequestHandler): is_done = len(self._form_data.get_all_str('done')) > 0 calendarize = len(self._form_data.get_all_str('calendarize')) > 0 comment = self._form_data.get_str('comment', ignore_strict=True) - for v in step_fillers: + for filler in step_fillers: target_id: int - to_int = v + to_int = filler for prefix in [p for p in ['make_empty_', 'make_full_'] - if v.startswith(p)]: - to_int = v[len(prefix):] + if filler.startswith(p)]: + to_int = filler[len(prefix):] try: target_id = int(to_int) except ValueError as e: - msg = 'bad fill_for target: {v}' + msg = 'bad fill_for target: {filler}' raise BadFormatException(msg) from e - if v.startswith('make_empty_'): + if filler.startswith('make_empty_'): processes_to_make_empty += [target_id] - elif v.startswith('make_full_'): + elif filler.startswith('make_full_'): processes_to_make_full += [target_id] - elif v != 'ignore': + elif filler != 'ignore': adopted_child_ids += [target_id] to_remove = [] for child in todo.children: