build(ci): add pyupgrade to ci flow
This commit is contained in:
parent
de036834ac
commit
c7ab896881
|
@ -1,5 +1,4 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
# version
|
# version
|
||||||
__version__ = "0.1"
|
__version__ = "0.1"
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from ruamel.yaml import YAML, scalarstring
|
from ruamel.yaml import YAML, scalarstring
|
||||||
|
@ -19,7 +18,7 @@ class ProcessBlocklist:
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
# load local blacklist outfile
|
# load local blacklist outfile
|
||||||
with open(outfile, "r", encoding="utf-8") as local_file:
|
with open(outfile, encoding="utf-8") as local_file:
|
||||||
local_blacklist = local_file.read()
|
local_blacklist = local_file.read()
|
||||||
|
|
||||||
except (TypeError, FileNotFoundError):
|
except (TypeError, FileNotFoundError):
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
|
@ -38,7 +37,7 @@ class Blimp:
|
||||||
if not local_file_present(self.etag_path):
|
if not local_file_present(self.etag_path):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
with open(self.etag_path, "r") as local_file:
|
with open(self.etag_path) as local_file:
|
||||||
local_etag = local_file.read()
|
local_etag = local_file.read()
|
||||||
|
|
||||||
# etag file is present but outdated
|
# etag file is present but outdated
|
||||||
|
@ -60,7 +59,7 @@ class Blimp:
|
||||||
return
|
return
|
||||||
|
|
||||||
if not self.download_required(etag):
|
if not self.download_required(etag):
|
||||||
with open(self.blacklist_path, "r", encoding="utf-8") as local_file:
|
with open(self.blacklist_path, encoding="utf-8") as local_file:
|
||||||
self.blacklist = local_file.read()
|
self.blacklist = local_file.read()
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue