Clean up imports

This commit is contained in:
Michał Leśniewski
2021-07-11 18:57:20 +02:00
parent 48a3a92fd2
commit 7a3d1f78c1

View File

@@ -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()