build(ci): add pyupgrade to ci flow

This commit is contained in:
nico 2022-11-16 22:09:01 +01:00
parent de036834ac
commit c7ab896881
Signed by: mightyBroccoli
GPG Key ID: 1F6495B44DABCE6E
5 changed files with 3 additions and 8 deletions

View File

@ -1,5 +1,4 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# version
__version__ = "0.1"

View File

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
import sys
from ruamel.yaml import YAML, scalarstring
@ -19,7 +18,7 @@ class ProcessBlocklist:
"""
try:
# 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()
except (TypeError, FileNotFoundError):

View File

@ -1,5 +1,4 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import argparse

View File

@ -1,5 +1,4 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from pathlib import Path
@ -38,7 +37,7 @@ class Blimp:
if not local_file_present(self.etag_path):
return True
with open(self.etag_path, "r") as local_file:
with open(self.etag_path) as local_file:
local_etag = local_file.read()
# etag file is present but outdated
@ -60,7 +59,7 @@ class Blimp:
return
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()
else:

View File

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from pathlib import Path