mirror of
https://github.com/astral-sh/ruff
synced 2026-01-21 21:40:51 -05:00
41 lines
916 B
Rust
41 lines
916 B
Rust
//! Abstractions for NumPy-style docstrings.
|
|
|
|
use once_cell::sync::Lazy;
|
|
use rustc_hash::FxHashSet;
|
|
|
|
pub(crate) static LOWERCASE_NUMPY_SECTION_NAMES: Lazy<FxHashSet<&'static str>> = Lazy::new(|| {
|
|
FxHashSet::from_iter([
|
|
"short summary",
|
|
"extended summary",
|
|
"parameters",
|
|
"returns",
|
|
"yields",
|
|
"other parameters",
|
|
"raises",
|
|
"see also",
|
|
"notes",
|
|
"references",
|
|
"examples",
|
|
"attributes",
|
|
"methods",
|
|
])
|
|
});
|
|
|
|
pub(crate) static NUMPY_SECTION_NAMES: Lazy<FxHashSet<&'static str>> = Lazy::new(|| {
|
|
FxHashSet::from_iter([
|
|
"Short Summary",
|
|
"Extended Summary",
|
|
"Parameters",
|
|
"Returns",
|
|
"Yields",
|
|
"Other Parameters",
|
|
"Raises",
|
|
"See Also",
|
|
"Notes",
|
|
"References",
|
|
"Examples",
|
|
"Attributes",
|
|
"Methods",
|
|
])
|
|
});
|