Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ruff's JSON schema #4329

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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\[email protected](\"/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
Loading