Skip to content

Commit

Permalink
Use str.format_map()
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardobranco777 committed Nov 1, 2023
1 parent 1079764 commit 11ce705
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bugme.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def print_header(output_type: str, output_format: str, fields: dict[str, int]):
header = html_tag("thead", html_tag("tr", cells))
print(f"<table>{header}<tbody>")
elif output_type == "text":
print(output_format.format(**{field: field.upper() for field in fields}))
print(output_format.format_map({field: field.upper() for field in fields}))


def print_issue(
Expand Down Expand Up @@ -216,7 +216,7 @@ def print_issue(
)
print(html_tag("tr", cells))
elif output_type == "text":
print(output_format.format(**issue.__dict__))
print(output_format.format_map(issue.__dict__))
for info in issue.files:
print(
"\t"
Expand Down

0 comments on commit 11ce705

Please sign in to comment.