Quantcast
Channel: Getting rid of PyCharm warning for Python static/class property - Stack Overflow
Browsing latest articles
Browse All 3 View Live

Answer by Jasmijn for Getting rid of PyCharm warning for Python static/class...

I haven't used PyCharm in a while, but I think adding a type annotation might work:from typing import ClassVarclass Result(object): Success: ClassVar['Result'] def __init__(self, success, details):...

View Article


Image may be NSFW.
Clik here to view.

Answer by jrbergen for Getting rid of PyCharm warning for Python static/class...

You may want to make a separate predefined subclass of Result for a default 'Success' result.(I misinterpreted your question at first; in case one finds this question and is just looking for a way to...

View Article

Getting rid of PyCharm warning for Python static/class property

In my Python 2.7 program (sorry, we have a third-party precompiled Python module that's stuck at 2.7, and yes we're leaning on them to upgrade and yes they're planning on getting there), rather than...

View Article
Browsing latest articles
Browse All 3 View Live