-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
0.981 @classmethod
and @property
can no longer be chained
#13746
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I don't know if this was related to the change in mypy 0.981, but chaining of property and classmethod has been deprecated in Python 3.11. More details can be found in the Python 3.11 release notes, but I'll quote the relevant part here:
|
Fix the following errors: ``` osbuild/util/lvm2.py:117: error: Only instance methods can be decorated with @Property osbuild/api.py:50: error: Only instance methods can be decorated with @Property osbuild/sources.py:85: error: Only instance methods can be decorated with @Property ``` Chaining of `@classmethod` and `@property` has been deprecated since Python 3.11 with a note that chaining didn't work correctly in some cases. Relevant links: python/mypy#13746 https://docs.python.org/3.11/whatsnew/3.11.html#language-builtins Signed-off-by: Tomáš Hozza <[email protected]>
Fix the following errors: ``` osbuild/util/lvm2.py:117: error: Only instance methods can be decorated with @Property osbuild/api.py:50: error: Only instance methods can be decorated with @Property osbuild/sources.py:85: error: Only instance methods can be decorated with @Property ``` Chaining of `@classmethod` and `@property` has been deprecated since Python 3.11 with a note that chaining didn't work correctly in some cases. Relevant links: python/mypy#13746 https://docs.python.org/3.11/whatsnew/3.11.html#language-builtins Signed-off-by: Tomáš Hozza <[email protected]>
Fix the following errors: ``` osbuild/util/lvm2.py:117: error: Only instance methods can be decorated with @Property osbuild/api.py:50: error: Only instance methods can be decorated with @Property osbuild/sources.py:85: error: Only instance methods can be decorated with @Property ``` Chaining of `@classmethod` and `@property` has been deprecated since Python 3.11 with a note that chaining didn't work correctly in some cases. Relevant links: python/mypy#13746 https://docs.python.org/3.11/whatsnew/3.11.html#language-builtins Signed-off-by: Tomáš Hozza <[email protected]>
Class properties were introduced in Python 3.9, and used to be unanalysed in 0.971:
Now, we have
The text was updated successfully, but these errors were encountered: