Skip to content

Commit

Permalink
update some py scripts (#4533)
Browse files Browse the repository at this point in the history
  • Loading branch information
imba-tjd authored and mattgodbolt committed Jan 24, 2023
1 parent d019fa7 commit 66ca438
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions etc/scripts/docenizers/docenizer-6502.py
Expand Up @@ -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"<p>{escape_quotes(desc_line)}</p>"
return html
return "".join(
f"<p>{escape_quotes(desc_line)}</p>"
for desc_line in self.description
)
elif self.long_name:
return f"<p>{escape_quotes(self.long_name)}</p>"
elif self.name:
Expand Down
2 changes: 1 addition & 1 deletion etc/scripts/util/contributorer.py
Expand Up @@ -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')
Expand Down
2 changes: 1 addition & 1 deletion etc/scripts/util/formatcheck.py
Expand Up @@ -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


Expand Down
2 changes: 1 addition & 1 deletion etc/scripts/util/propscheck.py
Expand Up @@ -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):
Expand Down

0 comments on commit 66ca438

Please sign in to comment.