Implement D404 and D418 for pydocstyle (#409)

This commit is contained in:
Charlie Marsh 2022-10-12 13:20:55 -04:00 committed by GitHub
parent e08e1caf71
commit 77055faab6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 176 additions and 41 deletions

View file

@ -1284,6 +1284,18 @@ mod tests {
Ok(())
}
#[test]
fn d404() -> Result<()> {
let mut checks = check_path(
Path::new("./resources/test/fixtures/D.py"),
&settings::Settings::for_rule(CheckCode::D404),
&fixer::Mode::Generate,
)?;
checks.sort_by_key(|check| check.location);
insta::assert_yaml_snapshot!(checks);
Ok(())
}
#[test]
fn d415() -> Result<()> {
let mut checks = check_path(
@ -1296,6 +1308,18 @@ mod tests {
Ok(())
}
#[test]
fn d418() -> Result<()> {
let mut checks = check_path(
Path::new("./resources/test/fixtures/D.py"),
&settings::Settings::for_rule(CheckCode::D418),
&fixer::Mode::Generate,
)?;
checks.sort_by_key(|check| check.location);
insta::assert_yaml_snapshot!(checks);
Ok(())
}
#[test]
fn d419() -> Result<()> {
let mut checks = check_path(