From 81dae7a5661bd70e22d0bf5d320d330042c28f3b Mon Sep 17 00:00:00 2001 From: Vlad Baydin Date: Sat, 13 Jan 2024 18:15:51 +0300 Subject: [PATCH] Switch to Ruff (#229) * add ruff repo to pre-commit * remove empty line * remove the redundant hooks --- .pre-commit-config.yaml | 26 ++++++++------------------ examples/databases/create_database.py | 1 - 2 files changed, 8 insertions(+), 19 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a5ea58cd..2f44f0b5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,21 +1,9 @@ repos: -- repo: https://github.com/psf/black - rev: 22.3.0 - hooks: - - id: black -- repo: https://github.com/pycqa/isort - rev: 5.12.0 - hooks: - - id: isort - args: ["--profile", "black", "--filter-files"] -- repo: https://github.com/pycqa/flake8 - rev: 6.1.0 - hooks: - - id: flake8 - repo: https://github.com/igorshubovych/markdownlint-cli rev: v0.27.1 hooks: - id: markdownlint + - repo: https://github.com/pre-commit/mirrors-mypy rev: v0.900 hooks: @@ -23,12 +11,14 @@ repos: additional_dependencies: ["httpx"] args: [] files: "^notion_client\/.*" -- repo: https://github.com/pycqa/pydocstyle - rev: 6.0.0 - hooks: - - id: pydocstyle - files: "^notion_client\/.*" + - repo: https://github.com/editorconfig-checker/editorconfig-checker.python rev: 2.3.5 hooks: - id: editorconfig-checker + +- repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.1.11 + hooks: + - id: ruff + - id: ruff-format diff --git a/examples/databases/create_database.py b/examples/databases/create_database.py index ec4d39fc..83f4a3b5 100644 --- a/examples/databases/create_database.py +++ b/examples/databases/create_database.py @@ -84,7 +84,6 @@ def create_database(parent_id: str, db_name: str) -> dict: if __name__ == "__main__": - parent_id, db_name = manual_inputs() newdb = create_database(parent_id=parent_id, db_name=db_name) print(f"\n\nDatabase {db_name} created at {newdb['url']}\n")