diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b6789ede9..d79d84e3c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,21 +5,16 @@ repos: - id: detect-private-key - id: end-of-file-fixer - id: trailing-whitespace - - repo: https://github.com/pre-commit/pygrep-hooks - rev: v1.10.0 - hooks: - - id: python-check-mock-methods - - id: python-use-type-annotations - # Using this mirror lets us use mypyc-compiled black, which is about 2x faster - - repo: https://github.com/psf/black-pre-commit-mirror - rev: 24.4.2 - hooks: - - id: black - # It is recommended to specify the latest version of Python - # supported by your project here, or alternatively use - # pre-commit's default_language_version, see - # https://pre-commit.com/#top_level-default_language_version - language_version: python3.11 + # # Using this mirror lets us use mypyc-compiled black, which is about 2x faster + # - repo: https://github.com/psf/black-pre-commit-mirror + # rev: 24.4.2 + # hooks: + # - id: black + # # It is recommended to specify the latest version of Python + # # supported by your project here, or alternatively use + # # pre-commit's default_language_version, see + # # https://pre-commit.com/#top_level-default_language_version + # language_version: python3.11 - repo: https://github.com/pycqa/isort rev: 5.13.2 hooks: @@ -32,11 +27,18 @@ repos: - flake8-bugbear==24.2.6 - flake8-comprehensions - flake8-simplify - - repo: https://github.com/tox-dev/pyproject-fmt - rev: "1.8.0" + # - repo: https://github.com/tox-dev/pyproject-fmt + # rev: "1.8.0" + # hooks: + # - id: pyproject-fmt + # # https://pyproject-fmt.readthedocs.io/en/latest/#calculating-max-supported-python-version + # additional_dependencies: ["tox>=4.9"] + - repo: https://github.com/PyCQA/docformatter + rev: v1.7.5 hooks: - - id: pyproject-fmt - # https://pyproject-fmt.readthedocs.io/en/latest/#calculating-max-supported-python-version - additional_dependencies: ["tox>=4.9"] + - id: docformatter + additional_dependencies: [tomli] + args: [--in-place --config ./pyproject.toml] + ci: autoupdate_schedule: monthly diff --git a/pyproject.toml b/pyproject.toml index 4ceac2e51..7abd95f5f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,6 +50,10 @@ extend-exclude = '''( (_pb2.pyi?|_pb2_grpc.pyi?)$ )''' +[tool.docformatter] +blank = true +style = "google" + [tool.pytest.ini_options] asyncio_mode = "auto" log_auto_indent = true