mirror of
https://github.com/no2chem/wideq.git
synced 2025-06-02 15:30:14 -07:00
Use f-strings for command line options
These are more readable than the .format strings.
This commit is contained in:
parent
5a20b35171
commit
6461596219
@ -214,19 +214,17 @@ def main():
|
|||||||
description='Interact with the LG SmartThinQ API.'
|
description='Interact with the LG SmartThinQ API.'
|
||||||
)
|
)
|
||||||
parser.add_argument('cmd', metavar='CMD', nargs='?', default='ls',
|
parser.add_argument('cmd', metavar='CMD', nargs='?', default='ls',
|
||||||
help='one of {}'.format(', '.join(EXAMPLE_COMMANDS)))
|
help=f'one of: {", ".join(EXAMPLE_COMMANDS)}')
|
||||||
parser.add_argument('args', metavar='ARGS', nargs='*',
|
parser.add_argument('args', metavar='ARGS', nargs='*',
|
||||||
help='subcommand arguments')
|
help='subcommand arguments')
|
||||||
|
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--country', '-c',
|
'--country', '-c',
|
||||||
help='country code for account (default: {})'
|
help=f'country code for account (default: {wideq.DEFAULT_COUNTRY})'
|
||||||
.format(wideq.DEFAULT_COUNTRY)
|
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--language', '-l',
|
'--language', '-l',
|
||||||
help='language code for the API (default: {})'
|
help=f'language code for the API (default: {wideq.DEFAULT_LANGUAGE})'
|
||||||
.format(wideq.DEFAULT_LANGUAGE)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user