<!-- Thank you for contributing to Ruff/ty! To help us out with reviewing, please consider the following: - Does this pull request include a summary of the change? (See below.) - Does this pull request include a descriptive title? (Please prefix with `[ty]` for ty pull requests.) - Does this pull request include references to any relevant issues? --> ## Summary Add docstring sections which were missing from the numpy list as pointed out here #20923. For now these are only the official sections as documented [here](https://numpydoc.readthedocs.io/en/latest/format.html#sections). ## Test Plan Added a test case for DOC102
25 lines
641 B
Rust
25 lines
641 B
Rust
//! Abstractions for NumPy-style docstrings.
|
|
|
|
use crate::docstrings::sections::SectionKind;
|
|
|
|
pub(crate) static NUMPY_SECTIONS: &[SectionKind] = &[
|
|
SectionKind::Attributes,
|
|
SectionKind::Examples,
|
|
SectionKind::Methods,
|
|
SectionKind::Notes,
|
|
SectionKind::Raises,
|
|
SectionKind::References,
|
|
SectionKind::Returns,
|
|
SectionKind::SeeAlso,
|
|
SectionKind::Warnings,
|
|
SectionKind::Warns,
|
|
SectionKind::Yields,
|
|
// NumPy-only
|
|
SectionKind::ExtendedSummary,
|
|
SectionKind::OtherParams,
|
|
SectionKind::OtherParameters,
|
|
SectionKind::Parameters,
|
|
SectionKind::Receives,
|
|
SectionKind::ShortSummary,
|
|
];
|