Skip to content

Conversation

@WrRan
Copy link
Contributor

@WrRan WrRan commented Feb 27, 2025

remove unused metavar of _StoreConstAction.__init__

@savannahostrowski
Copy link
Member

Removing metavar here results in a NameError because it's expected later on in add_argument. If you try to build, you'll get:

Traceback (most recent call last):
  File "/Users/savannah/cpython/./Tools/build/generate-build-details.py", line 192, in <module>
    main()
    ~~~~^^
  File "/Users/savannah/cpython/./Tools/build/generate-build-details.py", line 163, in main
    parser.add_argument('location')
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
  File "/Users/savannah/cpython/Lib/argparse.py", line 1455, in add_argument
    action = action_class(**kwargs)
  File "/Users/savannah/cpython/Lib/argparse.py", line 919, in __init__
    metavar=metavar,
            ^^^^^^^
NameError: name 'metavar' is not defined

@savannahostrowski
Copy link
Member

Closing this PR as metavar is not unused

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants