Skip to content

Commit 48d0b4b

Browse files
authored
Update ty's JSON schema (SchemaStore#5475)
This updates ty's JSON schema to [876233049afc2530181f5b8af390c6d57c65bb80](astral-sh/ty@8762330)
1 parent 6ea4210 commit 48d0b4b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/schemas/json/ty.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,7 @@
802802
},
803803
"invalid-key": {
804804
"title": "detects invalid subscript accesses or TypedDict literal keys",
805-
"description": "## What it does\nChecks for subscript accesses with invalid keys and `TypedDict` construction with an\nunknown key.\n\n## Why is this bad?\nSubscripting with an invalid key will raise a `KeyError` at runtime.\n\nCreating a `TypedDict` with an unknown key is likely a mistake; if the `TypedDict` is\n`closed=true` it also violates the expectations of the type.\n\n## Examples\n```python\nfrom typing import TypedDict\n\nclass Person(TypedDict):\n name: str\n age: int\n\nalice = Person(name=\"Alice\", age=30)\nalice[\"height\"] # KeyError: 'height'\n\nbob: Person = { \"name\": \"Bob\", \"age\": 30 } # typo!\n\ncarol = Person(name=\"Carol\", age=25) # typo!\n```",
805+
"description": "## What it does\nChecks for subscript accesses with invalid keys and `TypedDict` construction with an\nunknown key.\n\n## Why is this bad?\nSubscripting with an invalid key will raise a `KeyError` at runtime.\n\nCreating a `TypedDict` with an unknown key is likely a mistake; if the `TypedDict` is\n`closed=true` it also violates the expectations of the type.\n\n## Examples\n```python\nfrom typing import TypedDict\n\nclass Person(TypedDict):\n name: str\n age: int\n\nalice = Person(name=\"Alice\", age=30)\nalice[\"height\"] # KeyError: 'height'\n\nbob: Person = { \"namee\": \"Bob\", \"age\": 30 } # typo!\n\ncarol = Person(name=\"Carol\", aeg=25) # typo!\n```",
806806
"default": "error",
807807
"oneOf": [
808808
{

0 commit comments

Comments
 (0)