mirror of
https://github.com/josegonzalez/python-github-backup.git
synced 2025-12-05 16:18:02 +01:00
chore: reformat file and update flake8
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from __future__ import print_function
|
||||
import socket
|
||||
|
||||
import argparse
|
||||
import base64
|
||||
@@ -10,23 +9,20 @@ import codecs
|
||||
import errno
|
||||
import getpass
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
import platform
|
||||
import re
|
||||
import select
|
||||
import socket
|
||||
import subprocess
|
||||
import sys
|
||||
import logging
|
||||
import time
|
||||
import platform
|
||||
from urllib.parse import urlparse
|
||||
from urllib.parse import quote as urlquote
|
||||
from urllib.parse import urlencode
|
||||
from urllib.error import HTTPError, URLError
|
||||
from urllib.request import urlopen
|
||||
from urllib.request import Request
|
||||
from urllib.request import HTTPRedirectHandler
|
||||
from urllib.request import build_opener
|
||||
from http.client import IncompleteRead
|
||||
from urllib.error import HTTPError, URLError
|
||||
from urllib.parse import quote as urlquote
|
||||
from urllib.parse import urlencode, urlparse
|
||||
from urllib.request import HTTPRedirectHandler, Request, build_opener, urlopen
|
||||
|
||||
try:
|
||||
from . import __version__
|
||||
@@ -41,10 +37,7 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def logging_subprocess(
|
||||
popenargs,
|
||||
stdout_log_level=logging.DEBUG,
|
||||
stderr_log_level=logging.ERROR,
|
||||
**kwargs
|
||||
popenargs, stdout_log_level=logging.DEBUG, stderr_log_level=logging.ERROR, **kwargs
|
||||
):
|
||||
"""
|
||||
Variant of subprocess.call that accepts a logger instead of stdout/stderr,
|
||||
@@ -626,12 +619,12 @@ def retrieve_data_gen(args, template, query_args=None, single_request=False):
|
||||
raise Exception(", ".join(errors))
|
||||
|
||||
if len(errors) == 0:
|
||||
if type(response) == list:
|
||||
if type(response) is list:
|
||||
for resp in response:
|
||||
yield resp
|
||||
if len(response) < per_page:
|
||||
break
|
||||
elif type(response) == dict and single_request:
|
||||
elif type(response) is dict and single_request:
|
||||
yield response
|
||||
|
||||
if len(errors) > 0:
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
bleach==6.0.0
|
||||
certifi==2023.7.22
|
||||
certifi==2023.5.7
|
||||
charset-normalizer==3.1.0
|
||||
colorama==0.4.6
|
||||
docutils==0.20.1
|
||||
flake8==6.0.0
|
||||
flake8==6.1.0
|
||||
gitchangelog==3.0.4
|
||||
idna==3.4
|
||||
importlib-metadata==6.6.0
|
||||
@@ -14,8 +14,8 @@ mccabe==0.7.0
|
||||
mdurl==0.1.2
|
||||
more-itertools==9.1.0
|
||||
pkginfo==1.9.6
|
||||
pycodestyle==2.10.0
|
||||
pyflakes==3.0.1
|
||||
pycodestyle==2.11.1
|
||||
pyflakes==3.1.0
|
||||
Pygments==2.15.1
|
||||
readme-renderer==37.3
|
||||
requests==2.31.0
|
||||
@@ -26,6 +26,6 @@ rich==13.3.5
|
||||
six==1.16.0
|
||||
tqdm==4.65.0
|
||||
twine==4.0.2
|
||||
urllib3==2.0.7
|
||||
urllib3==2.0.2
|
||||
webencodings==0.5.1
|
||||
zipp==3.15.0
|
||||
|
||||
Reference in New Issue
Block a user