Repository: astral-sh/ruff
File: crates/ruff_workspace/src/options.rs (Rust)

Code before:
        "#
    )]
    pub include: Option<Vec<String>>,

    /// Whether to automatically exclude files that are ignored by `.ignore`,
    /// `.gitignore`, `.git/info/exclude`, and global `gitignore` files.
    /// Enabled by default.
    #[option(
        default = "true",
        value_type = "bool",
        example = r#"
            respect-gitignore = false
        "#
    )]
    pub respect_gitignore: Option<bool>,

    /// A mapping of custom file extensions to known file types (overridden
    /// by the `--extension` command-line flag).
    ///
    /// Supported file types include `python`, `pyi`, `ipynb`, and `markdown`.
    #[option(
        default = "{}",
        value_type = "dict[str, Language]",
        example = r#"
            # Add a custom file extension mapped to Python
            extension = {"rpy"="python"}
        "#
    )]
    pub extension: Option<FxHashMap<String, Language>>,

    // Generic python options
    /// A list of builtins to treat as defined references, in addition to the
    /// system builtins.
    #[option(
        default = r#"[]"#,
        value_type = "list[str]",
        example = r#"
            builtins = ["_"]
        "#
    )]
    pub builtins: Option<Vec<String>>,

    /// Mark the specified directories as namespace packages. For the purpose of
    /// module resolution, Ruff will treat those directories and all their subdirectories
    /// as if they contained an `__init__.py` file.
    #[option(
        default = r#"[]"#,
        value_type = "list[str]",
        example = r#"
            namespace-packages = ["airflow/providers"]
        "#

Review comment (suggestion):
nit: I think the keys don't need to be quoted?
```suggestion
            extension = {rpy = "python"}
```

Code after:
        "#
    )]
    pub include: Option<Vec<String>>,

    /// Whether to automatically exclude files that are ignored by `.ignore`,
    /// `.gitignore`, `.git/info/exclude`, and global `gitignore` files.
    /// Enabled by default.
    #[option(
        default = "true",
        value_type = "bool",
        example = r#"
            respect-gitignore = false
        "#
    )]
    pub respect_gitignore: Option<bool>,

    /// A mapping of custom file extensions to known file types (overridden
    /// by the `--extension` command-line flag).
    ///
    /// Supported file types include `python`, `pyi`, `ipynb`, and `markdown`.
    #[option(
        default = "{}",
        value_type = "dict[str, Language]",
        example = r#"
            # Add a custom file extension mapped to Python
            extension = {rpy="python"}
        "#
    )]
    pub extension: Option<FxHashMap<String, Language>>,

    // Generic python options
    /// A list of builtins to treat as defined references, in addition to the
    /// system builtins.
    #[option(
        default = r#"[]"#,
        value_type = "list[str]",
        example = r#"
            builtins = ["_"]
        "#
    )]
    pub builtins: Option<Vec<String>>,

    /// Mark the specified directories as namespace packages. For the purpose of
    /// module resolution, Ruff will treat those directories and all their subdirectories
    /// as if they contained an `__init__.py` file.
    #[option(
        default = r#"[]"#,
        value_type = "list[str]",
        example = r#"
            namespace-packages = ["airflow/providers"]
        "#