Resorted imports with isort. eric7

Tue, 20 Dec 2022 17:39:37 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Tue, 20 Dec 2022 17:39:37 +0100
branch
eric7
changeset 64
72d9f6d21a41
parent 63
b7b0f75d438f
child 65
d5ac9b0bd4f7

Resorted imports with isort.

PluginToolGenerateHash.epj file | annotate | diff | comparison | revisions
PluginToolGenerateHash.py file | annotate | diff | comparison | revisions
pyproject.toml file | annotate | diff | comparison | revisions
--- a/PluginToolGenerateHash.epj	Mon Oct 24 16:42:34 2022 +0200
+++ b/PluginToolGenerateHash.epj	Tue Dec 20 17:39:37 2022 +0100
@@ -187,7 +187,8 @@
       "PluginToolGenerateHash.epj",
       "PluginToolGenerateHash.zip",
       "ToolGenerateHash/Documentation/LICENSE.GPL3",
-      "ToolGenerateHash/Documentation/source"
+      "ToolGenerateHash/Documentation/source",
+      "pyproject.toml"
     ],
     "OTHERTOOLSPARMS": {
       "Black": {
@@ -205,6 +206,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": {},
@@ -241,6 +259,7 @@
       "ToolGenerateHash/i18n/generatehash_ru.ts"
     ],
     "TRANSLATIONSBINPATH": "",
+    "TRANSLATIONSOURCESTARTPATH": "",
     "UICPARAMS": {
       "Package": "",
       "PackagesRoot": "",
--- a/PluginToolGenerateHash.py	Mon Oct 24 16:42:34 2022 +0200
+++ b/PluginToolGenerateHash.py	Tue Dec 20 17:39:37 2022 +0100
@@ -8,10 +8,10 @@
 """
 
 import contextlib
+import hashlib
 import os
-import hashlib
 
-from PyQt6.QtCore import pyqtSlot, QObject, QTranslator
+from PyQt6.QtCore import QObject, QTranslator, pyqtSlot
 from PyQt6.QtGui import QAction
 from PyQt6.QtWidgets import QMenu
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pyproject.toml	Tue Dec 20 17:39:37 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 = ["ToolGenerateHash", "eric7"]

eric ide

mercurial