tisonkun commented on code in PR #55: URL: https://github.com/apache/steve/pull/55#discussion_r2479959503
########## 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: Updated in https://github.com/apache/steve/pull/55/commits/d93c36405e3693bebdd677c13da3c169c40ba72e. pylint seems happy with this. It's my local IDE setting that generate the warning. I'll try to use `ruff` and see whether it outputs. -- 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]
