From 801f762892d0d3ddfa2e3e8096c857b52ae9b58d Mon Sep 17 00:00:00 2001 From: yassun7010 <47286750+yassun7010@users.noreply.github.com> Date: Sun, 16 Mar 2025 16:37:41 +0900 Subject: [PATCH 1/3] docs: update tombi meta properties. (#4575) --- CONTRIBUTING.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4854c730a64..a670ae3abc4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -313,6 +313,14 @@ Used by: `tamasfe/taplo`. Used by: `tombi-toml/tombi`. +**`x-tombi-array-values-order`** + +Used by: `tombi-toml/tombi`. + +**`x-tombi-table-keys-order`** + +Used by: `tombi-toml/tombi`. + **`x-intellij-language-injection`** Used by Intellij. From fd8a173ee0f3e9ced708b9e3d55b13464b09aede Mon Sep 17 00:00:00 2001 From: Gabriel Lopes Rodrigues Date: Sun, 16 Mar 2025 04:38:47 -0300 Subject: [PATCH 2/3] fix(pytest): add string as valid option for all string arrays (#4574) --- src/schemas/json/partial-pytest.json | 150 ++++++++++++++++++++------- 1 file changed, 110 insertions(+), 40 deletions(-) diff --git a/src/schemas/json/partial-pytest.json b/src/schemas/json/partial-pytest.json index ff80b272f6a..304c878de50 100644 --- a/src/schemas/json/partial-pytest.json +++ b/src/schemas/json/partial-pytest.json @@ -25,10 +25,17 @@ "type": "object", "properties": { "addopts": { - "type": "array", - "items": { - "type": "string" - }, + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string" + } + ], "description": "Extra command line options to be added by default.", "x-tombi-array-values-order": "ascending" }, @@ -58,10 +65,17 @@ "description": "Sets default encoding for doctest files." }, "doctest_optionflags": { - "type": "array", - "items": { - "type": "string" - }, + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string" + } + ], "description": "Specifies doctest flag names from the `doctest` module.", "x-tombi-array-values-order": "ascending" }, @@ -76,10 +90,17 @@ "description": "Sets timeout in seconds for dumping the traceback of all threads if a test takes too long." }, "filterwarnings": { - "type": "array", - "items": { - "type": "string" - }, + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string" + } + ], "description": "Sets action to take for matching warnings. Each item is a warning specification string.", "x-tombi-array-values-order": "ascending" }, @@ -173,10 +194,17 @@ "description": "Sets minimum log level for captured logging. Can be level name or integer value." }, "markers": { - "type": "array", - "items": { - "type": "string" - }, + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string" + } + ], "description": "Allows registering additional markers for test functions.", "x-tombi-array-values-order": "ascending" }, @@ -200,10 +228,17 @@ "x-tombi-array-values-order": "ascending" }, "python_classes": { - "type": "array", - "items": { - "type": "string" - }, + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string" + } + ], "description": "Specifies name prefixes or glob patterns for identifying test classes.", "x-tombi-array-values-order": "ascending" }, @@ -224,35 +259,63 @@ "x-tombi-array-values-order": "ascending" }, "python_functions": { - "type": "array", - "items": { - "type": "string" - }, + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string" + } + ], "description": "Specifies name prefixes or glob patterns for identifying test functions and methods.", "default": ["test_*"], "x-tombi-array-values-order": "ascending" }, "pythonpath": { - "type": "array", - "items": { - "type": "string" - }, + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string" + } + ], "description": "Sets list of directories to be added to the Python search path. Paths are relative to root directory.", "x-tombi-array-values-order": "ascending" }, "required_plugins": { - "type": "array", - "items": { - "type": "string" - }, + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string" + } + ], "description": "Space-separated list of plugins required to run pytest. Can include version specifiers.", "x-tombi-array-values-order": "ascending" }, "testpaths": { - "type": "array", - "items": { - "type": "string" - }, + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string" + } + ], "description": "Sets directories to search for tests when no specific paths are given on the command line. Paths are relative to root directory. Shell-style wildcards can be used.", "x-tombi-array-values-order": "ascending" }, @@ -268,10 +331,17 @@ "default": "all" }, "usefixtures": { - "type": "array", - "items": { - "type": "string" - }, + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string" + } + ], "description": "List of fixtures that will be applied to all test functions.", "x-tombi-array-values-order": "ascending" }, From 99b1049bc24ff7a24aa9375ccabb0065bb39bfc5 Mon Sep 17 00:00:00 2001 From: Steven Hartland Date: Sun, 16 Mar 2025 07:53:36 +0000 Subject: [PATCH 3/3] fix: enable prettier pre commit check on jsonc files (#4573) * fix: enable prettier pre commit check on jsonc files Enable the pre commit prettier check on jsonc files by enabling it for all files which identify as text. Disable always run as passing no files would just error. * chore: enable color in pre commit hook Enable color in pre commit hook as it has no impact on action but when run locally allows the user to see the issue more readily. --- .pre-commit-config.yaml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 07b7bbe8628..0b25a70b1cd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,10 +4,7 @@ repos: rev: 'v3.5.3' hooks: - id: 'prettier' - # TODO: Add 'jsonc' so 'src/schema-validation.jsonc' is checked in CI - # Error: "Type tag 'jsonc' is not recognized. Try upgrading identify and pre-commit?" - types_or: ['yaml', 'json', 'javascript', 'css', 'markdown'] - always_run: true + types: [text] additional_dependencies: - 'prettier@3.5.2' - 'prettier-plugin-sort-json@4.0.0' @@ -15,9 +12,8 @@ repos: pass_filenames: true args: [ - '--no-color', '--log-level=warn', - '--write', + '--check', '--config=.prettierrc.cjs', '--ignore-path=.gitignore', ]