Skip to content

Commit 4c5187b

Browse files
committed
chore: format python code
1 parent 2de69be commit 4c5187b

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

bin/github-backup

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
#!/usr/bin/env python
22

3-
import os, sys, logging
4-
5-
logging.basicConfig(
6-
format='%(asctime)s.%(msecs)03d: %(message)s',
7-
datefmt='%Y-%m-%dT%H:%M:%S',
8-
level=logging.INFO
9-
)
3+
import logging
4+
import os
5+
import sys
106

117
from github_backup.github_backup import (
128
backup_account,
@@ -20,6 +16,12 @@ from github_backup.github_backup import (
2016
retrieve_repositories,
2117
)
2218

19+
logging.basicConfig(
20+
format="%(asctime)s.%(msecs)03d: %(message)s",
21+
datefmt="%Y-%m-%dT%H:%M:%S",
22+
level=logging.INFO,
23+
)
24+
2325

2426
def main():
2527
args = parse_args()
@@ -29,7 +31,7 @@ def main():
2931

3032
output_directory = os.path.realpath(args.output_directory)
3133
if not os.path.isdir(output_directory):
32-
logger.info('Create output directory {0}'.format(output_directory))
34+
logger.info("Create output directory {0}".format(output_directory))
3335
mkdir_p(output_directory)
3436

3537
if args.lfs_clone:
@@ -41,18 +43,18 @@ def main():
4143
logger.root.setLevel(log_level)
4244

4345
if not args.as_app:
44-
logger.info('Backing up user {0} to {1}'.format(args.user, output_directory))
46+
logger.info("Backing up user {0} to {1}".format(args.user, output_directory))
4547
authenticated_user = get_authenticated_user(args)
4648
else:
47-
authenticated_user = {'login': None}
49+
authenticated_user = {"login": None}
4850

4951
repositories = retrieve_repositories(args, authenticated_user)
5052
repositories = filter_repositories(args, repositories)
5153
backup_repositories(args, output_directory, repositories)
5254
backup_account(args, output_directory)
5355

5456

55-
if __name__ == '__main__':
57+
if __name__ == "__main__":
5658
try:
5759
main()
5860
except Exception as e:

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
33
import os
4+
45
from github_backup import __version__
56

67
try:

0 commit comments

Comments
 (0)