tisonkun commented on code in PR #55: URL: https://github.com/apache/steve/pull/55#discussion_r2479943365
########## v3/server/pages.py: ########## @@ -89,11 +89,22 @@ async def basic_info(): # async def flash_FOO(message) # where FOO is one of the eight Bootstrap alert classes. See: # https://getbootstrap.com/docs/5.0/components/alerts/#examples -for _cat in ('primary', 'secondary', 'success', 'danger', - 'warning', 'info', 'light', 'dark', ): - globals()[f'flash_{_cat}'] = functools.partial(quart.flash, category=_cat) -del _cat - +async def flash_primary(message): + await quart.flash(message, category='primary') Review Comment: Some Python linter can't find `flash_success = functools.partial(quart.flash, category='success')` an async method and complains: ``` Function 'flash_success(f'Opened election: {title}')' neither declared as 'async' nor with 'Awaitable' as return type ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
