Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,18 @@ repos:
types_or: ['yaml', 'json', 'javascript', 'css', 'markdown']
always_run: true
additional_dependencies:
- 'prettier@3.4.2'
- 'prettier@3.5.2'
- 'prettier-plugin-sort-json@4.0.0'
- 'prettier-plugin-toml@2.0.1'
pass_filenames: true
args: ['--no-color', '--log-level=warn', '--write']
args:
[
'--no-color',
'--log-level=warn',
'--write',
'--config=.prettierrc.cjs',
'--ignore-path=.gitignore',
]
- repo: 'https://github.com/codespell-project/codespell'
rev: 'v2.4.1'
hooks:
Expand Down
5 changes: 4 additions & 1 deletion src/schema-validation.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -992,7 +992,10 @@
"unknownKeywords": ["markdownDescription", "x-intellij-html-description"]
},
"partial-pytest.json": {
"unknownKeywords": ["x-tombi-array-values-order", "x-tombi-table-keys-order"]
"unknownKeywords": [
"x-tombi-array-values-order",
"x-tombi-table-keys-order"
]
},
"partial-setuptools.json": {
"unknownFormat": [
Expand Down
81 changes: 71 additions & 10 deletions src/schemas/json/partial-pytest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,14 @@
"type": "object",
"properties": {
"ini_options": {
"$ref": "#/definitions/IniOptions",
"allOf": [
{
"$ref": "#/definitions/IniOptions"
},
{
"$ref": "#/definitions/IniOptionsAsyncio"
}
],
"title": "Bridge Configuration Options for `pytest.ini` File",
"description": "The `ini_options` table is used as a bridge between the existing `pytest.ini` configuration system and future configuration formats. `pytest.ini` takes precedence over `[tool.pytest.ini_options]` in `pyproject.toml`."
}
Expand All @@ -14,6 +21,7 @@
"x-tombi-table-keys-order": "schema",
"definitions": {
"IniOptions": {
"$comment": "additionalProperties is true because the schema is merged with other schemas",
"type": "object",
"properties": {
"addopts": {
Expand Down Expand Up @@ -177,10 +185,17 @@
"description": "Specifies minimum required pytest version."
},
"norecursedirs": {
"type": "array",
"items": {
"type": "string"
},
"oneOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "string"
}
],
"description": "Sets base name patterns for directories to be skipped during test discovery. Uses fnmatch-style matching. Replaces default patterns.",
"x-tombi-array-values-order": "ascending"
},
Expand All @@ -193,10 +208,17 @@
"x-tombi-array-values-order": "ascending"
},
"python_files": {
"type": "array",
"items": {
"type": "string"
},
"oneOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "string"
}
],
"description": "Specifies glob patterns for identifying Python test module files.",
"default": ["test_*.py", "*_test.py"],
"x-tombi-array-values-order": "ascending"
Expand Down Expand Up @@ -285,9 +307,48 @@
"default": false
}
},
"additionalProperties": false,
"additionalProperties": true,
"x-tombi-table-keys-order": "schema"
},
"IniOptionsAsyncio": {
"$comment": "additionalProperties is true because the schema is merged with other schemas",
"description": "Configuration options for pytest-asyncio.\nhttps://pytest-asyncio.readthedocs.io/en/latest/reference/configuration.html",
"type": "object",
"properties": {
"asyncio_default_fixture_loop_scope": {
"$ref": "#/definitions/AsyncioScope",
"type": "string",
"description": "Default event loop scope of asynchronous fixtures. When this configuration option is unset, it defaults to the fixture scope. In future versions of pytest-asyncio, the value will default to function when unset"
},
"asyncio_default_test_loop_scope": {
"$ref": "#/definitions/AsyncioScope",
"type": "string",
"description": "Default event loop scope of asynchronous tests. When this configuration option is unset, it default to function scope",
"default": "function"
},
"asyncio_mode": {
"type": "string",
"oneOf": [
{
"const": "auto",
"description": "Automatically handling all async functions by the plugin"
},
{
"const": "strict",
"description": "Auto processing disabling (useful if different async frameworks should be tested together, e.g. both pytest-asyncio and pytest-trio are used in the same project"
}
],
"description": "Sets the asyncio mode for pytest-asyncio.",
"default": "strict"
}
},
"additionalProperties": true,
"x-tombi-table-keys-order": "schema"
},
"AsyncioScope": {
"type": "string",
"enum": ["function", "class", "module", "package", "session"]
},
"LogLevel": {
"type": "string",
"enum": ["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"]
Expand Down
4 changes: 1 addition & 3 deletions src/test/pep-723/2.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#:schema ../../schemas/json/pep-723.json
requires-python = ""
dependencies = [
"a-n-plus-b>=0.0.1"
]
dependencies = ["a-n-plus-b>=0.0.1"]

[tool.ruff]
select = ["RUF001"]
16 changes: 8 additions & 8 deletions src/test/prettierrc/.prettierrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ tabWidth: 4
semi: false
singleQuote: true
overrides:
- files: '*.test.js'
options:
semi: true
- files:
- '*.html'
- 'legacy/**/*.js'
options:
tabWidth: 4
- files: '*.test.js'
options:
semi: true
- files:
- '*.html'
- 'legacy/**/*.js'
options:
tabWidth: 4
60 changes: 30 additions & 30 deletions src/test/prettierrc/prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
{
"arrowParens": "always",
"bracketSameLine": false,
"bracketSpacing": true,
"htmlWhitespaceSensitivity": "css",
"insertPragma": false,
"jsxBracketSameLine": false,
"jsxSingleQuote": false,
"overrides": [
{
"files": ["*/*.Rmd"],
"options": {
"parser": "markdown"
}
},
{
"files": ["*/*.type"],
"options": {
"parser": "custom"
}
}
],
"printWidth": 80,
"proseWrap": "preserve",
"quoteProps": "as-needed",
"requirePragma": false,
"semi": true,
"singleQuote": false,
"tabWidth": 2,
"trailingComma": "all",
"useTabs": false
"arrowParens": "always",
"bracketSameLine": false,
"bracketSpacing": true,
"htmlWhitespaceSensitivity": "css",
"insertPragma": false,
"jsxBracketSameLine": false,
"jsxSingleQuote": false,
"overrides": [
{
"files": ["*/*.Rmd"],
"options": {
"parser": "markdown"
}
},
{
"files": ["*/*.type"],
"options": {
"parser": "custom"
}
}
],
"printWidth": 80,
"proseWrap": "preserve",
"quoteProps": "as-needed",
"requirePragma": false,
"semi": true,
"singleQuote": false,
"tabWidth": 2,
"trailingComma": "all",
"useTabs": false
}
4 changes: 1 addition & 3 deletions src/test/pyproject/poetry-dependencies-no-python.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
name = "dependencies-no-python"
version = "0.1.0"
description = ""
authors = [
{name = "Elvis Presley",email = "theking@example.com"}
]
authors = [{ name = "Elvis Presley", email = "theking@example.com" }]
requires-python = ">=3.8"

[tool.poetry.dependencies]
Expand Down