mirror of
https://github.com/astral-sh/ruff
synced 2026-01-22 05:51:03 -05:00
71 lines
1.4 KiB
Rust
71 lines
1.4 KiB
Rust
//! Abstractions for Google-style docstrings.
|
|
|
|
use once_cell::sync::Lazy;
|
|
use rustc_hash::FxHashSet;
|
|
|
|
pub(crate) static GOOGLE_SECTION_NAMES: Lazy<FxHashSet<&'static str>> = Lazy::new(|| {
|
|
FxHashSet::from_iter([
|
|
"Args",
|
|
"Arguments",
|
|
"Attention",
|
|
"Attributes",
|
|
"Caution",
|
|
"Danger",
|
|
"Error",
|
|
"Example",
|
|
"Examples",
|
|
"Hint",
|
|
"Important",
|
|
"Keyword Args",
|
|
"Keyword Arguments",
|
|
"Methods",
|
|
"Note",
|
|
"Notes",
|
|
"Return",
|
|
"Returns",
|
|
"Raises",
|
|
"References",
|
|
"See Also",
|
|
"Tip",
|
|
"Todo",
|
|
"Warning",
|
|
"Warnings",
|
|
"Warns",
|
|
"Yield",
|
|
"Yields",
|
|
])
|
|
});
|
|
|
|
pub(crate) static LOWERCASE_GOOGLE_SECTION_NAMES: Lazy<FxHashSet<&'static str>> = Lazy::new(|| {
|
|
FxHashSet::from_iter([
|
|
"args",
|
|
"arguments",
|
|
"attention",
|
|
"attributes",
|
|
"caution",
|
|
"danger",
|
|
"error",
|
|
"example",
|
|
"examples",
|
|
"hint",
|
|
"important",
|
|
"keyword args",
|
|
"keyword arguments",
|
|
"methods",
|
|
"note",
|
|
"notes",
|
|
"return",
|
|
"returns",
|
|
"raises",
|
|
"references",
|
|
"see also",
|
|
"tip",
|
|
"todo",
|
|
"warning",
|
|
"warnings",
|
|
"warns",
|
|
"yield",
|
|
"yields",
|
|
])
|
|
});
|