changeset 7813:928c20d4344b

chore(ruff): sort imports; tuples for import not supported in python2.
author John Rouillard <rouilj@ieee.org>
date Sat, 16 Mar 2024 21:31:26 -0400
parents ecc34b7917e2
children 9adf37c63b56
files roundup/cgi/client.py
diffstat 1 files changed, 12 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/roundup/cgi/client.py	Sat Mar 16 21:08:16 2024 -0400
+++ b/roundup/cgi/client.py	Sat Mar 16 21:31:26 2024 -0400
@@ -15,37 +15,31 @@
 import stat
 import sys
 import time
-
 from email.mime.multipart import MIMEMultipart
 from traceback import format_exc
+
 try:
     from OpenSSL.SSL import SysCallError
 except ImportError:
     class SysCallError(Exception):
         pass
 
-from roundup.anypy.cgi_ import cgi
 import roundup.anypy.email_  # noqa: F401  -- patches for email library code
-import roundup.anypy.random_ as random_   # quality of random checked below
-
 from roundup import hyperdb, rest, xmlrpc
-
-from roundup.anypy import http_, urllib_, xmlrpc_
-from roundup.anypy.cookie_ import BaseCookie, CookieError, get_cookie_date, \
-    SimpleCookie
+# quality of random checked below
+from roundup.anypy import http_, random_, urllib_, xmlrpc_
+from roundup.anypy.cgi_ import cgi
+from roundup.anypy.cookie_ import BaseCookie, CookieError, SimpleCookie, get_cookie_date
 from roundup.anypy.html import html_escape
-from roundup.anypy.strings import s2b, b2s, bs2b, uchr, is_us
-
-from roundup.cgi import accept_language, actions, cgitb, templating, \
-    TranslationService
-from roundup.cgi.exceptions import (
-    DetectorError, FormError, IndexerQueryError, NotFound, NotModified,
-    Redirect, SendFile, SendStaticFile, SeriousError)
+from roundup.anypy.strings import b2s, bs2b, is_us, s2b, uchr
+from roundup.cgi import TranslationService, accept_language, actions, cgitb, templating
+from roundup.cgi.exceptions import DetectorError, FormError, \
+    IndexerQueryError, NotFound, NotModified, Redirect, SendFile, \
+    SendStaticFile, SeriousError
+
 from roundup.cgi.form_parser import FormParser
-
 from roundup.exceptions import LoginError, RateLimitExceeded, Reject, \
-                               RejectRaw, Unauthorised, UsageError
-
+    RejectRaw, Unauthorised, UsageError
 from roundup.mailer import Mailer, MessageSendError
 
 logger = logging.getLogger('roundup')
@@ -55,7 +49,6 @@
 else:
     logger.warning("**SystemRandom not available. Using poor random generator")
 
-
 def initialiseSecurity(security):
     '''Create some Permissions and Roles on the security object
 

Roundup Issue Tracker: http://roundup-tracker.org/