From a2d178b87c1fc83dda1227937473e67713393bf2 Mon Sep 17 00:00:00 2001 From: Corentin Berteaux Date: Wed, 14 Jun 2023 17:02:04 +0200 Subject: [PATCH 1/2] Modify Ruff config to exclude pydantic base models from type-checking block rules --- generators/app/templates/common/pyproject.toml | 2 ++ package-lock.json | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/generators/app/templates/common/pyproject.toml b/generators/app/templates/common/pyproject.toml index 6a8aff4..289118a 100644 --- a/generators/app/templates/common/pyproject.toml +++ b/generators/app/templates/common/pyproject.toml @@ -90,6 +90,8 @@ ban-relative-imports = "all" [tool.ruff.flake8-type-checking] strict = true +runtime-evaluated-base-classes = ["pydantic.BaseModel"] +# Pydantic need to be able to evaluate types at runtime; see https://pypi.org/project/flake8-type-checking/ [tool.ruff.per-file-ignores] # Allow missing docstrings for tests diff --git a/package-lock.json b/package-lock.json index e7196d6..3275369 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,13 +1,13 @@ { "name": "generator-sicarator", - "version": "0.1.0", + "version": "1.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "generator-sicarator", - "version": "0.1.0", - "license": "MIT", + "version": "1.0.0", + "license": "Apache-2.0", "dependencies": { "chalk": "^2.1.0", "slugify": "^1.6.6", From d8c6ecff5d37813bc80c79b913dfb1c9a8c02242 Mon Sep 17 00:00:00 2001 From: Corentin Berteaux Date: Mon, 19 Jun 2023 17:55:23 +0200 Subject: [PATCH 2/2] Add both documentation links --- generators/app/templates/common/pyproject.toml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/generators/app/templates/common/pyproject.toml b/generators/app/templates/common/pyproject.toml index 289118a..b25c9d6 100644 --- a/generators/app/templates/common/pyproject.toml +++ b/generators/app/templates/common/pyproject.toml @@ -91,7 +91,9 @@ ban-relative-imports = "all" [tool.ruff.flake8-type-checking] strict = true runtime-evaluated-base-classes = ["pydantic.BaseModel"] -# Pydantic need to be able to evaluate types at runtime; see https://pypi.org/project/flake8-type-checking/ +# Pydantic needs to be able to evaluate types at runtime +# see https://pypi.org/project/flake8-type-checking/ for flake8-type-checking documentation +# see https://beta.ruff.rs/docs/settings/#flake8-type-checking-runtime-evaluated-base-classes for ruff documentation [tool.ruff.per-file-ignores] # Allow missing docstrings for tests