Resorted imports with isort. eric7

Tue, 20 Dec 2022 17:31:58 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Tue, 20 Dec 2022 17:31:58 +0100
branch
eric7
changeset 65
4f299e33476a
parent 64
46b737cfb40b
child 66
333ee316bc2e

Resorted imports with isort.

PluginPrintRemover.py file | annotate | diff | comparison | revisions
PrintRemover.epj file | annotate | diff | comparison | revisions
PrintRemover/ConfigurationPage/PrintRemoverPage.py file | annotate | diff | comparison | revisions
pyproject.toml file | annotate | diff | comparison | revisions
--- a/PluginPrintRemover.py	Mon Oct 24 16:34:47 2022 +0200
+++ b/PluginPrintRemover.py	Tue Dec 20 17:31:58 2022 +0100
@@ -10,12 +10,11 @@
 import contextlib
 import os
 
-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
 
 # Start-Of-Header
--- a/PrintRemover.epj	Mon Oct 24 16:34:47 2022 +0200
+++ b/PrintRemover.epj	Tue Dec 20 17:31:58 2022 +0100
@@ -194,7 +194,8 @@
       "PrintRemover/icons/printRemover-dark.svg",
       "PrintRemover/icons/printRemover-light.svg",
       "PrintRemover/icons/separatorAdd-dark.svg",
-      "PrintRemover/icons/separatorAdd-light.svg"
+      "PrintRemover/icons/separatorAdd-light.svg",
+      "pyproject.toml"
     ],
     "OTHERTOOLSPARMS": {
       "Black": {
@@ -212,6 +213,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": {},
--- a/PrintRemover/ConfigurationPage/PrintRemoverPage.py	Mon Oct 24 16:34:47 2022 +0200
+++ b/PrintRemover/ConfigurationPage/PrintRemoverPage.py	Tue Dec 20 17:31:58 2022 +0100
@@ -10,13 +10,13 @@
 import os
 
 from PyQt6.QtCore import pyqtSlot
-from PyQt6.QtWidgets import QListWidgetItem, QInputDialog, QLineEdit
+from PyQt6.QtWidgets import QInputDialog, QLineEdit, QListWidgetItem
 
 from eric7.EricWidgets.EricApplication import ericApp
-
 from eric7.Preferences.ConfigurationPages.ConfigurationPageBase import (
     ConfigurationPageBase,
 )
+
 from .Ui_PrintRemoverPage import Ui_PrintRemoverPage
 
 try:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pyproject.toml	Tue Dec 20 17:31:58 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