diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a88fe59a..9e9695f6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -23,3 +23,9 @@ repos: - id: mypy files: ^(cibuildwheel/|test/|bin/projects.py|unit_test/) pass_filenames: false + +- repo: https://github.com/asottile/pyupgrade + rev: v2.7.4 + hooks: + - id: pyupgrade + args: ["--py36-plus"] diff --git a/bin/bump_version.py b/bin/bump_version.py index 4d9e6c9e..34b534ce 100755 --- a/bin/bump_version.py +++ b/bin/bump_version.py @@ -81,7 +81,7 @@ def bump_version(): ) if not found_at_least_one_file_needing_update: - print('error: Didn’t find any occurences of “{}” in “{}”'.format(find_pattern, path_pattern)) + print(f'error: Didn’t find any occurences of “{find_pattern}” in “{path_pattern}”') exit(1) print() @@ -94,7 +94,7 @@ def bump_version(): red="\u001b[31m", green="\u001b[32m", off="\u001b[0m" )) - print('Then commit, and tag as v{}'.format(new_version)) + print(f'Then commit, and tag as v{new_version}') answer = input('Proceed? [y/N] ').strip() diff --git a/setup.py b/setup.py index b694e6e4..60684932 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- - from setuptools import setup setup()