Unresolved reference for property

Hi.

PyCharm (as many other IDEs) produces 'unresolved reference' warning e.g. in this code:

class A(object):
    def __init__(self):
        self._value = True

    @property
    def value(self):
        return self._value

    @value.setter
    def value(self, val):
        self._value = val


And doesn't produces warning for method duplication in this case:

class A(object):
     def __init__(self):
         self._value = True

    def value(self):
         return self._value

    def value(self, val):
         self._value = val

Also, some feature requests:

1. Provide ability to customize code style conventions.

2. Append self for class method declaration automatically and make exclusion, when there is @staticmethod decorator.

3. Supply some useful file templates and python code templetes (I've found only some for Django templates).

Thanks for great IDE!

PS: http://blogs.jetbrains.com/pycharm/ InPyCharm Links block - PyCharm Forum link is broken.


0
2 comments

Hello grumbler,

PyCharm (as many other IDEs) produces 'unresolved reference' warning

e.g. in this code:

class A(object):

def __init__(self):

self._value = True

@property

def value(self):

return self._value

@value.setter

def value(self, val):

self._value = val

And doesn't produces warning for method duplication in this case:

class A(object):

def __init__(self):

self._value = True

def value(self):

return self._value

def value(self, val):

self._value = val

Could you please file a YouTrack issue at http://youtrack.jetbrains.net/ ?

Also, some feature requests:

1. Provide ability to customize code style conventions.

What exactly would you like to customize? Right now we're mostly following

the PEP 8 style guide.

2. Append self for class method declaration automatically and make

exclusion, when there is @staticmethod decorator.

When do you want the appending to take place? We already have an inspection

that highlights class methods without 'self' parameter, can append it for

you, and knows about @staticmethod and @classmethod. Press Alt-Enter to activate

it.

3. Supply some useful file templates and python code templetes (I've

found only some for Django templates).

In general this is planned, but if there's something specific that you would

like to see, please tell. (Again, a YouTrack issue is the best way to post

such a request).

PS: http://blogs.jetbrains.com/pycharm/ InPyCharm Links block -

PyCharm Forum link is broken. h2.

Will fix, thanks!

--

Dmitry Jemerov

Development Lead

JetBrains, Inc.

http://www.jetbrains.com/

"Develop with Pleasure!"

0
Avatar
Permanently deleted user

Hello, Dmitry.

Could you please file a YouTrack issue at http://youtrack.jetbrains.net/ ?

Ok. I'll file them as separate issues, since these are separate problems.

What exactly would you like to customize? Right now we're mostly following

the PEP 8 style guide.

0

Please sign in to leave a comment.