Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork16.7k
Description
Thanks for a recent release offlask which looks great. 🎉 Just started testing it out.
This is not directly a bug afaik, but our CI started failing on the new release offlask andwerkzeug.
Following the flask documentation, it appears the recommended way of setting new attributes toflask.g is simply doingflask.g.some_attribute = some_value.
This example code
fromflaskimportgg.some_attribute=42
gives nopylint warning when used together withpip install "flask<2" "werkzeug<2", however afterpip install --upgrade flask werkzeug the same code gives the followingpylint warning:
test_pylint.py:3:0: E0237: Assigning to attribute 'some_attribute' not defined in class slots (assigning-non-slot)Any recommended code change that should be done related to setting attributes on the namespace objectflask.g, or would the best recommendation be to silencepylint when used with newestflask +werkzeug?