mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-02 22:55:08 +00:00
Implement D200 (OneLinerDocstring) (#397)
This commit is contained in:
parent
30877127bc
commit
b8dce8922d
8 changed files with 103 additions and 24 deletions
|
@ -978,6 +978,18 @@ mod tests {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn d200() -> Result<()> {
|
||||
let mut checks = check_path(
|
||||
Path::new("./resources/test/fixtures/D200.py"),
|
||||
&settings::Settings::for_rule(CheckCode::D200),
|
||||
&fixer::Mode::Generate,
|
||||
)?;
|
||||
checks.sort_by_key(|check| check.location);
|
||||
insta::assert_yaml_snapshot!(checks);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn d400() -> Result<()> {
|
||||
let mut checks = check_path(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue