From 52790ced933112f2cef9cfd9248efcc301d53c6b Mon Sep 17 00:00:00 2001 From: Nathan McDougall Date: Fri, 10 Jan 2025 08:20:05 +1300 Subject: [PATCH] Pass tests and update schema creation script line --- src/usethis/_integrations/bitbucket/schema.py | 2 +- src/usethis/_integrations/pre_commit/schema.py | 2 +- tests/usethis/_integrations/bitbucket/test_schema.py | 2 +- tests/usethis/_integrations/pre_commit/test_schema.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/usethis/_integrations/bitbucket/schema.py b/src/usethis/_integrations/bitbucket/schema.py index a62c200..f7e095a 100644 --- a/src/usethis/_integrations/bitbucket/schema.py +++ b/src/usethis/_integrations/bitbucket/schema.py @@ -2,7 +2,7 @@ # filename: schema.json # timestamp: 2025-01-08T09:46:09+00:00 # using the command: -# datamodel-codegen --input tests\usethis\_integrations\bitbucket\schema.json --input-file-type jsonschema --output src\usethis\_integrations\bitbucket\schema.py --enum-field-as-literal all --field-constraints --use-double-quotes --use-union-operator --use-standard-collections --use-default-kwarg --output-model-type pydantic_v2.BaseModel --target-python-version 3.12 +# datamodel-codegen --input tests\usethis\_integrations\bitbucket\schema.json --input-file-type jsonschema --output src\usethis\_integrations\bitbucket\schema.py --enum-field-as-literal all --field-constraints --use-double-quotes --use-union-operator --use-standard-collections --use-default-kwarg --output-model-type pydantic_v2.BaseModel --target-python-version 3.11 # ruff: noqa: ERA001 # pyright: reportGeneralTypeIssues=false # plus manually add Definitions.scripts for type hinting diff --git a/src/usethis/_integrations/pre_commit/schema.py b/src/usethis/_integrations/pre_commit/schema.py index f91890a..065ab13 100644 --- a/src/usethis/_integrations/pre_commit/schema.py +++ b/src/usethis/_integrations/pre_commit/schema.py @@ -2,7 +2,7 @@ # filename: schema.json # timestamp: 2024-12-13T02:06:43+00:00 # using the command: -# datamodel-codegen --input tests\usethis\_integrations\pre_commit\schema.json --input-file-type jsonschema --output src\usethis\_integrations\pre_commit\schema.py --enum-field-as-literal all --field-constraints --use-double-quotes --use-union-operator --use-standard-collections --use-default-kwarg --output-model-type pydantic_v2.BaseModel --target-python-version 3.12 +# datamodel-codegen --input tests\usethis\_integrations\pre_commit\schema.json --input-file-type jsonschema --output src\usethis\_integrations\pre_commit\schema.py --enum-field-as-literal all --field-constraints --use-double-quotes --use-union-operator --use-standard-collections --use-default-kwarg --output-model-type pydantic_v2.BaseModel --target-python-version 3.11 # ruff: noqa: ERA001 # pyright: reportGeneralTypeIssues=false # plus manually remove default for LocalRepo.repo diff --git a/tests/usethis/_integrations/bitbucket/test_schema.py b/tests/usethis/_integrations/bitbucket/test_schema.py index 257873b..b3afd12 100644 --- a/tests/usethis/_integrations/bitbucket/test_schema.py +++ b/tests/usethis/_integrations/bitbucket/test_schema.py @@ -32,4 +32,4 @@ def test_matches_schema_store(self): def test_target_python_version(self): # If this test fails, we should bump the version in the command in schema.py - assert Path(".python-version").read_text().startswith("3.12") + assert Path(".python-version").read_text().startswith("3.11") diff --git a/tests/usethis/_integrations/pre_commit/test_schema.py b/tests/usethis/_integrations/pre_commit/test_schema.py index b83a762..3e6df02 100644 --- a/tests/usethis/_integrations/pre_commit/test_schema.py +++ b/tests/usethis/_integrations/pre_commit/test_schema.py @@ -33,4 +33,4 @@ def test_matches_schema_store(self): def test_target_python_version(self): # If this test fails, we should bump the version in the command in schema.py - assert Path(".python-version").read_text().startswith("3.12") + assert Path(".python-version").read_text().startswith("3.11")