diff --git a/etc/scripts/docenizers/docenizer-6502.py b/etc/scripts/docenizers/docenizer-6502.py index 7b484edb376..65e1f873650 100755 --- a/etc/scripts/docenizers/docenizer-6502.py +++ b/etc/scripts/docenizers/docenizer-6502.py @@ -36,10 +36,10 @@ def __init__(self, mnemonic, cpu_type): def html_description(self): if self.description: - html = "" - for desc_line in self.description: - html += f"

{escape_quotes(desc_line)}

" - return html + return "".join( + f"

{escape_quotes(desc_line)}

" + for desc_line in self.description + ) elif self.long_name: return f"

{escape_quotes(self.long_name)}

" elif self.name: diff --git a/etc/scripts/util/contributorer.py b/etc/scripts/util/contributorer.py index 0eb3ee4224c..6fa9a20eb6e 100644 --- a/etc/scripts/util/contributorer.py +++ b/etc/scripts/util/contributorer.py @@ -99,7 +99,7 @@ def get_collaborators(args): def create_file(args): repository_safe = "".join([c for c in args.repository if re.match(r'\w', c)]) collaborators = get_collaborators(args) - skippable = set([collaborator['login'].lower() for collaborator in collaborators]) + skippable = {collaborator['login'].lower() for collaborator in collaborators} # Remove people that are in CONTRIBUTORS for some reason or another skippable.discard('lefticus') skippable.discard('ubsan') diff --git a/etc/scripts/util/formatcheck.py b/etc/scripts/util/formatcheck.py index d00841e3e80..b56f810f2ad 100644 --- a/etc/scripts/util/formatcheck.py +++ b/etc/scripts/util/formatcheck.py @@ -73,7 +73,7 @@ def list_files_under_vc() -> Set[str]: output = subprocess.check_output( ["git", "ls-tree", "-r", "main", "--name-only"] ).decode("utf-8") - paths = {x for x in output.splitlines()} + paths = set(output.splitlines()) return paths diff --git a/etc/scripts/util/propscheck.py b/etc/scripts/util/propscheck.py index 92855a19612..201b08f1cfe 100644 --- a/etc/scripts/util/propscheck.py +++ b/etc/scripts/util/propscheck.py @@ -249,7 +249,7 @@ def process_folder(folder: str): def problems_found(file_result): - return any([len(file_result[r]) > 0 for r in file_result if r != "filename"]) + return any(len(file_result[r]) > 0 for r in file_result if r != "filename") def print_issue(name, result):