Skip to content

Commit 9c7604c

Browse files
committed
chore(ruff): sort imports; tuples for import not supported in python2.
1 parent e7e02e7 commit 9c7604c

File tree

1 file changed

+11
-18
lines changed

1 file changed

+11
-18
lines changed

roundup/cgi/client.py

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,37 +15,31 @@
1515
import stat
1616
import sys
1717
import time
18-
1918
from email.mime.multipart import MIMEMultipart
2019
from traceback import format_exc
20+
2121
try:
2222
from OpenSSL.SSL import SysCallError
2323
except ImportError:
2424
class SysCallError(Exception):
2525
pass
2626

27-
from roundup.anypy.cgi_ import cgi
2827
import roundup.anypy.email_ # noqa: F401 -- patches for email library code
29-
import roundup.anypy.random_ as random_ # quality of random checked below
30-
3128
from roundup import hyperdb, rest, xmlrpc
32-
33-
from roundup.anypy import http_, urllib_, xmlrpc_
34-
from roundup.anypy.cookie_ import BaseCookie, CookieError, get_cookie_date, \
35-
SimpleCookie
29+
# quality of random checked below
30+
from roundup.anypy import http_, random_, urllib_, xmlrpc_
31+
from roundup.anypy.cgi_ import cgi
32+
from roundup.anypy.cookie_ import BaseCookie, CookieError, SimpleCookie, get_cookie_date
3633
from roundup.anypy.html import html_escape
37-
from roundup.anypy.strings import s2b, b2s, bs2b, uchr, is_us
34+
from roundup.anypy.strings import b2s, bs2b, is_us, s2b, uchr
35+
from roundup.cgi import TranslationService, accept_language, actions, cgitb, templating
36+
from roundup.cgi.exceptions import DetectorError, FormError, \
37+
IndexerQueryError, NotFound, NotModified, Redirect, SendFile, \
38+
SendStaticFile, SeriousError
3839

39-
from roundup.cgi import accept_language, actions, cgitb, templating, \
40-
TranslationService
41-
from roundup.cgi.exceptions import (
42-
DetectorError, FormError, IndexerQueryError, NotFound, NotModified,
43-
Redirect, SendFile, SendStaticFile, SeriousError)
4440
from roundup.cgi.form_parser import FormParser
45-
4641
from roundup.exceptions import LoginError, RateLimitExceeded, Reject, \
47-
RejectRaw, Unauthorised, UsageError
48-
42+
RejectRaw, Unauthorised, UsageError
4943
from roundup.mailer import Mailer, MessageSendError
5044

5145
logger = logging.getLogger('roundup')
@@ -55,7 +49,6 @@ class SysCallError(Exception):
5549
else:
5650
logger.warning("**SystemRandom not available. Using poor random generator")
5751

58-
5952
def initialiseSecurity(security):
6053
'''Create some Permissions and Roles on the security object
6154

0 commit comments

Comments
 (0)