Resorted imports with isort. eric7

Tue, 20 Dec 2022 17:27:57 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Tue, 20 Dec 2022 17:27:57 +0100
branch
eric7
changeset 58
b096205d8358
parent 57
ab0da5a0da5e
child 59
d29b2151850e

Resorted imports with isort.

PluginSelectionEncloser.py file | annotate | diff | comparison | revisions
SelectionEncloser.epj file | annotate | diff | comparison | revisions
SelectionEncloser/ConfigurationPage/SelectionEncloserPage.py file | annotate | diff | comparison | revisions
pyproject.toml file | annotate | diff | comparison | revisions
--- a/PluginSelectionEncloser.py	Mon Oct 24 16:08:34 2022 +0200
+++ b/PluginSelectionEncloser.py	Tue Dec 20 17:27:57 2022 +0100
@@ -8,17 +8,16 @@
 """
 
 import contextlib
+import json
 import os
-import json
 
-from PyQt6.QtCore import pyqtSlot, QObject, QTranslator, QCoreApplication
+from PyQt6.QtCore import QCoreApplication, QObject, QTranslator, pyqtSlot
 from PyQt6.QtGui import QAction
 from PyQt6.QtWidgets import QMenu
 
+from eric7 import Preferences
 from eric7.EricWidgets.EricApplication import ericApp
 
-from eric7 import Preferences
-
 # Start-Of-Header
 name = "Selection Encloser Plug-in"
 author = "Detlev Offenbach <detlev@die-offenbachs.de>"
--- a/SelectionEncloser.epj	Mon Oct 24 16:08:34 2022 +0200
+++ b/SelectionEncloser.epj	Tue Dec 20 17:27:57 2022 +0100
@@ -197,11 +197,12 @@
       "SelectionEncloser/icons/separatorAdd-dark.svg",
       "SelectionEncloser/icons/separatorAdd-light.svg",
       "SelectionEncloser/icons/topAdd-dark.svg",
-      "SelectionEncloser/icons/topAdd-light.svg"
+      "SelectionEncloser/icons/topAdd-light.svg",
+      "pyproject.toml"
     ],
     "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,
@@ -215,6 +216,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": {},
@@ -254,6 +272,7 @@
       "SelectionEncloser/i18n/selectionencloser_ru.ts"
     ],
     "TRANSLATIONSBINPATH": "",
+    "TRANSLATIONSOURCESTARTPATH": "",
     "UICPARAMS": {
       "Package": "",
       "PackagesRoot": "",
--- a/SelectionEncloser/ConfigurationPage/SelectionEncloserPage.py	Mon Oct 24 16:08:34 2022 +0200
+++ b/SelectionEncloser/ConfigurationPage/SelectionEncloserPage.py	Tue Dec 20 17:27:57 2022 +0100
@@ -9,12 +9,14 @@
 
 import os
 
-from PyQt6.QtCore import pyqtSlot, Qt
-from PyQt6.QtWidgets import QTreeWidgetItem, QInputDialog, QLineEdit, QDialog
+from PyQt6.QtCore import Qt, pyqtSlot
+from PyQt6.QtWidgets import QDialog, QInputDialog, QLineEdit, QTreeWidgetItem
 
 from eric7.EricWidgets.EricApplication import ericApp
+from eric7.Preferences.ConfigurationPages.ConfigurationPageBase import (
+    ConfigurationPageBase,
+)
 
-from eric7.Preferences.ConfigurationPages.ConfigurationPageBase import ConfigurationPageBase
 from .Ui_SelectionEncloserPage import Ui_SelectionEncloserPage
 
 try:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pyproject.toml	Tue Dec 20 17:27:57 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 = ["SelectionEncloser", "eric7"]

eric ide

mercurial