Skip to content

Commit f605de9

Browse files
authored
Add ty JSON schema (SchemaStore#4687)
* Init ty's JSON schema Add ty's JSON schema * Add tests, add to catalog
1 parent b4fae6a commit f605de9

File tree

6 files changed

+881
-0
lines changed

6 files changed

+881
-0
lines changed

src/api/json/catalog.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7265,6 +7265,12 @@
72657265
"fileMatch": ["tunnelhub.yml", "tunnelhub.yaml"],
72667266
"url": "https://json.schemastore.org/tunnelhub.json"
72677267
},
7268+
{
7269+
"name": "ty",
7270+
"description": "ty, a fast Python type checker",
7271+
"fileMatch": ["ty.toml"],
7272+
"url": "https://json.schemastore.org/ty.json"
7273+
},
72687274
{
72697275
"name": "Problem object RFC9457",
72707276
"description": "Problem object per RFC 9457",
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#:schema ../../schemas/json/pyproject.json
2+
[tool.ty.rules]
3+
# Incorrect severity, should be error
4+
division-by-zero = "err"

src/schema-validation.jsonc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -970,6 +970,7 @@
970970
"poetry.json",
971971
"ruff.json",
972972
"tombi.json",
973+
"ty.json",
973974
"uv.json",
974975
"base.json"
975976
],
@@ -1025,6 +1026,7 @@
10251026
"poetry.json",
10261027
"ruff.json",
10271028
"tombi.json",
1029+
"ty.json",
10281030
"uv.json",
10291031
"base.json"
10301032
],
@@ -1137,6 +1139,9 @@
11371139
"tsoa.json": {
11381140
"externalSchema": ["tsconfig.json", "base-04.json"]
11391141
},
1142+
"ty.json": {
1143+
"unknownFormat": ["uint16", "uint8", "uint", "int"]
1144+
},
11401145
"uv.json": {
11411146
"unknownFormat": ["uint16", "uint8", "uint", "int"]
11421147
},

src/schemas/json/pyproject.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -893,6 +893,11 @@
893893
"title": "Linter and Formatter",
894894
"description": "An extremely fast Python linter and formatter, written in Rust."
895895
},
896+
"ty": {
897+
"$ref": "https://json.schemastore.org/ty.json",
898+
"title": "Type checker",
899+
"description": "An extremely fast Python type checker, written in Rust."
900+
},
896901
"hatch": {
897902
"$ref": "https://json.schemastore.org/hatch.json",
898903
"title": "Project Manager",

0 commit comments

Comments
 (0)