generated files

This commit is contained in:
Alex Waygood 2025-12-14 19:29:53 +00:00
parent 7a8ffed28d
commit ceea5c54f1
2 changed files with 1 additions and 12 deletions

View File

@ -78,7 +78,6 @@ Settings: Settings {
"invalid-type-form": Error (Default), "invalid-type-form": Error (Default),
"invalid-type-guard-call": Error (Default), "invalid-type-guard-call": Error (Default),
"invalid-type-guard-definition": Error (Default), "invalid-type-guard-definition": Error (Default),
"invalid-type-param-order": Error (Default),
"invalid-type-variable-constraints": Error (Default), "invalid-type-variable-constraints": Error (Default),
"missing-argument": Error (Default), "missing-argument": Error (Default),
"missing-typed-dict-key": Error (Default), "missing-typed-dict-key": Error (Default),

12
ty.schema.json generated
View File

@ -595,7 +595,7 @@
}, },
"invalid-generic-class": { "invalid-generic-class": {
"title": "detects invalid generic classes", "title": "detects invalid generic classes",
"description": "## What it does\nChecks for the creation of invalid generic classes\n\n## Why is this bad?\nThere are several requirements that you must follow when defining a generic class.\n\n## Examples\n```python\nfrom typing import Generic, TypeVar\n\nT = TypeVar(\"T\") # okay\n\n# error: class uses both PEP-695 syntax and legacy syntax\nclass C[U](Generic[T]): ...\n```\n\n## References\n- [Typing spec: Generics](https://typing.python.org/en/latest/spec/generics.html#introduction)", "description": "## What it does\nChecks for the creation of invalid generic classes\n\n## Why is this bad?\nThere are several requirements that you must follow when defining a generic class.\nMany of these result in `TypeError` being raised at runtime if they are violated.\n\n## Examples\n```python\nfrom typing_extensions import Generic, TypeVar\n\nT = TypeVar(\"T\")\nU = TypeVar(\"U\", default=int)\n\n# error: class uses both PEP-695 syntax and legacy syntax\nclass C[U](Generic[T]): ...\n\n# error: type parameter with default comes before type parameter without default\nclass D(Generic[U, T]): ...\n```\n\n## References\n- [Typing spec: Generics](https://typing.python.org/en/latest/spec/generics.html#introduction)",
"default": "error", "default": "error",
"oneOf": [ "oneOf": [
{ {
@ -813,16 +813,6 @@
} }
] ]
}, },
"invalid-type-param-order": {
"title": "detects invalid type parameter order",
"description": "## What it does\nChecks for type parameters without defaults that come after type parameters with defaults.\n\n## Why is this bad?\nType parameters without defaults must come before type parameters with defaults.\n\n## Example\n\n```python\nfrom typing import Generic, TypeVar\n\nT = TypeVar(\"T\")\nU = TypeVar(\"U\")\n# Error: T has no default but comes after U which has a default\nclass Foo(Generic[U = int, T]): ...\n```\n\n## References\n- [PEP 696: Type defaults for type parameters](https://peps.python.org/pep-0696/)",
"default": "error",
"oneOf": [
{
"$ref": "#/definitions/Level"
}
]
},
"invalid-type-variable-constraints": { "invalid-type-variable-constraints": {
"title": "detects invalid type variable constraints", "title": "detects invalid type variable constraints",
"description": "## What it does\nChecks for constrained [type variables] with only one constraint.\n\n## Why is this bad?\nA constrained type variable must have at least two constraints.\n\n## Examples\n```python\nfrom typing import TypeVar\n\nT = TypeVar('T', str) # invalid constrained TypeVar\n```\n\nUse instead:\n```python\nT = TypeVar('T', str, int) # valid constrained TypeVar\n# or\nT = TypeVar('T', bound=str) # valid bound TypeVar\n```\n\n[type variables]: https://docs.python.org/3/library/typing.html#typing.TypeVar", "description": "## What it does\nChecks for constrained [type variables] with only one constraint.\n\n## Why is this bad?\nA constrained type variable must have at least two constraints.\n\n## Examples\n```python\nfrom typing import TypeVar\n\nT = TypeVar('T', str) # invalid constrained TypeVar\n```\n\nUse instead:\n```python\nT = TypeVar('T', str, int) # valid constrained TypeVar\n# or\nT = TypeVar('T', bound=str) # valid bound TypeVar\n```\n\n[type variables]: https://docs.python.org/3/library/typing.html#typing.TypeVar",