Skip to content

Commit

Permalink
chore: reformat file and update flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
josegonzalez committed Dec 9, 2023
1 parent e0bf80a commit 2724f02
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 22 deletions.
27 changes: 10 additions & 17 deletions github_backup/github_backup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/env python

from __future__ import print_function
import socket

import argparse
import base64
Expand All @@ -10,23 +9,20 @@
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__
Expand All @@ -41,10 +37,7 @@


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,
Expand Down Expand Up @@ -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:
Expand Down
10 changes: 5 additions & 5 deletions release-requirements.txt
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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

0 comments on commit 2724f02

Please sign in to comment.