Commit 6755e3deab1fdb546e6a71c41008d8d51fd413fa
1 parent
667f624a
Exists in
master
and in
1 other branch
minor comments
Showing
3 changed files
with
7 additions
and
7 deletions
Show diff stats
aprendizations/learnapp.py
... | ... | @@ -352,7 +352,7 @@ class LearnApp(object): |
352 | 352 | topics: Dict[str, Dict] = config.get('topics', {}) |
353 | 353 | g.add_nodes_from(topics.keys()) |
354 | 354 | for tref, attr in topics.items(): |
355 | - logger.debug(f' + {tref}...') | |
355 | + logger.debug(f' + {tref}') | |
356 | 356 | for d in attr.get('deps', []): |
357 | 357 | if d not in g.nodes(): |
358 | 358 | logger.error(f'Topic "{tref}" depends on "{d}" but it ' | ... | ... |
aprendizations/questions.py
... | ... | @@ -254,15 +254,15 @@ class QuestionText(Question): |
254 | 254 | # apply optional filters to the answer |
255 | 255 | def transform(self, ans): |
256 | 256 | for f in self['transform']: |
257 | - if f == 'remove_space': | |
257 | + if f == 'remove_space': # removes all spaces | |
258 | 258 | ans = ans.replace(' ', '') |
259 | - elif f == 'trim': | |
259 | + elif f == 'trim': # removes spaces around | |
260 | 260 | ans = ans.strip() |
261 | - elif f == 'normalize_space': | |
261 | + elif f == 'normalize_space': # replaces multiple spaces by one | |
262 | 262 | ans = re.sub(r'\s+', ' ', ans.strip()) |
263 | - elif f == 'lower': | |
263 | + elif f == 'lower': # convert to lowercase | |
264 | 264 | ans = ans.lower() |
265 | - elif f == 'upper': | |
265 | + elif f == 'upper': # convert to uppercase | |
266 | 266 | ans = ans.upper() |
267 | 267 | else: |
268 | 268 | logger.warning(f'in "{self["ref"]}", unknown transform "{f}"') | ... | ... |
aprendizations/serve.py