Skip to content

types_

ruff_sync.types_

Core data types and TypedDicts for ruff-sync.

RuleSyncStatus module-attribute

RuleSyncStatus = Literal['Enabled', 'Ignored', 'Disabled']

RuffRule

Bases: TypedDict

Represents a single Ruff rule as returned by ruff rule --all --output-format json.

Source code in src/ruff_sync/types_.py
class RuffRule(TypedDict):
    """Represents a single Ruff rule as returned by `ruff rule --all --output-format json`."""

    code: str
    name: str
    linter: str
    summary: str
    explanation: NotRequired[str]
    fix_availability: NotRequired[str]
    status: NotRequired[RuleSyncStatus | dict[str, Any]]
    preview: NotRequired[bool]

code instance-attribute

code

name instance-attribute

name

linter instance-attribute

linter

summary instance-attribute

summary

explanation instance-attribute

explanation

fix_availability instance-attribute

fix_availability

status instance-attribute

status

preview instance-attribute

preview

RuffLinter

Bases: TypedDict

Represents a Ruff linter category as returned by ruff linter --output-format json.

Source code in src/ruff_sync/types_.py
class RuffLinter(TypedDict):
    """Represents a Ruff linter category as returned by `ruff linter --output-format json`."""

    prefix: NotRequired[str]
    name: str
    url: NotRequired[str]
    categories: NotRequired[list[RuffLinter]]

prefix instance-attribute

prefix

name instance-attribute

name

url instance-attribute

url

categories instance-attribute

categories