From 24c94d004a1ca4f5ec907d50add09fced726078a Mon Sep 17 00:00:00 2001 From: Eric Le Lay Date: Mon, 7 Sep 2020 11:48:48 +0200 Subject: [PATCH] fix isort warnings --- bin/gpo | 4 ++-- src/gpodder/gtkui/macosx.py | 4 +--- tools/github_release.py | 3 +-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/bin/gpo b/bin/gpo index 9d3a3dff..2936bce6 100755 --- a/bin/gpo +++ b/bin/gpo @@ -96,13 +96,13 @@ except ImportError: readline = None try: - import termios import fcntl import struct + import termios except ImportError: - termios = None fcntl = None struct = None + termios = None # A poor man's argparse/getopt - but it works for our use case :) verbose = False diff --git a/src/gpodder/gtkui/macosx.py b/src/gpodder/gtkui/macosx.py index 29c146b2..95662c51 100644 --- a/src/gpodder/gtkui/macosx.py +++ b/src/gpodder/gtkui/macosx.py @@ -43,9 +43,7 @@ except ImportError: # Also note that it only works when gPodder is not running ! # For some reason I don't get the events afterwards... try: - from AppKit import NSObject - from AppKit import NSAppleEventManager - from AppKit import NSAppleEventDescriptor + from AppKit import NSAppleEventDescriptor, NSAppleEventManager, NSObject class gPodderEventHandler(NSObject): """ handles Apple Events for : diff --git a/tools/github_release.py b/tools/github_release.py index 729ce4a6..884ec139 100755 --- a/tools/github_release.py +++ b/tools/github_release.py @@ -16,12 +16,11 @@ from jinja2 import Template def debug_requests(): """ turn requests debug on """ - import logging - # These two lines enable debugging at httplib level (requests->urllib3->http.client) # You will see the REQUEST, including HEADERS and DATA, and RESPONSE with HEADERS but without DATA. # The only thing missing will be the response.body which is not logged. import http.client as http_client + import logging http_client.HTTPConnection.debuglevel = 1 # You must initialize logging, otherwise you'll not see debug output.