From ac4eaf8daf12eb0cf06fbcf91e10f02c98842bd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=8Dtalo=20Epif=C3=A2nio?= Date: Sun, 3 Mar 2024 21:01:12 -0300 Subject: [PATCH] Rollback ruff version to avoid nbqa warning. Add pre-commit --- .pre-commit-config.yaml | 18 ++++++++++++++++++ mypy.ini | 3 +++ settings.ini | 2 +- 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..595b29a --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,18 @@ +repos: + - repo: local + hooks: + - id: run-lint + name: Run lint + entry: bash -c 'nbqa ruff --fix nbs/*.ipynb' + language: system + pass_filenames: false + - id: run-mypy + name: Run mypy + entry: bash -c 'nbqa mypy nbs/*.ipynb' + language: system + pass_filenames: false + - id: run-tests + name: Run Tests + entry: nbdev_test + language: system + pass_filenames: false diff --git a/mypy.ini b/mypy.ini index 976ba02..17a8467 100644 --- a/mypy.ini +++ b/mypy.ini @@ -1,2 +1,5 @@ [mypy] ignore_missing_imports = True + +[mypy-path.jsonschema] +ignore_errors = True diff --git a/settings.ini b/settings.ini index 17f9833..658f9eb 100644 --- a/settings.ini +++ b/settings.ini @@ -27,7 +27,7 @@ language = English status = 3 user = itepifanio requirements = ipykernel>=6.20.1 -dev_requirements = solara>=1.26.1 nbqa>=1.8.3 ruff>=0.3.0 mypy>=1.8.0 +dev_requirements = solara>=1.26.1 nbqa>=1.8.3 ruff<=0.2.2 mypy>=1.8.0 pre-commit readme_nb = index.ipynb allowed_metadata_keys = allowed_cell_metadata_keys =