Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Assigning to attribute flask.g.[...] not defined in class slots (assigning-non-slot) #4020

Closed
Assignees
davidism
Labels
Milestone
@anders-kiaer

Description

@anders-kiaer

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?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2026 Movatter.jp