diff options
author | Thomas Waldmann <tw@waldmann-edv.de> | 2022-02-27 19:31:33 +0100 |
---|---|---|
committer | Thomas Waldmann <tw@waldmann-edv.de> | 2022-02-27 21:12:44 +0100 |
commit | c4ed840c7b57c25db712af71e11c0adb97728aa8 (patch) | |
tree | 6c33ba7731facb5b5199b552be4012f370669dd7 /setup_docs.py | |
parent | 6c243b2c282253a20da64396b30d535acf8d35a8 (diff) |
pyupgrade --py38-plus ./**/*.py
Diffstat (limited to 'setup_docs.py')
-rw-r--r-- | setup_docs.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/setup_docs.py b/setup_docs.py index d326ec8d2..9513604bb 100644 --- a/setup_docs.py +++ b/setup_docs.py @@ -12,7 +12,7 @@ from setuptools import Command def long_desc_from_readme(): - with open('README.rst', 'r') as fd: + with open('README.rst') as fd: long_description = fd.read() # remove header, but have one \n before first headline start = long_description.find('What is BorgBackup?') @@ -33,7 +33,7 @@ def format_metavar(option): elif option.nargs is None: return option.metavar else: - raise ValueError('Can\'t format metavar %s, unknown nargs %s!' % (option.metavar, option.nargs)) + raise ValueError(f'Can\'t format metavar {option.metavar}, unknown nargs {option.nargs}!') class build_usage(Command): @@ -367,7 +367,7 @@ class build_man(Command): subparsers = [action for action in parser._actions if 'SubParsersAction' in str(action.__class__)][0] for subcommand in subparsers.choices: write('| borg', '[common options]', command, subcommand, '...') - self.see_also.setdefault(command, []).append('%s-%s' % (command, subcommand)) + self.see_also.setdefault(command, []).append(f'{command}-{subcommand}') else: if command == "borgfs": write(command, end='') |