Skip to content

Commit 2724f02

Browse files
committed
chore: reformat file and update flake8
1 parent e0bf80a commit 2724f02

File tree

2 files changed

+15
-22
lines changed

2 files changed

+15
-22
lines changed

github_backup/github_backup.py

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/usr/bin/env python
22

33
from __future__ import print_function
4-
import socket
54

65
import argparse
76
import base64
@@ -10,23 +9,20 @@
109
import errno
1110
import getpass
1211
import json
12+
import logging
1313
import os
14+
import platform
1415
import re
1516
import select
17+
import socket
1618
import subprocess
1719
import sys
18-
import logging
1920
import time
20-
import platform
21-
from urllib.parse import urlparse
22-
from urllib.parse import quote as urlquote
23-
from urllib.parse import urlencode
24-
from urllib.error import HTTPError, URLError
25-
from urllib.request import urlopen
26-
from urllib.request import Request
27-
from urllib.request import HTTPRedirectHandler
28-
from urllib.request import build_opener
2921
from http.client import IncompleteRead
22+
from urllib.error import HTTPError, URLError
23+
from urllib.parse import quote as urlquote
24+
from urllib.parse import urlencode, urlparse
25+
from urllib.request import HTTPRedirectHandler, Request, build_opener, urlopen
3026

3127
try:
3228
from . import __version__
@@ -41,10 +37,7 @@
4137

4238

4339
def logging_subprocess(
44-
popenargs,
45-
stdout_log_level=logging.DEBUG,
46-
stderr_log_level=logging.ERROR,
47-
**kwargs
40+
popenargs, stdout_log_level=logging.DEBUG, stderr_log_level=logging.ERROR, **kwargs
4841
):
4942
"""
5043
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):
626619
raise Exception(", ".join(errors))
627620

628621
if len(errors) == 0:
629-
if type(response) == list:
622+
if type(response) is list:
630623
for resp in response:
631624
yield resp
632625
if len(response) < per_page:
633626
break
634-
elif type(response) == dict and single_request:
627+
elif type(response) is dict and single_request:
635628
yield response
636629

637630
if len(errors) > 0:

release-requirements.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
bleach==6.0.0
2-
certifi==2023.7.22
2+
certifi==2023.5.7
33
charset-normalizer==3.1.0
44
colorama==0.4.6
55
docutils==0.20.1
6-
flake8==6.0.0
6+
flake8==6.1.0
77
gitchangelog==3.0.4
88
idna==3.4
99
importlib-metadata==6.6.0
@@ -14,8 +14,8 @@ mccabe==0.7.0
1414
mdurl==0.1.2
1515
more-itertools==9.1.0
1616
pkginfo==1.9.6
17-
pycodestyle==2.10.0
18-
pyflakes==3.0.1
17+
pycodestyle==2.11.1
18+
pyflakes==3.1.0
1919
Pygments==2.15.1
2020
readme-renderer==37.3
2121
requests==2.31.0
@@ -26,6 +26,6 @@ rich==13.3.5
2626
six==1.16.0
2727
tqdm==4.65.0
2828
twine==4.0.2
29-
urllib3==2.0.7
29+
urllib3==2.0.2
3030
webencodings==0.5.1
3131
zipp==3.15.0

0 commit comments

Comments
 (0)