Skip to content

Commit

Permalink
For Python < 3.10, rename “optional arguments” as “options”.
Browse files Browse the repository at this point in the history
  • Loading branch information
jwilk committed Feb 26, 2024
1 parent 34e2eee commit 7b58a04
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ubanner
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ except UnicodeError:
def main():
signal.signal(signal.SIGPIPE, signal.SIG_DFL)
ap = argparse.ArgumentParser()
if sys.version_info < (3, 10):
# https://bugs.python.org/issue9694
ap._optionals.title = 'options'
ap.add_argument('--version', action=VersionAction)
ap.add_argument('--list-fonts', nargs=0, action=act_list_fonts,
help='print list of available font faces',
Expand Down

0 comments on commit 7b58a04

Please sign in to comment.