Sorted imports with isort. eric7

Wed, 21 Dec 2022 10:17:43 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 21 Dec 2022 10:17:43 +0100
branch
eric7
changeset 48
17eb790b9a82
parent 47
b1d87c6aac62
child 49
1910859bbacf

Sorted imports with isort.

PluginProjectWeb.py file | annotate | diff | comparison | revisions
PluginWeb.epj file | annotate | diff | comparison | revisions
ProjectWeb/Html5ToCss3Converter.py file | annotate | diff | comparison | revisions
ProjectWeb/Html5ToJsConverter.py file | annotate | diff | comparison | revisions
pyproject.toml file | annotate | diff | comparison | revisions
--- a/PluginProjectWeb.py	Sat Nov 26 18:08:48 2022 +0100
+++ b/PluginProjectWeb.py	Wed Dec 21 10:17:43 2022 +0100
@@ -13,10 +13,9 @@
 from PyQt6.QtCore import QObject, QTranslator
 from PyQt6.QtWidgets import QMenu
 
+from eric7 import Preferences
 from eric7.EricWidgets.EricApplication import ericApp
 
-from eric7 import Preferences
-
 try:
     from bs4 import BeautifulSoup  # __IGNORE_EXCEPTION__
 
@@ -94,9 +93,9 @@
         try:
             # backward compatibility for eric7 < 22.12
             from eric7.Project.ProjectBrowser import (
-                SourcesBrowserFlag,
                 FormsBrowserFlag,
                 OthersBrowserFlag,
+                SourcesBrowserFlag,
             )
 
             Preferences.setProjectBrowserFlagsDefault(
--- a/PluginWeb.epj	Sat Nov 26 18:08:48 2022 +0100
+++ b/PluginWeb.epj	Wed Dec 21 10:17:43 2022 +0100
@@ -190,7 +190,8 @@
       "PluginProjectWeb.zip",
       "PluginWeb.epj",
       "ProjectWeb/Documentation/LICENSE.GPL3",
-      "ProjectWeb/Documentation/source"
+      "ProjectWeb/Documentation/source",
+      "pyproject.toml"
     ],
     "OTHERTOOLSPARMS": {
       "Black": {
@@ -208,6 +209,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/ProjectWeb/Html5ToCss3Converter.py	Sat Nov 26 18:08:48 2022 +0100
+++ b/ProjectWeb/Html5ToCss3Converter.py	Wed Dec 21 10:17:43 2022 +0100
@@ -7,9 +7,9 @@
 Module implementing the HTML5 to CSS3 converter.
 """
 
-import os
 import datetime
 import getpass
+import os
 import random
 
 from PyQt6.QtCore import QObject
--- a/ProjectWeb/Html5ToJsConverter.py	Sat Nov 26 18:08:48 2022 +0100
+++ b/ProjectWeb/Html5ToJsConverter.py	Wed Dec 21 10:17:43 2022 +0100
@@ -7,10 +7,10 @@
 Module implementing the HTML5 to JavaScript converter.
 """
 
+import datetime
+import getpass
 import os
 import re
-import datetime
-import getpass
 
 from PyQt6.QtCore import QObject
 from PyQt6.QtWidgets import QDialog
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pyproject.toml	Wed Dec 21 10:17:43 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 = ["ProjectWeb", "eric7"]

eric ide

mercurial