From 7a3d1f78c1eef6b904662df4aa202acb2e96115c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=C2=A0Le=C5=9Bniewski?= Date: Sun, 11 Jul 2021 18:57:20 +0200 Subject: [PATCH] Clean up imports --- elicznik.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/elicznik.py b/elicznik.py index c24949f..08312c4 100755 --- a/elicznik.py +++ b/elicznik.py @@ -1,11 +1,12 @@ #!/usr/bin/env python3 -import argparse -import requests -from requests import adapters -import ssl from urllib3 import poolmanager +import argparse import datetime +import ssl + +import requests + parser = argparse.ArgumentParser() parser.add_argument("username") @@ -25,7 +26,7 @@ CHART_URL = 'https://elicznik.tauron-dystrybucja.pl/index/charts' # Workaround for https://github.com/psf/requests/issues/4775 -class TLSAdapter(adapters.HTTPAdapter): +class TLSAdapter(requests.adapters.HTTPAdapter): def init_poolmanager(self, connections, maxsize, block=False): """Create and initialize the urllib3 PoolManager.""" ctx = ssl.create_default_context()