mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-28 21:05:08 +00:00
Improve rule & options documentation (#14329)
Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com> Co-authored-by: Micha Reiser <micha@reiser.io>
This commit is contained in:
parent
cab7caf80b
commit
abb34828bd
7 changed files with 57 additions and 13 deletions
|
@ -1007,7 +1007,7 @@ impl Flake8AnnotationsOptions {
|
|||
#[serde(deny_unknown_fields, rename_all = "kebab-case")]
|
||||
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
|
||||
pub struct Flake8BanditOptions {
|
||||
/// A list of directories to consider temporary.
|
||||
/// A list of directories to consider temporary (see `S108`).
|
||||
#[option(
|
||||
default = "[\"/tmp\", \"/var/tmp\", \"/dev/shm\"]",
|
||||
value_type = "list[str]",
|
||||
|
@ -1016,7 +1016,7 @@ pub struct Flake8BanditOptions {
|
|||
pub hardcoded_tmp_directory: Option<Vec<String>>,
|
||||
|
||||
/// A list of directories to consider temporary, in addition to those
|
||||
/// specified by [`hardcoded-tmp-directory`](#lint_flake8-bandit_hardcoded-tmp-directory).
|
||||
/// specified by [`hardcoded-tmp-directory`](#lint_flake8-bandit_hardcoded-tmp-directory) (see `S108`).
|
||||
#[option(
|
||||
default = "[]",
|
||||
value_type = "list[str]",
|
||||
|
@ -2099,7 +2099,7 @@ pub struct IsortOptions {
|
|||
/// Use `-1` for automatic determination.
|
||||
///
|
||||
/// Ruff uses at most one blank line after imports in typing stub files (files with `.pyi` extension) in accordance to
|
||||
/// the typing style recommendations ([source](https://typing.readthedocs.io/en/latest/source/stubs.html#blank-lines)).
|
||||
/// the typing style recommendations ([source](https://typing.readthedocs.io/en/latest/guides/writing_stubs.html#blank-lines)).
|
||||
///
|
||||
/// When using the formatter, only the values `-1`, `1`, and `2` are compatible because
|
||||
/// it enforces at least one empty and at most two empty lines after imports.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue