Adapted some import statements to eric 23.1 and newer. eric7 release-10.2.0

Tue, 20 Dec 2022 16:53:55 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Tue, 20 Dec 2022 16:53:55 +0100
branch
eric7
changeset 57
2bbbf54c8853
parent 56
aa8647c5c19a
child 58
63fc323bbc42

Adapted some import statements to eric 23.1 and newer.

ChangeLog file | annotate | diff | comparison | revisions
PluginWizardDataUriEncoder.epj file | annotate | diff | comparison | revisions
PluginWizardDataUriEncoder.py file | annotate | diff | comparison | revisions
PluginWizardDataUriEncoder.zip file | annotate | diff | comparison | revisions
WizardDataUriEncoder/DataUriEncoderWizardDialog.py file | annotate | diff | comparison | revisions
pyproject.toml file | annotate | diff | comparison | revisions
--- a/ChangeLog	Wed Oct 26 09:29:33 2022 +0200
+++ b/ChangeLog	Tue Dec 20 16:53:55 2022 +0100
@@ -1,5 +1,8 @@
 ChangeLog
 ---------
+Version 10.2.0
+- adapted some import statements to eric 23.1 and newer
+
 Version 10.1.2:
 - modified Python3 template iaw.Black formatting rules
 
--- a/PluginWizardDataUriEncoder.epj	Wed Oct 26 09:29:33 2022 +0200
+++ b/PluginWizardDataUriEncoder.epj	Tue Dec 20 16:53:55 2022 +0100
@@ -189,7 +189,8 @@
       "PluginWizardDataUriEncoder.epj",
       "PluginWizardDataUriEncoder.zip",
       "WizardDataUriEncoder/Documentation/LICENSE.GPL3",
-      "WizardDataUriEncoder/Documentation/source"
+      "WizardDataUriEncoder/Documentation/source",
+      "pyproject.toml"
     ],
     "OTHERTOOLSPARMS": {
       "Black": {
@@ -207,6 +208,23 @@
           "py38",
           "py37"
         ]
+      },
+      "isort": {
+        "combine_as_imports": true,
+        "config_source": "project",
+        "extend_skip_glob": [
+          "*/Ui_*.py"
+        ],
+        "lines_between_types": 1,
+        "profile": "black",
+        "sort_order": "natural",
+        "supported_extensions": [
+          "py",
+          "pyi",
+          "pyx",
+          "pxd",
+          "pyw"
+        ]
       }
     },
     "PACKAGERSPARMS": {},
@@ -244,6 +262,7 @@
       "WizardDataUriEncoder/i18n/datauriencoder_ru.ts"
     ],
     "TRANSLATIONSBINPATH": "",
+    "TRANSLATIONSOURCESTARTPATH": "",
     "UICPARAMS": {
       "Package": "",
       "PackagesRoot": "",
--- a/PluginWizardDataUriEncoder.py	Wed Oct 26 09:29:33 2022 +0200
+++ b/PluginWizardDataUriEncoder.py	Tue Dec 20 16:53:55 2022 +0100
@@ -21,7 +21,7 @@
 author = "Detlev Offenbach <detlev@die-offenbachs.de>"
 autoactivate = True
 deactivateable = True
-version = "10.1.2"
+version = "10.2.0"
 className = "WizardDataUriEncoderPlugin"
 packageName = "WizardDataUriEncoder"
 shortDescription = "Wizard for the creation of code for a base64 data URI."
Binary file PluginWizardDataUriEncoder.zip has changed
--- a/WizardDataUriEncoder/DataUriEncoderWizardDialog.py	Wed Oct 26 09:29:33 2022 +0200
+++ b/WizardDataUriEncoder/DataUriEncoderWizardDialog.py	Tue Dec 20 16:53:55 2022 +0100
@@ -15,16 +15,20 @@
 import os
 
 from PyQt6.QtCore import pyqtSlot
-from PyQt6.QtWidgets import QDialog, QDialogButtonBox, QApplication, QInputDialog
+from PyQt6.QtWidgets import QApplication, QDialog, QDialogButtonBox, QInputDialog
 
-from eric7 import Preferences, Utilities
-
+from eric7 import Preferences
 from eric7.EricWidgets import EricMessageBox
 from eric7.EricWidgets.EricPathPicker import EricPathPickerModes
 
+try:
+    from eric7.SystemUtilities.OSUtilities import getHomeDir
+except ImportError:
+    # imports for eric < 23.1
+    from eric7.Utilities import getHomeDir
+
 from .Ui_DataUriEncoderWizardDialog import Ui_DataUriEncoderWizardDialog
 
-
 DataUriTemplates = {
     "Python3": "\n".join(
         [
@@ -83,7 +87,7 @@
             )
         )
         self.filePicker.setDefaultDirectory(
-            Preferences.getMultiProject("Workspace") or Utilities.getHomeDir()
+            Preferences.getMultiProject("Workspace") or getHomeDir()
         )
 
         self.embeddingComboBox.addItems(
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pyproject.toml	Tue Dec 20 16:53:55 2022 +0100
@@ -0,0 +1,10 @@
+[tool.isort]
+profile = "black"
+sort_order = "natural"
+supported_extensions = ["py", "pyi", "pyx", "pxd", "pyw"]
+lines_between_types = 1
+extend_skip_glob = [
+    "*/Ui_*.py",
+]
+combine_as_imports = true
+known_first_party = ["TimeTracker", "eric7"]

eric ide

mercurial