Skip to content

Commit

Permalink
Update ruff's JSON schema (#4329)
Browse files Browse the repository at this point in the history
This updates ruff's JSON schema to [54bb4062c77e64e25441e795bb95908aacae493e](astral-sh/ruff@54bb406)
  • Loading branch information
MichaReiser authored Jan 5, 2025
1 parent 632eb1e commit fbca6b3
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions src/schemas/json/ruff.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"],
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -3060,6 +3071,7 @@
"PLW0",
"PLW01",
"PLW010",
"PLW0101",
"PLW0108",
"PLW012",
"PLW0120",
Expand Down Expand Up @@ -3301,6 +3313,7 @@
"RUF022",
"RUF023",
"RUF024",
"RUF025",
"RUF026",
"RUF027",
"RUF028",
Expand All @@ -3325,6 +3338,8 @@
"RUF051",
"RUF052",
"RUF055",
"RUF056",
"RUF057",
"RUF1",
"RUF10",
"RUF100",
Expand Down

0 comments on commit fbca6b3

Please sign in to comment.