diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d0ff787a..044c47df 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,13 +13,25 @@ repos: - id: mixed-line-ending - id: trailing-whitespace +- repo: https://github.com/asottile/pyupgrade + rev: v2.19.0 + hooks: + - id: pyupgrade + name: PyUpgrade 3.6+ + args: ["--py36-plus"] + exclude: ^bin/ + - id: pyupgrade + name: PyUpgrade 3.7+ on bin + exclude: ^(cibuildwheel|unit_test|test)/ + args: ["--py37-plus"] + - repo: https://github.com/PyCQA/isort rev: 5.8.0 hooks: - id: isort - repo: https://github.com/psf/black - rev: 21.5b1 + rev: 21.5b2 hooks: - id: black @@ -42,18 +54,6 @@ repos: additional_dependencies: [packaging] args: ["--python-version=3.7", "--ignore-missing-imports", "--scripts-are-modules"] -- repo: https://github.com/asottile/pyupgrade - rev: v2.16.0 - hooks: - - id: pyupgrade - name: PyUpgrade 3.6+ - args: ["--py36-plus"] - exclude: ^bin/ - - id: pyupgrade - name: PyUpgrade 3.7+ on bin - exclude: ^(cibuildwheel|unit_test|test)/ - args: ["--py37-plus"] - - repo: https://github.com/PyCQA/flake8 rev: 3.9.2 hooks: diff --git a/bin/update_pythons.py b/bin/update_pythons.py index eb813344..c21b0823 100755 --- a/bin/update_pythons.py +++ b/bin/update_pythons.py @@ -165,11 +165,11 @@ class PyPyVersions: version = release["python_version"] identifier = f"pp{version.major}{version.minor}-macosx_x86_64" - (url,) = [ + (url,) = ( rf["download_url"] for rf in release["files"] if "" in rf["platform"] == "darwin" and rf["arch"] == "x64" - ] + ) return ConfigMacOS( identifier=identifier, diff --git a/test/utils.py b/test/utils.py index 136b26cb..c1baf4d9 100644 --- a/test/utils.py +++ b/test/utils.py @@ -150,10 +150,8 @@ def expected_wheels( platform_tags = [ ".".join( - [ - f"{manylinux_version}_{architecture}" - for manylinux_version in manylinux_versions - ] + f"{manylinux_version}_{architecture}" + for manylinux_version in manylinux_versions ) for architecture in architectures ]