Adapted the import statements to the new structure. eric7 release-10.1.0

Tue, 25 Oct 2022 09:25:44 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Tue, 25 Oct 2022 09:25:44 +0200
branch
eric7
changeset 51
344ab3a70c58
parent 50
265ebe67da39
child 52
8674ec401ce8

Adapted the import statements to the new structure.

ChangeLog file | annotate | diff | comparison | revisions
PluginKivy.epj file | annotate | diff | comparison | revisions
PluginProjectKivy.py file | annotate | diff | comparison | revisions
PluginProjectKivy.zip file | annotate | diff | comparison | revisions
--- a/ChangeLog	Wed Sep 21 16:27:00 2022 +0200
+++ b/ChangeLog	Tue Oct 25 09:25:44 2022 +0200
@@ -1,5 +1,8 @@
 ChangeLog
 ---------
+Version 10.1.0
+- adapted the import statements to the new structure
+
 Version 10.0.0:
 - first release of the eric7 variant
 
--- a/PluginKivy.epj	Wed Sep 21 16:27:00 2022 +0200
+++ b/PluginKivy.epj	Tue Oct 25 09:25:44 2022 +0200
@@ -191,7 +191,7 @@
     ],
     "OTHERTOOLSPARMS": {
       "Black": {
-        "exclude": "/(\\.direnv|\\.eggs|\\.git|\\.hg|\\.mypy_cache|\\.nox|\\.tox|\\.venv|venv|\\.svn|_build|buck-out|build|dist|__pypackages__)/",
+        "exclude": "/(\\.direnv|\\.eggs|\\.git|\\.hg|\\.mypy_cache|\\.nox|\\.tox|\\.venv|venv|\\.svn|\\.ipynb_checkpoints|_build|buck-out|build|dist|__pypackages__)/",
         "extend-exclude": "",
         "force-exclude": "",
         "line-length": 88,
@@ -242,6 +242,7 @@
       "ProjectKivy/i18n/kivy_ru.ts"
     ],
     "TRANSLATIONSBINPATH": "",
+    "TRANSLATIONSOURCESTARTPATH": "",
     "UICPARAMS": {
       "Package": "",
       "PackagesRoot": "",
--- a/PluginProjectKivy.py	Wed Sep 21 16:27:00 2022 +0200
+++ b/PluginProjectKivy.py	Tue Oct 25 09:25:44 2022 +0200
@@ -13,9 +13,8 @@
 
 from PyQt6.QtCore import QObject, QTranslator
 
-from EricWidgets.EricApplication import ericApp
-
-import Preferences
+from eric7 import Preferences
+from eric7.EricWidgets.EricApplication import ericApp
 
 from pygments.lexers._mapping import LEXERS
 
@@ -24,7 +23,7 @@
 author = "Detlev Offenbach <detlev@die-offenbachs.de>"
 autoactivate = True
 deactivateable = True
-version = "10.0.0"
+version = "10.1.0"
 className = "ProjectKivyPlugin"
 packageName = "ProjectKivy"
 shortDescription = "Project support for Kivy projects."
@@ -98,6 +97,14 @@
         @return tuple of None and activation status
         @rtype bool
         """
+        from eric7.Project.ProjectBrowser import (
+            SourcesBrowserFlag,
+            FormsBrowserFlag,
+            TranslationsBrowserFlag,
+            OthersBrowserFlag,
+        )
+        from eric7.QScintilla import Lexers
+
         self.__ericProject.registerProjectType(
             "Kivy",
             self.tr("Kivy"),
@@ -106,13 +113,6 @@
             progLanguages=["Python3"],
         )
 
-        from Project.ProjectBrowser import (
-            SourcesBrowserFlag,
-            FormsBrowserFlag,
-            TranslationsBrowserFlag,
-            OthersBrowserFlag,
-        )
-
         Preferences.setProjectBrowserFlagsDefault(
             "Kivy",
             SourcesBrowserFlag
@@ -122,9 +122,7 @@
         )
 
         LEXERS[self.KivyLexerKey] = self.KivyLexerEntry
-        import QScintilla.Lexers
-
-        QScintilla.Lexers.registerLexer(
+        Lexers.registerLexer(
             "Pygments|Kivy",
             self.tr("Kivy"),
             "dummy.kv",
@@ -140,11 +138,11 @@
         """
         Public method to deactivate this plugin.
         """
+        from eric7.QScintilla import Lexers
+
         self.__ericProject.unregisterProjectType("Kivy")
 
-        import QScintilla.Lexers
-
-        QScintilla.Lexers.unregisterLexer("Kivy")
+        Lexers.unregisterLexer("Kivy")
         if self.KivyLexerKey in LEXERS:
             del LEXERS[self.KivyLexerKey]
 
@@ -215,7 +213,7 @@
         @return reference to the instanciated lexer object
         @rtype QsciLexer
         """
-        from QScintilla.Lexers.LexerPygments import LexerPygments
+        from eric7.QScintilla.Lexers.LexerPygments import LexerPygments
 
         lexer = LexerPygments(parent, name="Kivy")
         if lexer.canStyle():
Binary file PluginProjectKivy.zip has changed

eric ide

mercurial