[prev in list] [next in list] [prev in thread] [next in thread]
List: kdevelop-bugs
Subject: [Bug 292731] New: If class declared in module directly, subclasses have wrong parent
From: Nicolás Alvarez <nicolas.alvarez () gmail ! com>
Date: 2012-01-28 22:41:43
Message-ID: bug-292731-40295 () http ! bugs ! kde ! org/
[Download RAW message or body]
https://bugs.kde.org/show_bug.cgi?id=292731
Summary: If class declared in module directly, subclasses have
wrong parent
Product: kdev-python
Version: git master
Platform: Compiled Sources
OS/Version: Linux
Status: NEW
Severity: major
Priority: NOR
Component: general
AssignedTo: kdevelop-bugs@kdevelop.org
ReportedBy: nicolas.alvarez@gmail.com
CC: svenbrauch@googlemail.com
badmodule.py:
class One(object):
def basefunc(self):
pass
test.py:
import badmodule
class Two(badmodule.One):
def func(self):
self.basefunc()
The tooltip of 'two' shows it's a subclass of 'badmodule' instead of
'badmodule.One'. 'basefunc' is underlined in yellow, because it can't be found.
'self.' completion inside 'func' shows 'func' and 'One' in the completion list.
This doesn't happen in other cases like "class MyTest(unittest.TestCase)". I
think it's because TestCase is defined in a separate file, and gets imported by
unittest/__init__.py, while in the above snippet, One is directly in
badmodule.py.
The same bug seems to happen if a class is declared directly in
modulename/__init__.py.
--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
KDevelop-bugs mailing list
KDevelop-bugs@kdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-bugs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic