From fbca6b3d76904b1fc3433b4259d5103b0eb24434 Mon Sep 17 00:00:00 2001 From: Micha Reiser Date: Sun, 5 Jan 2025 21:37:42 +0100 Subject: [PATCH] Update ruff's JSON schema (#4329) This updates ruff's JSON schema to [54bb4062c77e64e25441e795bb95908aacae493e](https://github.com/astral-sh/ruff/commit/54bb4062c77e64e25441e795bb95908aacae493e) --- src/schemas/json/ruff.json | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/src/schemas/json/ruff.json b/src/schemas/json/ruff.json index 505490acbbb..6982a9df4b8 100644 --- a/src/schemas/json/ruff.json +++ b/src/schemas/json/ruff.json @@ -668,7 +668,7 @@ } }, "include-dependencies": { - "description": "A map from file path to the list of file paths or globs that should be considered dependencies of that file, regardless of whether relevant imports are detected.", + "description": "A map from file path to the list of Python or non-Python file paths or globs that should be considered dependencies of that file, regardless of whether relevant imports are detected.", "type": ["object", "null"], "additionalProperties": { "type": "array", @@ -1142,7 +1142,7 @@ } }, "runtime-evaluated-decorators": { - "description": "Exempt classes and functions decorated with any of the enumerated decorators from being moved into type-checking blocks.\n\nCommon examples include Pydantic's `@pydantic.validate_call` decorator (for functions) and attrs' `@attrs.define` decorator (for classes).", + "description": "Exempt classes and functions decorated with any of the enumerated decorators from being moved into type-checking blocks.\n\nCommon examples include Pydantic's `@pydantic.validate_call` decorator (for functions) and attrs' `@attrs.define` decorator (for classes).\n\nThis also supports framework decorators like FastAPI's `fastapi.FastAPI.get` which will work across assignments in the same module.\n\nFor example: ```python import fastapi\n\napp = FastAPI(\"app\")\n\n@app.get(\"/home\") def home() -> str: ... ```\n\nHere `app.get` will correctly be identified as `fastapi.FastAPI.get`.", "type": ["array", "null"], "items": { "type": "string" @@ -2087,6 +2087,10 @@ "type": "string" } }, + "ignore-var-parameters": { + "description": "If set to `true`, ignore missing documentation for `*args` and `**kwargs` parameters.", + "type": ["boolean", "null"] + }, "property-decorators": { "description": "A list of decorators that, when applied to a method, indicate that the method should be treated as a property (in addition to the builtin `@property` and standard-library `@functools.cached_property`).\n\nFor example, Ruff will expect that any method decorated by a decorator in this list can use a non-imperative summary line.", "type": ["array", "null"], @@ -2234,8 +2238,15 @@ "RuffOptions": { "type": "object", "properties": { + "allowed-markup-calls": { + "description": "A list of callable names, whose result may be safely passed into [`markupsafe.Markup`](https://markupsafe.palletsprojects.com/en/stable/escaping/#markupsafe.Markup).\n\nExpects to receive a list of fully-qualified names (e.g., `bleach.clean`, rather than `clean`).\n\nThis setting helps you avoid false positives in code like:\n\n```python from bleach import clean from markupsafe import Markup\n\ncleaned_markup = Markup(clean(some_user_input)) ```\n\nWhere the use of [`bleach.clean`](https://bleach.readthedocs.io/en/latest/clean.html) usually ensures that there's no XSS vulnerability.\n\nAlthough it is not recommended, you may also use this setting to whitelist other kinds of calls, e.g. calls to i18n translation functions, where how safe that is will depend on the implementation and how well the translations are audited.\n\nAnother common use-case is to wrap the output of functions that generate markup like [`xml.etree.ElementTree.tostring`](https://docs.python.org/3/library/xml.etree.elementtree.html#xml.etree.ElementTree.tostring) or template rendering engines where sanitization of potential user input is either already baked in or has to happen before rendering.", + "type": ["array", "null"], + "items": { + "type": "string" + } + }, "extend-markup-names": { - "description": "A list of additional callable names that behave like [`markupsafe.Markup`].\n\nExpects to receive a list of fully-qualified names (e.g., `webhelpers.html.literal`, rather than `literal`).\n\n[markupsafe.Markup]: https://markupsafe.palletsprojects.com/en/stable/escaping/#markupsafe.Markup", + "description": "A list of additional callable names that behave like [`markupsafe.Markup`](https://markupsafe.palletsprojects.com/en/stable/escaping/#markupsafe.Markup).\n\nExpects to receive a list of fully-qualified names (e.g., `webhelpers.html.literal`, rather than `literal`).", "type": ["array", "null"], "items": { "type": "string" @@ -3060,6 +3071,7 @@ "PLW0", "PLW01", "PLW010", + "PLW0101", "PLW0108", "PLW012", "PLW0120", @@ -3301,6 +3313,7 @@ "RUF022", "RUF023", "RUF024", + "RUF025", "RUF026", "RUF027", "RUF028", @@ -3325,6 +3338,8 @@ "RUF051", "RUF052", "RUF055", + "RUF056", + "RUF057", "RUF1", "RUF10", "RUF100",