From bbbc82bffc3e80c13d14276b2b4fcdf1a2cb5add Mon Sep 17 00:00:00 2001 From: Jack O'Connor Date: Fri, 28 Nov 2025 19:46:20 -0800 Subject: [PATCH 1/7] Update ty's JSON schema (#5166) This updates ty's JSON schema to [8c342496a24ad208b962d4451332835095d0e4ad](https://github.com/astral-sh/ty/commit/8c342496a24ad208b962d4451332835095d0e4ad) --- src/schemas/json/ty.json | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/schemas/json/ty.json b/src/schemas/json/ty.json index e661dd9ebee..816db17f525 100644 --- a/src/schemas/json/ty.json +++ b/src/schemas/json/ty.json @@ -558,6 +558,16 @@ } ] }, + "invalid-explicit-override": { + "title": "detects methods that are decorated with `@override` but do not override any method in a superclass", + "description": "## What it does\nChecks for methods that are decorated with `@override` but do not override any method in a superclass.\n\n## Why is this bad?\nDecorating a method with `@override` declares to the type checker that the intention is that it should\noverride a method from a superclass.\n\n## Example\n\n```python\nfrom typing import override\n\nclass A:\n @override\n def foo(self): ... # Error raised here\n\nclass B(A):\n @override\n def ffooo(self): ... # Error raised here\n\nclass C:\n @override\n def __repr__(self): ... # fine: overrides `object.__repr__`\n\nclass D(A):\n @override\n def foo(self): ... # fine: overrides `A.foo`\n```", + "default": "error", + "oneOf": [ + { + "$ref": "#/definitions/Level" + } + ] + }, "invalid-generic-class": { "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)", @@ -608,6 +618,16 @@ } ] }, + "invalid-method-override": { + "title": "detects method definitions that violate the Liskov Substitution Principle", + "description": "## What it does\nDetects method overrides that violate the [Liskov Substitution Principle] (\"LSP\").\n\nThe LSP states that an instance of a subtype should be substitutable for an instance of its supertype.\nApplied to Python, this means:\n1. All argument combinations a superclass method accepts\n must also be accepted by an overriding subclass method.\n2. The return type of an overriding subclass method must be a subtype\n of the return type of the superclass method.\n\n## Why is this bad?\nViolating the Liskov Substitution Principle will lead to many of ty's assumptions and\ninferences being incorrect, which will mean that it will fail to catch many possible\ntype errors in your code.\n\n## Example\n```python\nclass Super:\n def method(self, x) -> int:\n return 42\n\nclass Sub(Super):\n # Liskov violation: `str` is not a subtype of `int`,\n # but the supertype method promises to return an `int`.\n def method(self, x) -> str: # error: [invalid-override]\n return \"foo\"\n\ndef accepts_super(s: Super) -> int:\n return s.method(x=42)\n\naccepts_super(Sub()) # The result of this call is a string, but ty will infer\n # it to be an `int` due to the violation of the Liskov Substitution Principle.\n\nclass Sub2(Super):\n # Liskov violation: the superclass method can be called with a `x=`\n # keyword argument, but the subclass method does not accept it.\n def method(self, y) -> int: # error: [invalid-override]\n return 42\n\naccepts_super(Sub2()) # TypeError at runtime: method() got an unexpected keyword argument 'x'\n # ty cannot catch this error due to the violation of the Liskov Substitution Principle.\n```\n\n## Common issues\n\n### Why does ty complain about my `__eq__` method?\n\n`__eq__` and `__ne__` methods in Python are generally expected to accept arbitrary\nobjects as their second argument, for example:\n\n```python\nclass A:\n x: int\n\n def __eq__(self, other: object) -> bool:\n # gracefully handle an object of an unexpected type\n # without raising an exception\n if not isinstance(other, A):\n return False\n return self.x == other.x\n```\n\nIf `A.__eq__` here were annotated as only accepting `A` instances for its second argument,\nit would imply that you wouldn't be able to use `==` between instances of `A` and\ninstances of unrelated classes without an exception possibly being raised. While some\nclasses in Python do indeed behave this way, the strongly held convention is that it should\nbe avoided wherever possible. As part of this check, therefore, ty enforces that `__eq__`\nand `__ne__` methods accept `object` as their second argument.\n\n[Liskov Substitution Principle]: https://en.wikipedia.org/wiki/Liskov_substitution_principle", + "default": "error", + "oneOf": [ + { + "$ref": "#/definitions/Level" + } + ] + }, "invalid-named-tuple": { "title": "detects invalid `NamedTuple` class definitions", "description": "## What it does\nChecks for invalidly defined `NamedTuple` classes.\n\n## Why is this bad?\nAn invalidly defined `NamedTuple` class may lead to the type checker\ndrawing incorrect conclusions. It may also lead to `TypeError`s at runtime.\n\n## Examples\nA class definition cannot combine `NamedTuple` with other base classes\nin multiple inheritance; doing so raises a `TypeError` at runtime. The sole\nexception to this rule is `Generic[]`, which can be used alongside `NamedTuple`\nin a class's bases list.\n\n```pycon\n>>> from typing import NamedTuple\n>>> class Foo(NamedTuple, object): ...\nTypeError: can only inherit from a NamedTuple type and Generic\n```", From 9719c8449564961f8b8660d523023f63114f9d6e Mon Sep 17 00:00:00 2001 From: Cason Kervis Date: Sat, 29 Nov 2025 11:47:18 +0800 Subject: [PATCH 2/7] Add Zola configuration (#5170) --- src/api/json/catalog.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/api/json/catalog.json b/src/api/json/catalog.json index 4b272ea2e55..2693d72d36b 100644 --- a/src/api/json/catalog.json +++ b/src/api/json/catalog.json @@ -8801,6 +8801,12 @@ "description": "Configuration for R linter", "fileMatch": ["jarl.toml"], "url": "https://github.com/etiennebacher/jarl/releases/latest/download/jarl.schema.json" + }, + { + "name": "Zola Configuration", + "description": "A fast static site generator in a single binary with everything built-in", + "fileMatch": ["zola.toml"], + "url": "https://cscnk52.github.io/json-schemas/zola.schema.json" } ] } From 1ed331bf5889b8f101845039aa62cbc9af3bef3c Mon Sep 17 00:00:00 2001 From: Christian Oliff Date: Sat, 29 Nov 2025 12:47:35 +0900 Subject: [PATCH 3/7] HTMLHint: Add new rules and changes (#5171) * Add new rules and changes - Added the `link-rel-canonical-require` rule - Added the `form-method-require` rule - Add `allow-non-blocking` option to `head-script-disabled`. - Corrected grammatical errors in descriptions for various attributes (The schema structure is valid for JSON Schema draft-04) * Update enum values for head-script-disabled rule --- src/schemas/json/htmlhint.json | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/src/schemas/json/htmlhint.json b/src/schemas/json/htmlhint.json index c7d1e939435..bd3a1cd4ca5 100644 --- a/src/schemas/json/htmlhint.json +++ b/src/schemas/json/htmlhint.json @@ -23,12 +23,12 @@ "default": false }, "attr-unsafe-chars": { - "description": "Attribute value can't not use unsafe chars.", + "description": "Attribute value cannot use unsafe chars.", "type": "boolean", "default": false }, "attr-value-double-quotes": { - "description": "Attribute value must closed by double quotes.", + "description": "Attribute value must be closed by double quotes.", "type": "boolean", "default": false }, @@ -43,7 +43,7 @@ "default": false }, "attr-value-single-quotes": { - "description": "Attribute value must closed by single quotes.", + "description": "Attribute value must be closed by single quotes.", "type": "boolean", "default": false }, @@ -72,15 +72,20 @@ "type": "boolean", "default": false }, + "form-method-require": { + "description": "The method attribute of a form element must be present.", + "type": "boolean", + "default": false + }, "h1-require": { "description": "A H1 heading element is required in HTML documents.", "type": "boolean", "default": false }, "head-script-disabled": { - "description": "The script tag can not be used in head.", - "type": "boolean", - "default": false + "description": "The script tag cannot be used in head.", + "default": false, + "enum": [false, true, "allow-non-blocking"] }, "href-abs-or-rel": { "description": "Href must be absolute or relative.", @@ -93,7 +98,7 @@ "default": false }, "id-class-ad-disabled": { - "description": "Id and class can not use ad keyword, it will blocked by adblock software.", + "description": "Id and class cannot use ad keyword, it will be blocked by adblock software.", "type": "boolean", "default": false }, @@ -117,6 +122,11 @@ "type": "boolean", "default": false }, + "link-rel-canonical-require": { + "description": "A link element with rel=\"canonical\" is required within the tag.", + "type": "boolean", + "default": false + }, "main-require": { "description": "A main element is required within the tag.", "type": "boolean", @@ -138,7 +148,7 @@ "default": false }, "space-tab-mixed-disabled": { - "description": "Spaces and tabs can not mixed in front of line.", + "description": "Spaces and tabs cannot be mixed in front of line.", "default": false, "enum": [false, "space", "tab"] }, @@ -153,7 +163,7 @@ "default": false }, "style-disabled": { - "description": "Style tag can not be used.", + "description": "Style tag cannot be used.", "type": "boolean", "default": false }, @@ -168,7 +178,7 @@ "default": false }, "tag-self-close": { - "description": "The empty tag must closed by self.", + "description": "The empty tag must be self-closed.", "type": "boolean", "default": false }, From 727f5b33d7ed9f62c3ef0ce9f02fa4d4805e3f65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Sat, 29 Nov 2025 05:47:50 +0200 Subject: [PATCH 4/7] feat: add cmdx configuration to catalog (#5172) - https://github.com/suzuki-shunsuke/cmdx - https://github.com/suzuki-shunsuke/cmdx/blob/d1c7b646fbb7e017f59f835138ff8522657ea746/pkg/config/config.go#L85 --- src/api/json/catalog.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/api/json/catalog.json b/src/api/json/catalog.json index 2693d72d36b..35ee75091c1 100644 --- a/src/api/json/catalog.json +++ b/src/api/json/catalog.json @@ -605,6 +605,12 @@ "fileMatch": [], "url": "https://www.schemastore.org/cinnamon-spice.info.json" }, + { + "name": "cmdx.yaml", + "description": "cmdx configuration file", + "fileMatch": [".cmdx.yaml", ".cmdx.yml", "cmdx.yaml", "cmdx.yml"], + "url": "https://raw.githubusercontent.com/suzuki-shunsuke/cmdx/refs/heads/main/json-schema/cmdx.json" + }, { "name": "CodeRabbit", "description": "Supercharge your entire team with AI-driven contextual feedback & smart chat", From 6edf9247a22fd209849127384c55f42edfa4618f Mon Sep 17 00:00:00 2001 From: Aidan Pine Date: Fri, 28 Nov 2025 19:59:20 -0800 Subject: [PATCH 5/7] feat(g2p): update g2p schemas (#5174) --- src/api/json/catalog.json | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/api/json/catalog.json b/src/api/json/catalog.json index 35ee75091c1..b6916af6fb6 100644 --- a/src/api/json/catalog.json +++ b/src/api/json/catalog.json @@ -2607,9 +2607,12 @@ "name": "G2P Mapping Configuration", "description": "defining mappings for Python-based grapheme-to-phoneme engine 'g2p'", "fileMatch": ["config-g2p.yaml", "config-g2p.json"], - "url": "https://raw.githubusercontent.com/roedoejet/g2p/main/g2p/mappings/.schema/g2p-config-schema-2.0.json", + "url": "https://raw.githubusercontent.com/roedoejet/g2p/main/g2p/mappings/.schema/g2p-config-schema-2.3.json", "versions": { - "2.0": "https://raw.githubusercontent.com/roedoejet/g2p/main/g2p/mappings/.schema/g2p-config-schema-2.0.json" + "2.0": "https://raw.githubusercontent.com/roedoejet/g2p/main/g2p/mappings/.schema/g2p-config-schema-2.0.json", + "2.1": "https://raw.githubusercontent.com/roedoejet/g2p/main/g2p/mappings/.schema/g2p-config-schema-2.1.json", + "2.2": "https://raw.githubusercontent.com/roedoejet/g2p/main/g2p/mappings/.schema/g2p-config-schema-2.2.json", + "2.3": "https://raw.githubusercontent.com/roedoejet/g2p/main/g2p/mappings/.schema/g2p-config-schema-2.3.json" } }, { From 3d2bed4c34b34121fb1ca1a5c710963855d4f03d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Ram=C3=ADrez=20Mondrag=C3=B3n?= Date: Fri, 28 Nov 2025 21:59:56 -0600 Subject: [PATCH 6/7] Add some tests for Depandabot `multi-ecosystem-groups` (#5167) * Add some tests for Depandabot `multi-ecosystem-groups` * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- src/schemas/json/dependabot-2.0.json | 3 +- .../multi-ecosystem-groups.basic.yaml | 27 ++++++++ ...stem-groups.commit-message-variations.yaml | 61 +++++++++++++++++ .../multi-ecosystem-groups.full-featured.yaml | 67 ++++++++++++++++++ ...-ecosystem-groups.schedule-variations.yaml | 68 +++++++++++++++++++ 5 files changed, 224 insertions(+), 2 deletions(-) create mode 100644 src/test/dependabot-2.0/multi-ecosystem-groups.basic.yaml create mode 100644 src/test/dependabot-2.0/multi-ecosystem-groups.commit-message-variations.yaml create mode 100644 src/test/dependabot-2.0/multi-ecosystem-groups.full-featured.yaml create mode 100644 src/test/dependabot-2.0/multi-ecosystem-groups.schedule-variations.yaml diff --git a/src/schemas/json/dependabot-2.0.json b/src/schemas/json/dependabot-2.0.json index 35d520d2c21..f3c407f5bed 100644 --- a/src/schemas/json/dependabot-2.0.json +++ b/src/schemas/json/dependabot-2.0.json @@ -1253,8 +1253,7 @@ "include": { "description": "Specifies that any prefix is followed by a list of the dependencies updated in the commit", "type": "string", - "enum": ["scope"], - "default": "scope" + "enum": ["scope"] } }, "anyOf": [ diff --git a/src/test/dependabot-2.0/multi-ecosystem-groups.basic.yaml b/src/test/dependabot-2.0/multi-ecosystem-groups.basic.yaml new file mode 100644 index 00000000000..433489389d6 --- /dev/null +++ b/src/test/dependabot-2.0/multi-ecosystem-groups.basic.yaml @@ -0,0 +1,27 @@ +# yaml-language-server: $schema=../../schemas/json/dependabot-2.0.json +version: 2 + +multi-ecosystem-groups: + infrastructure: + schedule: + interval: weekly + +updates: + - package-ecosystem: docker + directory: / + schedule: + interval: daily + patterns: + - nginx + - redis + - postgres + multi-ecosystem-group: infrastructure + + - package-ecosystem: terraform + directory: / + schedule: + interval: daily + patterns: + - aws + - terraform-* + multi-ecosystem-group: infrastructure diff --git a/src/test/dependabot-2.0/multi-ecosystem-groups.commit-message-variations.yaml b/src/test/dependabot-2.0/multi-ecosystem-groups.commit-message-variations.yaml new file mode 100644 index 00000000000..4cdcb136775 --- /dev/null +++ b/src/test/dependabot-2.0/multi-ecosystem-groups.commit-message-variations.yaml @@ -0,0 +1,61 @@ +# yaml-language-server: $schema=../../schemas/json/dependabot-2.0.json +version: 2 + +multi-ecosystem-groups: + group-with-prefix: + schedule: + interval: weekly + commit-message: + prefix: deps + + group-with-prefix-development: + schedule: + interval: weekly + commit-message: + prefix-development: dev-deps + + group-with-include-only: + schedule: + interval: weekly + commit-message: + include: scope + + group-with-prefix-and-include: + schedule: + interval: weekly + commit-message: + prefix: update + include: scope + +updates: + - package-ecosystem: npm + directory: /1 + schedule: + interval: daily + patterns: + - '*' + multi-ecosystem-group: group-with-prefix + + - package-ecosystem: pip + directory: /2 + schedule: + interval: daily + patterns: + - '*' + multi-ecosystem-group: group-with-prefix-development + + - package-ecosystem: bundler + directory: /3 + schedule: + interval: daily + patterns: + - '*' + multi-ecosystem-group: group-with-include-only + + - package-ecosystem: docker + directory: /4 + schedule: + interval: daily + patterns: + - '*' + multi-ecosystem-group: group-with-prefix-and-include diff --git a/src/test/dependabot-2.0/multi-ecosystem-groups.full-featured.yaml b/src/test/dependabot-2.0/multi-ecosystem-groups.full-featured.yaml new file mode 100644 index 00000000000..fb1375dc1ce --- /dev/null +++ b/src/test/dependabot-2.0/multi-ecosystem-groups.full-featured.yaml @@ -0,0 +1,67 @@ +# yaml-language-server: $schema=../../schemas/json/dependabot-2.0.json +version: 2 + +multi-ecosystem-groups: + infrastructure: + schedule: + interval: weekly + day: monday + time: '09:00' + timezone: America/New_York + assignees: + - platform-team + labels: + - infrastructure + - dependencies + milestone: 10 + target-branch: develop + commit-message: + prefix: infra + include: scope + pull-request-branch-name: + separator: '-' + + full-stack: + schedule: + interval: daily + assignees: + - full-stack-team + labels: + - full-stack + +updates: + - package-ecosystem: docker + directory: / + schedule: + interval: daily + patterns: + - '*' + assignees: + - docker-admin + labels: + - docker + multi-ecosystem-group: infrastructure + + - package-ecosystem: npm + directory: /frontend + schedule: + interval: daily + patterns: + - react + - lodash + - '@types/*' + labels: + - frontend + multi-ecosystem-group: full-stack + + - package-ecosystem: bundler + directory: /backend + schedule: + interval: daily + patterns: + - rails + - pg + - sidekiq + assignees: + - backend-dev + multi-ecosystem-group: full-stack diff --git a/src/test/dependabot-2.0/multi-ecosystem-groups.schedule-variations.yaml b/src/test/dependabot-2.0/multi-ecosystem-groups.schedule-variations.yaml new file mode 100644 index 00000000000..4669349a0a9 --- /dev/null +++ b/src/test/dependabot-2.0/multi-ecosystem-groups.schedule-variations.yaml @@ -0,0 +1,68 @@ +# yaml-language-server: $schema=../../schemas/json/dependabot-2.0.json +version: 2 + +multi-ecosystem-groups: + daily-group: + schedule: + interval: daily + + weekly-group: + schedule: + interval: weekly + day: friday + + monthly-group: + schedule: + interval: monthly + + cron-group: + schedule: + interval: cron + cronjob: '0 0 * * 0' + + time-and-timezone: + schedule: + interval: daily + time: '14:30' + timezone: Europe/London + +updates: + - package-ecosystem: npm + directory: /1 + schedule: + interval: daily + patterns: + - '*' + multi-ecosystem-group: daily-group + + - package-ecosystem: pip + directory: /2 + schedule: + interval: daily + patterns: + - '*' + multi-ecosystem-group: weekly-group + + - package-ecosystem: bundler + directory: /3 + schedule: + interval: daily + patterns: + - '*' + multi-ecosystem-group: monthly-group + + - package-ecosystem: docker + directory: /4 + schedule: + interval: daily + patterns: + - '*' + multi-ecosystem-group: cron-group + + - package-ecosystem: terraform + directory: /5 + schedule: + interval: daily + patterns: + - '*' + multi-ecosystem-group: time-and-timezone From ed42ee2326a63b53c3e9c56eea725f632e0c2669 Mon Sep 17 00:00:00 2001 From: Dylan Date: Fri, 28 Nov 2025 22:00:42 -0600 Subject: [PATCH 7/7] Update ruff's JSON schema (#5176) This updates ruff's JSON schema to [34a71caafdd4807d1008824c4af63ed8600c9774](https://github.com/astral-sh/ruff/commit/34a71caafdd4807d1008824c4af63ed8600c9774) --- src/schemas/json/ruff.json | 1 + 1 file changed, 1 insertion(+) diff --git a/src/schemas/json/ruff.json b/src/schemas/json/ruff.json index 508278ce216..53a3d4bcdd4 100644 --- a/src/schemas/json/ruff.json +++ b/src/schemas/json/ruff.json @@ -3504,6 +3504,7 @@ "RUF063", "RUF064", "RUF065", + "RUF066", "RUF1", "RUF10", "RUF100",