Run with the following pre-commit configuration: ``` repos: - repo: https://github.com/asottile/pyupgrade rev: v3.1.0 hooks: - id: pyupgrade args: [ "--py3-plus", "--py36-plus", "--py37-plus" ] ``` The rationale for every change can be found at https://github.com/asottile/pyupgrade