Removed some code dealing with early eric5 versions.

Sun, 06 Jul 2014 12:09:21 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 06 Jul 2014 12:09:21 +0200
changeset 98
9c331ebb4b8c
parent 97
6226cdaea3ad
child 99
cc71453509b1

Removed some code dealing with early eric5 versions.

AssistantEric/APIsManager.py file | annotate | diff | comparison | revisions
AssistantEric/Assistant.py file | annotate | diff | comparison | revisions
ChangeLog file | annotate | diff | comparison | revisions
PluginAssistantEric.zip file | annotate | diff | comparison | revisions
--- a/AssistantEric/APIsManager.py	Sat Jul 05 19:58:44 2014 +0200
+++ b/AssistantEric/APIsManager.py	Sun Jul 06 12:09:21 2014 +0200
@@ -211,16 +211,13 @@
                         # it is a forms source file, extract public attributes
                         # as well
                         apis.extend(self.__classesAttributesApi(module))
-                    try:
-                        basesDict = apiGenerator.genBases(True)
-                        for baseEntry in basesDict:
-                            if basesDict[baseEntry]:
-                                bases.append("{0} {1}\n".format(
-                                    baseEntry, " ".join(
-                                        sorted(basesDict[baseEntry]))))
-                    except AttributeError:
-                        # eric 5.1 doesn't have this method
-                        pass
+                    
+                    basesDict = apiGenerator.genBases(True)
+                    for baseEntry in basesDict:
+                        if basesDict[baseEntry]:
+                            bases.append("{0} {1}\n".format(
+                                baseEntry, " ".join(
+                                    sorted(basesDict[baseEntry]))))
             except (IOError, ImportError):
                 pass
         else:
--- a/AssistantEric/Assistant.py	Sat Jul 05 19:58:44 2014 +0200
+++ b/AssistantEric/Assistant.py	Sun Jul 06 12:09:21 2014 +0200
@@ -543,14 +543,9 @@
                                 iconID = Editor.MethodProtectedID
                             else:
                                 iconID = Editor.MethodID
-                            if hasattr(method, "modifier"):
-                                if (prefix == "cls" and
-                                    method.modifier == method.Class) or \
-                                   prefix == "self":
-                                    comps.append((method.name, cl.name,
-                                                  iconID))
-                            else:
-                                # eric 5.1 cannot differentiate method types
+                            if (prefix == "cls" and
+                                method.modifier == method.Class) or \
+                               prefix == "self":
                                 comps.append((method.name, cl.name, iconID))
                         if prefix != "cls":
                             for attribute in cl.attributes.values():
@@ -602,9 +597,6 @@
                     for method in cl.methods.values():
                         if method.name == "__init__":
                             continue
-                        if not doHierarchy and not hasattr(method, "modifier"):
-                            # eric 5.1 cannot differentiate method types
-                            continue
                         if doHierarchy or \
                            method.modifier in [method.Class, method.Static]:
                             # determine icon type
@@ -829,25 +821,16 @@
                            (cl.endlineno == -1 or line <= cl.endlineno):
                             if word in cl.methods:
                                 method = cl.methods[word]
-                                if hasattr(method, "modifier"):
-                                    if prefix == "self" or \
-                                       (prefix == "cls" and
-                                            method.modifier == method.Class):
-                                        calltips.append(
-                                            "{0}{1}{2}({3})".format(
-                                                cl.name,
-                                                sep,
-                                                word,
-                                                ', '.join(method.parameters[1:]
-                                                          )))
-                                else:
-                                    # eric 5.1 cannot differentiate method
-                                    # types
-                                    calltips.append("{0}{1}{2}({3})".format(
-                                        cl.name,
-                                        sep,
-                                        word,
-                                        ', '.join(method.parameters[1:])))
+                                if prefix == "self" or \
+                                   (prefix == "cls" and
+                                        method.modifier == method.Class):
+                                    calltips.append(
+                                        "{0}{1}{2}({3})".format(
+                                            cl.name,
+                                            sep,
+                                            word,
+                                            ', '.join(method.parameters[1:]
+                                                      )))
                             
                             for sup in cl.super:
                                 calltips.extend(self.__getDocumentCalltips(
@@ -860,11 +843,7 @@
                         cl = module.classes[prefix]
                         if word in cl.methods:
                             method = cl.methods[word]
-                            if doHierarchy or \
-                               (hasattr(method, "modifier") and
-                                    method.modifier == method.Class):
-                                # only eric 5.2 and newer can differentiate
-                                # method types
+                            if doHierarchy or method.modifier == method.Class:
                                 calltips.append("{0}{1}{2}({3})".format(
                                     cl.name,
                                     sep,
--- a/ChangeLog	Sat Jul 05 19:58:44 2014 +0200
+++ b/ChangeLog	Sun Jul 06 12:09:21 2014 +0200
@@ -1,5 +1,8 @@
 ChangeLog
 ---------
+Version 3.0.0:
+- ported for eric6 using PyQt5
+
 Version 2.7.0:
 - Python 2 compatibility flag added
 
Binary file PluginAssistantEric.zip has changed

eric ide

mercurial