diff --git a/Cargo.lock b/Cargo.lock index 7e9e7c2b9f..2e5f2a531d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1998,6 +1998,7 @@ dependencies = [ "serde_json", "strum", "strum_macros", + "test-case", "titlecase", "toml", "update-informer", @@ -2412,6 +2413,28 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "507e9898683b6c43a9aa55b64259b721b52ba226e0f3779137e50ad114a4c90b" +[[package]] +name = "test-case" +version = "2.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21d6cf5a7dffb3f9dceec8e6b8ca528d9bd71d36c9f074defb548ce161f598c0" +dependencies = [ + "test-case-macros", +] + +[[package]] +name = "test-case-macros" +version = "2.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e45b7bf6e19353ddd832745c8fcf77a17a93171df7151187f26623f2b75b5b26" +dependencies = [ + "cfg-if 1.0.0", + "proc-macro-error", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "thiserror" version = "1.0.37" diff --git a/Cargo.toml b/Cargo.toml index b51714d6b9..7aeb8841dc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,26 +23,27 @@ itertools = { version = "0.10.5" } libcst = { git = "https://github.com/charliermarsh/LibCST", rev = "32a044c127668df44582f85699358e67803b0d73" } log = { version = "0.4.17" } notify = { version = "4.0.17" } +num-bigint = { version = "0.4.3" } once_cell = { version = "1.13.1" } path-absolutize = { version = "3.0.13", features = ["once_cell_cache"] } rayon = { version = "1.5.3" } regex = { version = "1.6.0" } rustpython-ast = { features = ["unparse"], git = "https://github.com/charliermarsh/RustPython.git", rev = "778ae2aeb521d0438d2a91bd11238bb5c2bf9d4f" } -rustpython-parser = { features = ["lalrpop"], git = "https://github.com/charliermarsh/RustPython.git", rev = "778ae2aeb521d0438d2a91bd11238bb5c2bf9d4f" } rustpython-common = { git = "https://github.com/charliermarsh/RustPython.git", rev = "778ae2aeb521d0438d2a91bd11238bb5c2bf9d4f" } +rustpython-parser = { features = ["lalrpop"], git = "https://github.com/charliermarsh/RustPython.git", rev = "778ae2aeb521d0438d2a91bd11238bb5c2bf9d4f" } serde = { version = "1.0.143", features = ["derive"] } serde_json = { version = "1.0.83" } +strum = { version = "0.24.1", features = ["strum_macros"] } +strum_macros = { version = "0.24.3" } +titlecase = { version = "2.2.1" } toml = { version = "0.5.9" } update-informer = { version = "0.5.0", default_features = false, features = ["pypi"], optional = true } walkdir = { version = "2.3.2" } -strum = { version = "0.24.1", features = ["strum_macros"] } -strum_macros = "0.24.3" -num-bigint = "0.4.3" -titlecase = "2.2.1" [dev-dependencies] -assert_cmd = "2.0.4" +assert_cmd = { version = "2.0.4" } insta = { version = "1.19.1", features = ["yaml"] } +test-case = { version = "2.2.2" } [features] default = ["update-informer"] diff --git a/src/linter.rs b/src/linter.rs index 37bfd7af24..ae7b2e2c70 100644 --- a/src/linter.rs +++ b/src/linter.rs @@ -212,11 +212,13 @@ pub fn autoformat_path(path: &Path) -> Result<()> { #[cfg(test)] mod tests { + use std::convert::AsRef; use std::path::Path; use anyhow::Result; use regex::Regex; use rustpython_parser::lexer::LexResult; + use test_case::test_case; use crate::autofix::fixer; use crate::checks::{Check, CheckCode}; @@ -236,543 +238,129 @@ mod tests { linter::check_path(path, &contents, tokens, &noqa_line_for, settings, autofix) } - #[test] - fn e402() -> Result<()> { + #[test_case(CheckCode::A001, Path::new("A001.py"); "A001")] + #[test_case(CheckCode::A002, Path::new("A002.py"); "A002")] + #[test_case(CheckCode::A003, Path::new("A003.py"); "A003")] + #[test_case(CheckCode::B011, Path::new("B011.py"); "B011")] + #[test_case(CheckCode::B014, Path::new("B014.py"); "B014")] + #[test_case(CheckCode::B025, Path::new("B025.py"); "B025")] + #[test_case(CheckCode::C400, Path::new("C400.py"); "C400")] + #[test_case(CheckCode::C401, Path::new("C401.py"); "C401")] + #[test_case(CheckCode::C402, Path::new("C402.py"); "C402")] + #[test_case(CheckCode::C403, Path::new("C403.py"); "C403")] + #[test_case(CheckCode::C404, Path::new("C404.py"); "C404")] + #[test_case(CheckCode::C405, Path::new("C405.py"); "C405")] + #[test_case(CheckCode::C406, Path::new("C406.py"); "C406")] + #[test_case(CheckCode::C408, Path::new("C408.py"); "C408")] + #[test_case(CheckCode::C409, Path::new("C409.py"); "C409")] + #[test_case(CheckCode::C410, Path::new("C410.py"); "C410")] + #[test_case(CheckCode::C411, Path::new("C411.py"); "C411")] + #[test_case(CheckCode::C413, Path::new("C413.py"); "C413")] + #[test_case(CheckCode::C414, Path::new("C414.py"); "C414")] + #[test_case(CheckCode::C415, Path::new("C415.py"); "C415")] + #[test_case(CheckCode::C416, Path::new("C416.py"); "C416")] + #[test_case(CheckCode::D100, Path::new("D.py"); "D100")] + #[test_case(CheckCode::D101, Path::new("D.py"); "D101")] + #[test_case(CheckCode::D102, Path::new("D.py"); "D102")] + #[test_case(CheckCode::D103, Path::new("D.py"); "D103")] + #[test_case(CheckCode::D104, Path::new("D.py"); "D104")] + #[test_case(CheckCode::D105, Path::new("D.py"); "D105")] + #[test_case(CheckCode::D106, Path::new("D.py"); "D106")] + #[test_case(CheckCode::D107, Path::new("D.py"); "D107")] + #[test_case(CheckCode::D201, Path::new("D.py"); "D201")] + #[test_case(CheckCode::D202, Path::new("D.py"); "D202")] + #[test_case(CheckCode::D203, Path::new("D.py"); "D203")] + #[test_case(CheckCode::D204, Path::new("D.py"); "D204")] + #[test_case(CheckCode::D205, Path::new("D.py"); "D205")] + #[test_case(CheckCode::D209, Path::new("D.py"); "D209")] + #[test_case(CheckCode::D210, Path::new("D.py"); "D210")] + #[test_case(CheckCode::D211, Path::new("D.py"); "D211")] + #[test_case(CheckCode::D212, Path::new("D.py"); "D212")] + #[test_case(CheckCode::D213, Path::new("D.py"); "D213")] + #[test_case(CheckCode::D300, Path::new("D.py"); "D300")] + #[test_case(CheckCode::D400, Path::new("D.py"); "D400")] + #[test_case(CheckCode::D402, Path::new("D.py"); "D402")] + #[test_case(CheckCode::D403, Path::new("D.py"); "D403")] + #[test_case(CheckCode::D404, Path::new("D.py"); "D404")] + #[test_case(CheckCode::D405, Path::new("sections.py"); "D405")] + #[test_case(CheckCode::D406, Path::new("sections.py"); "D406")] + #[test_case(CheckCode::D407, Path::new("sections.py"); "D407")] + #[test_case(CheckCode::D408, Path::new("sections.py"); "D408")] + #[test_case(CheckCode::D409, Path::new("sections.py"); "D409")] + #[test_case(CheckCode::D410, Path::new("sections.py"); "D410")] + #[test_case(CheckCode::D411, Path::new("sections.py"); "D411")] + #[test_case(CheckCode::D412, Path::new("sections.py"); "D412")] + #[test_case(CheckCode::D413, Path::new("sections.py"); "D413")] + #[test_case(CheckCode::D414, Path::new("sections.py"); "D414")] + #[test_case(CheckCode::D415, Path::new("D.py"); "D415")] + #[test_case(CheckCode::D418, Path::new("D.py"); "D418")] + #[test_case(CheckCode::D419, Path::new("D.py"); "D419")] + #[test_case(CheckCode::E402, Path::new("E402.py"); "E402")] + #[test_case(CheckCode::E501, Path::new("E501.py"); "E501")] + #[test_case(CheckCode::E711, Path::new("E711.py"); "E711")] + #[test_case(CheckCode::E712, Path::new("E712.py"); "E712")] + #[test_case(CheckCode::E713, Path::new("E713.py"); "E713")] + #[test_case(CheckCode::E714, Path::new("E714.py"); "E714")] + #[test_case(CheckCode::E721, Path::new("E721.py"); "E721")] + #[test_case(CheckCode::E722, Path::new("E722.py"); "E722")] + #[test_case(CheckCode::E731, Path::new("E731.py"); "E731")] + #[test_case(CheckCode::E741, Path::new("E741.py"); "E741")] + #[test_case(CheckCode::E742, Path::new("E742.py"); "E742")] + #[test_case(CheckCode::E743, Path::new("E743.py"); "E743")] + #[test_case(CheckCode::E999, Path::new("E999.py"); "E999")] + #[test_case(CheckCode::F401, Path::new("F401_0.py"); "F401_0")] + #[test_case(CheckCode::F401, Path::new("F401_1.py"); "F401_1")] + #[test_case(CheckCode::F401, Path::new("F401_2.py"); "F401_2")] + #[test_case(CheckCode::F401, Path::new("F401_3.py"); "F401_3")] + #[test_case(CheckCode::F401, Path::new("F401_4.py"); "F401_4")] + #[test_case(CheckCode::F402, Path::new("F402.py"); "F402")] + #[test_case(CheckCode::F403, Path::new("F403.py"); "F403")] + #[test_case(CheckCode::F404, Path::new("F404.py"); "F404")] + #[test_case(CheckCode::F405, Path::new("F405.py"); "F405")] + #[test_case(CheckCode::F406, Path::new("F406.py"); "F406")] + #[test_case(CheckCode::F407, Path::new("F407.py"); "F407")] + #[test_case(CheckCode::F541, Path::new("F541.py"); "F541")] + #[test_case(CheckCode::F601, Path::new("F601.py"); "F601")] + #[test_case(CheckCode::F602, Path::new("F602.py"); "F602")] + #[test_case(CheckCode::F622, Path::new("F622.py"); "F622")] + #[test_case(CheckCode::F631, Path::new("F631.py"); "F631")] + #[test_case(CheckCode::F632, Path::new("F632.py"); "F632")] + #[test_case(CheckCode::F633, Path::new("F633.py"); "F633")] + #[test_case(CheckCode::F634, Path::new("F634.py"); "F634")] + #[test_case(CheckCode::F701, Path::new("F701.py"); "F701")] + #[test_case(CheckCode::F702, Path::new("F702.py"); "F702")] + #[test_case(CheckCode::F704, Path::new("F704.py"); "F704")] + #[test_case(CheckCode::F706, Path::new("F706.py"); "F706")] + #[test_case(CheckCode::F707, Path::new("F707.py"); "F707")] + #[test_case(CheckCode::F722, Path::new("F722.py"); "F722")] + #[test_case(CheckCode::F821, Path::new("F821.py"); "F821")] + #[test_case(CheckCode::F822, Path::new("F822.py"); "F822")] + #[test_case(CheckCode::F823, Path::new("F823.py"); "F823")] + #[test_case(CheckCode::F831, Path::new("F831.py"); "F831")] + #[test_case(CheckCode::F841, Path::new("F841.py"); "F841")] + #[test_case(CheckCode::F901, Path::new("F901.py"); "F901")] + #[test_case(CheckCode::T201, Path::new("T201.py"); "T201")] + #[test_case(CheckCode::T203, Path::new("T203.py"); "T203")] + #[test_case(CheckCode::U001, Path::new("U001.py"); "U001")] + #[test_case(CheckCode::U002, Path::new("U002.py"); "U002")] + #[test_case(CheckCode::U003, Path::new("U003.py"); "U003")] + #[test_case(CheckCode::U004, Path::new("U004.py"); "U004")] + #[test_case(CheckCode::U005, Path::new("U005.py"); "U005")] + #[test_case(CheckCode::U006, Path::new("U006.py"); "U006")] + #[test_case(CheckCode::U007, Path::new("U007.py"); "U007")] + #[test_case(CheckCode::U008, Path::new("U008.py"); "U008")] + #[test_case(CheckCode::W292, Path::new("W292_0.py"); "W292_0")] + #[test_case(CheckCode::W292, Path::new("W292_1.py"); "W292_1")] + #[test_case(CheckCode::W292, Path::new("W292_2.py"); "W292_2")] + fn checks(check_code: CheckCode, path: &Path) -> Result<()> { + let snapshot = format!("{}_{}", check_code.as_ref(), path.to_string_lossy()); let mut checks = check_path( - Path::new("./resources/test/fixtures/E402.py"), - &settings::Settings::for_rule(CheckCode::E402), + Path::new("./resources/test/fixtures").join(path).as_path(), + &settings::Settings::for_rule(check_code.clone()), &fixer::Mode::Generate, )?; checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn e501() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/E501.py"), - &settings::Settings::for_rule(CheckCode::E501), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn e711() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/E711.py"), - &settings::Settings::for_rule(CheckCode::E711), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn e712() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/E712.py"), - &settings::Settings::for_rule(CheckCode::E712), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn e713() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/E713.py"), - &settings::Settings::for_rule(CheckCode::E713), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn e721() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/E721.py"), - &settings::Settings::for_rule(CheckCode::E721), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn e722() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/E722.py"), - &settings::Settings::for_rule(CheckCode::E722), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn e714() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/E714.py"), - &settings::Settings::for_rule(CheckCode::E714), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn e731() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/E731.py"), - &settings::Settings::for_rule(CheckCode::E731), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn e741() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/E741.py"), - &settings::Settings::for_rule(CheckCode::E741), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn e742() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/E742.py"), - &settings::Settings::for_rule(CheckCode::E742), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn e743() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/E743.py"), - &settings::Settings::for_rule(CheckCode::E743), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn w292_0() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/W292_0.py"), - &settings::Settings::for_rule(CheckCode::W292), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn w292_1() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/W292_1.py"), - &settings::Settings::for_rule(CheckCode::W292), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn w292_2() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/W292_2.py"), - &settings::Settings::for_rule(CheckCode::W292), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn f401_0() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/F401_0.py"), - &settings::Settings::for_rule(CheckCode::F401), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn f401_1() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/F401_1.py"), - &settings::Settings::for_rule(CheckCode::F401), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn f401_2() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/F401_2.py"), - &settings::Settings::for_rule(CheckCode::F401), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn f401_3() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/F401_3.py"), - &settings::Settings::for_rule(CheckCode::F401), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn f401_4() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/F401_4.py"), - &settings::Settings::for_rule(CheckCode::F401), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn f402() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/F402.py"), - &settings::Settings::for_rule(CheckCode::F402), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn f403() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/F403.py"), - &settings::Settings::for_rule(CheckCode::F403), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn f404() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/F404.py"), - &settings::Settings::for_rule(CheckCode::F404), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn f405() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/F405.py"), - &settings::Settings::for_rule(CheckCode::F405), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn f406() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/F406.py"), - &settings::Settings::for_rule(CheckCode::F406), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn f407() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/F407.py"), - &settings::Settings::for_rule(CheckCode::F407), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn f541() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/F541.py"), - &settings::Settings::for_rule(CheckCode::F541), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn f601() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/F601.py"), - &settings::Settings::for_rule(CheckCode::F601), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn f602() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/F602.py"), - &settings::Settings::for_rule(CheckCode::F602), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn f622() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/F622.py"), - &settings::Settings::for_rule(CheckCode::F622), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn f631() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/F631.py"), - &settings::Settings::for_rule(CheckCode::F631), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn f632() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/F632.py"), - &settings::Settings::for_rule(CheckCode::F632), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn f633() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/F633.py"), - &settings::Settings::for_rule(CheckCode::F633), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn f634() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/F634.py"), - &settings::Settings::for_rule(CheckCode::F634), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn f701() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/F701.py"), - &settings::Settings::for_rule(CheckCode::F701), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn f702() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/F702.py"), - &settings::Settings::for_rule(CheckCode::F702), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn f704() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/F704.py"), - &settings::Settings::for_rule(CheckCode::F704), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn f706() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/F706.py"), - &settings::Settings::for_rule(CheckCode::F706), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn f707() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/F707.py"), - &settings::Settings::for_rule(CheckCode::F707), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn f722() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/F722.py"), - &settings::Settings::for_rule(CheckCode::F722), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn f821() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/F821.py"), - &settings::Settings::for_rule(CheckCode::F821), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn f822() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/F822.py"), - &settings::Settings::for_rule(CheckCode::F822), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn f823() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/F823.py"), - &settings::Settings::for_rule(CheckCode::F823), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn f831() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/F831.py"), - &settings::Settings::for_rule(CheckCode::F831), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn f841() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/F841.py"), - &settings::Settings::for_rule(CheckCode::F841), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); + insta::assert_yaml_snapshot!(snapshot, checks); Ok(()) } @@ -791,834 +379,6 @@ mod tests { Ok(()) } - #[test] - fn f901() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/F901.py"), - &settings::Settings::for_rule(CheckCode::F901), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn e999() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/E999.py"), - &settings::Settings::for_rule(CheckCode::E999), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn a001() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/A001.py"), - &settings::Settings::for_rule(CheckCode::A001), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn a002() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/A002.py"), - &settings::Settings::for_rule(CheckCode::A002), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn a003() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/A003.py"), - &settings::Settings::for_rule(CheckCode::A003), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn b011() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/B011.py"), - &settings::Settings::for_rule(CheckCode::B011), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn b014() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/B014.py"), - &settings::Settings::for_rule(CheckCode::B014), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn b025() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/B025.py"), - &settings::Settings::for_rule(CheckCode::B025), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn c400() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/C400.py"), - &settings::Settings::for_rule(CheckCode::C400), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn c401() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/C401.py"), - &settings::Settings::for_rule(CheckCode::C401), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn c402() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/C402.py"), - &settings::Settings::for_rule(CheckCode::C402), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn c403() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/C403.py"), - &settings::Settings::for_rule(CheckCode::C403), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn c404() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/C404.py"), - &settings::Settings::for_rule(CheckCode::C404), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn c405() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/C405.py"), - &settings::Settings::for_rule(CheckCode::C405), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn c406() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/C406.py"), - &settings::Settings::for_rule(CheckCode::C406), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn c408() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/C408.py"), - &settings::Settings::for_rule(CheckCode::C408), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn c409() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/C409.py"), - &settings::Settings::for_rule(CheckCode::C409), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn c410() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/C410.py"), - &settings::Settings::for_rule(CheckCode::C410), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn c411() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/C411.py"), - &settings::Settings::for_rule(CheckCode::C411), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn c413() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/C413.py"), - &settings::Settings::for_rule(CheckCode::C413), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn c414() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/C414.py"), - &settings::Settings::for_rule(CheckCode::C414), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn c415() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/C415.py"), - &settings::Settings::for_rule(CheckCode::C415), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn c416() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/C416.py"), - &settings::Settings::for_rule(CheckCode::C416), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn d100() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/D.py"), - &settings::Settings::for_rule(CheckCode::D100), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn d101() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/D.py"), - &settings::Settings::for_rule(CheckCode::D101), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn d102() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/D.py"), - &settings::Settings::for_rule(CheckCode::D102), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn d103() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/D.py"), - &settings::Settings::for_rule(CheckCode::D103), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn d104() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/D.py"), - &settings::Settings::for_rule(CheckCode::D104), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn d105() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/D.py"), - &settings::Settings::for_rule(CheckCode::D105), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn d106() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/D.py"), - &settings::Settings::for_rule(CheckCode::D106), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn d107() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/D.py"), - &settings::Settings::for_rule(CheckCode::D107), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn d201() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/D.py"), - &settings::Settings::for_rule(CheckCode::D201), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn d202() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/D.py"), - &settings::Settings::for_rule(CheckCode::D202), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn d203() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/D.py"), - &settings::Settings::for_rule(CheckCode::D203), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn d204() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/D.py"), - &settings::Settings::for_rule(CheckCode::D204), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn d205() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/D.py"), - &settings::Settings::for_rule(CheckCode::D205), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn d209() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/D.py"), - &settings::Settings::for_rule(CheckCode::D209), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn d210() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/D.py"), - &settings::Settings::for_rule(CheckCode::D210), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn d211() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/D.py"), - &settings::Settings::for_rule(CheckCode::D211), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn d212() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/D.py"), - &settings::Settings::for_rule(CheckCode::D212), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn d213() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/D.py"), - &settings::Settings::for_rule(CheckCode::D213), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn d300() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/D.py"), - &settings::Settings::for_rule(CheckCode::D300), - &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( - Path::new("./resources/test/fixtures/D.py"), - &settings::Settings::for_rule(CheckCode::D400), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn d402() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/D.py"), - &settings::Settings::for_rule(CheckCode::D402), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn d403() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/D.py"), - &settings::Settings::for_rule(CheckCode::D403), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - 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 d405() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/sections.py"), - &settings::Settings::for_rule(CheckCode::D405), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn d406() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/sections.py"), - &settings::Settings::for_rule(CheckCode::D406), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn d407() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/sections.py"), - &settings::Settings::for_rule(CheckCode::D407), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn d408() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/sections.py"), - &settings::Settings::for_rule(CheckCode::D408), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn d409() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/sections.py"), - &settings::Settings::for_rule(CheckCode::D409), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn d410() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/sections.py"), - &settings::Settings::for_rule(CheckCode::D410), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn d411() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/sections.py"), - &settings::Settings::for_rule(CheckCode::D411), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn d412() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/sections.py"), - &settings::Settings::for_rule(CheckCode::D412), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn d413() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/sections.py"), - &settings::Settings::for_rule(CheckCode::D413), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn d414() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/sections.py"), - &settings::Settings::for_rule(CheckCode::D414), - &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( - Path::new("./resources/test/fixtures/D.py"), - &settings::Settings::for_rule(CheckCode::D415), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - 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( - Path::new("./resources/test/fixtures/D.py"), - &settings::Settings::for_rule(CheckCode::D419), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn t201() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/T201.py"), - &settings::Settings::for_rule(CheckCode::T201), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn t203() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/T203.py"), - &settings::Settings::for_rule(CheckCode::T203), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn u001() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/U001.py"), - &settings::Settings::for_rule(CheckCode::U001), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn u002() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/U002.py"), - &settings::Settings::for_rule(CheckCode::U002), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn u003() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/U003.py"), - &settings::Settings::for_rule(CheckCode::U003), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn u004() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/U004.py"), - &settings::Settings::for_rule(CheckCode::U004), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn u005() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/U005.py"), - &settings::Settings::for_rule(CheckCode::U005), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn u006() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/U006.py"), - &settings::Settings::for_rule(CheckCode::U006), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn u007() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/U007.py"), - &settings::Settings::for_rule(CheckCode::U007), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn u008() -> Result<()> { - let mut checks = check_path( - Path::new("./resources/test/fixtures/U008.py"), - &settings::Settings::for_rule(CheckCode::U008), - &fixer::Mode::Generate, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - #[test] fn m001() -> Result<()> { let mut checks = check_path( diff --git a/src/snapshots/ruff__linter__tests__a001.snap b/src/snapshots/ruff__linter__tests__A001_A001.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__a001.snap rename to src/snapshots/ruff__linter__tests__A001_A001.py.snap diff --git a/src/snapshots/ruff__linter__tests__a002.snap b/src/snapshots/ruff__linter__tests__A002_A002.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__a002.snap rename to src/snapshots/ruff__linter__tests__A002_A002.py.snap diff --git a/src/snapshots/ruff__linter__tests__a003.snap b/src/snapshots/ruff__linter__tests__A003_A003.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__a003.snap rename to src/snapshots/ruff__linter__tests__A003_A003.py.snap diff --git a/src/snapshots/ruff__linter__tests__b011.snap b/src/snapshots/ruff__linter__tests__B011_B011.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__b011.snap rename to src/snapshots/ruff__linter__tests__B011_B011.py.snap diff --git a/src/snapshots/ruff__linter__tests__b014.snap b/src/snapshots/ruff__linter__tests__B014_B014.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__b014.snap rename to src/snapshots/ruff__linter__tests__B014_B014.py.snap diff --git a/src/snapshots/ruff__linter__tests__b025.snap b/src/snapshots/ruff__linter__tests__B025_B025.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__b025.snap rename to src/snapshots/ruff__linter__tests__B025_B025.py.snap diff --git a/src/snapshots/ruff__linter__tests__c400.snap b/src/snapshots/ruff__linter__tests__C400_C400.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__c400.snap rename to src/snapshots/ruff__linter__tests__C400_C400.py.snap diff --git a/src/snapshots/ruff__linter__tests__c401.snap b/src/snapshots/ruff__linter__tests__C401_C401.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__c401.snap rename to src/snapshots/ruff__linter__tests__C401_C401.py.snap diff --git a/src/snapshots/ruff__linter__tests__c402.snap b/src/snapshots/ruff__linter__tests__C402_C402.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__c402.snap rename to src/snapshots/ruff__linter__tests__C402_C402.py.snap diff --git a/src/snapshots/ruff__linter__tests__c403.snap b/src/snapshots/ruff__linter__tests__C403_C403.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__c403.snap rename to src/snapshots/ruff__linter__tests__C403_C403.py.snap diff --git a/src/snapshots/ruff__linter__tests__c404.snap b/src/snapshots/ruff__linter__tests__C404_C404.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__c404.snap rename to src/snapshots/ruff__linter__tests__C404_C404.py.snap diff --git a/src/snapshots/ruff__linter__tests__c405.snap b/src/snapshots/ruff__linter__tests__C405_C405.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__c405.snap rename to src/snapshots/ruff__linter__tests__C405_C405.py.snap diff --git a/src/snapshots/ruff__linter__tests__c406.snap b/src/snapshots/ruff__linter__tests__C406_C406.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__c406.snap rename to src/snapshots/ruff__linter__tests__C406_C406.py.snap diff --git a/src/snapshots/ruff__linter__tests__c408.snap b/src/snapshots/ruff__linter__tests__C408_C408.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__c408.snap rename to src/snapshots/ruff__linter__tests__C408_C408.py.snap diff --git a/src/snapshots/ruff__linter__tests__c409.snap b/src/snapshots/ruff__linter__tests__C409_C409.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__c409.snap rename to src/snapshots/ruff__linter__tests__C409_C409.py.snap diff --git a/src/snapshots/ruff__linter__tests__c410.snap b/src/snapshots/ruff__linter__tests__C410_C410.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__c410.snap rename to src/snapshots/ruff__linter__tests__C410_C410.py.snap diff --git a/src/snapshots/ruff__linter__tests__c411.snap b/src/snapshots/ruff__linter__tests__C411_C411.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__c411.snap rename to src/snapshots/ruff__linter__tests__C411_C411.py.snap diff --git a/src/snapshots/ruff__linter__tests__c413.snap b/src/snapshots/ruff__linter__tests__C413_C413.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__c413.snap rename to src/snapshots/ruff__linter__tests__C413_C413.py.snap diff --git a/src/snapshots/ruff__linter__tests__c414.snap b/src/snapshots/ruff__linter__tests__C414_C414.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__c414.snap rename to src/snapshots/ruff__linter__tests__C414_C414.py.snap diff --git a/src/snapshots/ruff__linter__tests__c415.snap b/src/snapshots/ruff__linter__tests__C415_C415.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__c415.snap rename to src/snapshots/ruff__linter__tests__C415_C415.py.snap diff --git a/src/snapshots/ruff__linter__tests__c416.snap b/src/snapshots/ruff__linter__tests__C416_C416.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__c416.snap rename to src/snapshots/ruff__linter__tests__C416_C416.py.snap diff --git a/src/snapshots/ruff__linter__tests__d100.snap b/src/snapshots/ruff__linter__tests__D100_D.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__d100.snap rename to src/snapshots/ruff__linter__tests__D100_D.py.snap diff --git a/src/snapshots/ruff__linter__tests__d101.snap b/src/snapshots/ruff__linter__tests__D101_D.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__d101.snap rename to src/snapshots/ruff__linter__tests__D101_D.py.snap diff --git a/src/snapshots/ruff__linter__tests__d102.snap b/src/snapshots/ruff__linter__tests__D102_D.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__d102.snap rename to src/snapshots/ruff__linter__tests__D102_D.py.snap diff --git a/src/snapshots/ruff__linter__tests__d103.snap b/src/snapshots/ruff__linter__tests__D103_D.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__d103.snap rename to src/snapshots/ruff__linter__tests__D103_D.py.snap diff --git a/src/snapshots/ruff__linter__tests__d104.snap b/src/snapshots/ruff__linter__tests__D104_D.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__d104.snap rename to src/snapshots/ruff__linter__tests__D104_D.py.snap diff --git a/src/snapshots/ruff__linter__tests__d105.snap b/src/snapshots/ruff__linter__tests__D105_D.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__d105.snap rename to src/snapshots/ruff__linter__tests__D105_D.py.snap diff --git a/src/snapshots/ruff__linter__tests__d106.snap b/src/snapshots/ruff__linter__tests__D106_D.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__d106.snap rename to src/snapshots/ruff__linter__tests__D106_D.py.snap diff --git a/src/snapshots/ruff__linter__tests__d107.snap b/src/snapshots/ruff__linter__tests__D107_D.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__d107.snap rename to src/snapshots/ruff__linter__tests__D107_D.py.snap diff --git a/src/snapshots/ruff__linter__tests__d201.snap b/src/snapshots/ruff__linter__tests__D201_D.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__d201.snap rename to src/snapshots/ruff__linter__tests__D201_D.py.snap diff --git a/src/snapshots/ruff__linter__tests__d202.snap b/src/snapshots/ruff__linter__tests__D202_D.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__d202.snap rename to src/snapshots/ruff__linter__tests__D202_D.py.snap diff --git a/src/snapshots/ruff__linter__tests__d203.snap b/src/snapshots/ruff__linter__tests__D203_D.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__d203.snap rename to src/snapshots/ruff__linter__tests__D203_D.py.snap diff --git a/src/snapshots/ruff__linter__tests__d204.snap b/src/snapshots/ruff__linter__tests__D204_D.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__d204.snap rename to src/snapshots/ruff__linter__tests__D204_D.py.snap diff --git a/src/snapshots/ruff__linter__tests__d205.snap b/src/snapshots/ruff__linter__tests__D205_D.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__d205.snap rename to src/snapshots/ruff__linter__tests__D205_D.py.snap diff --git a/src/snapshots/ruff__linter__tests__d209.snap b/src/snapshots/ruff__linter__tests__D209_D.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__d209.snap rename to src/snapshots/ruff__linter__tests__D209_D.py.snap diff --git a/src/snapshots/ruff__linter__tests__d210.snap b/src/snapshots/ruff__linter__tests__D210_D.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__d210.snap rename to src/snapshots/ruff__linter__tests__D210_D.py.snap diff --git a/src/snapshots/ruff__linter__tests__d211.snap b/src/snapshots/ruff__linter__tests__D211_D.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__d211.snap rename to src/snapshots/ruff__linter__tests__D211_D.py.snap diff --git a/src/snapshots/ruff__linter__tests__d212.snap b/src/snapshots/ruff__linter__tests__D212_D.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__d212.snap rename to src/snapshots/ruff__linter__tests__D212_D.py.snap diff --git a/src/snapshots/ruff__linter__tests__d213.snap b/src/snapshots/ruff__linter__tests__D213_D.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__d213.snap rename to src/snapshots/ruff__linter__tests__D213_D.py.snap diff --git a/src/snapshots/ruff__linter__tests__d300.snap b/src/snapshots/ruff__linter__tests__D300_D.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__d300.snap rename to src/snapshots/ruff__linter__tests__D300_D.py.snap diff --git a/src/snapshots/ruff__linter__tests__d400.snap b/src/snapshots/ruff__linter__tests__D400_D.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__d400.snap rename to src/snapshots/ruff__linter__tests__D400_D.py.snap diff --git a/src/snapshots/ruff__linter__tests__d402.snap b/src/snapshots/ruff__linter__tests__D402_D.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__d402.snap rename to src/snapshots/ruff__linter__tests__D402_D.py.snap diff --git a/src/snapshots/ruff__linter__tests__d403.snap b/src/snapshots/ruff__linter__tests__D403_D.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__d403.snap rename to src/snapshots/ruff__linter__tests__D403_D.py.snap diff --git a/src/snapshots/ruff__linter__tests__d404.snap b/src/snapshots/ruff__linter__tests__D404_D.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__d404.snap rename to src/snapshots/ruff__linter__tests__D404_D.py.snap diff --git a/src/snapshots/ruff__linter__tests__d405.snap b/src/snapshots/ruff__linter__tests__D405_sections.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__d405.snap rename to src/snapshots/ruff__linter__tests__D405_sections.py.snap diff --git a/src/snapshots/ruff__linter__tests__d406.snap b/src/snapshots/ruff__linter__tests__D406_sections.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__d406.snap rename to src/snapshots/ruff__linter__tests__D406_sections.py.snap diff --git a/src/snapshots/ruff__linter__tests__d407.snap b/src/snapshots/ruff__linter__tests__D407_sections.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__d407.snap rename to src/snapshots/ruff__linter__tests__D407_sections.py.snap diff --git a/src/snapshots/ruff__linter__tests__d408.snap b/src/snapshots/ruff__linter__tests__D408_sections.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__d408.snap rename to src/snapshots/ruff__linter__tests__D408_sections.py.snap diff --git a/src/snapshots/ruff__linter__tests__d409.snap b/src/snapshots/ruff__linter__tests__D409_sections.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__d409.snap rename to src/snapshots/ruff__linter__tests__D409_sections.py.snap diff --git a/src/snapshots/ruff__linter__tests__d410.snap b/src/snapshots/ruff__linter__tests__D410_sections.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__d410.snap rename to src/snapshots/ruff__linter__tests__D410_sections.py.snap diff --git a/src/snapshots/ruff__linter__tests__d411.snap b/src/snapshots/ruff__linter__tests__D411_sections.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__d411.snap rename to src/snapshots/ruff__linter__tests__D411_sections.py.snap diff --git a/src/snapshots/ruff__linter__tests__d412.snap b/src/snapshots/ruff__linter__tests__D412_sections.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__d412.snap rename to src/snapshots/ruff__linter__tests__D412_sections.py.snap diff --git a/src/snapshots/ruff__linter__tests__d413.snap b/src/snapshots/ruff__linter__tests__D413_sections.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__d413.snap rename to src/snapshots/ruff__linter__tests__D413_sections.py.snap diff --git a/src/snapshots/ruff__linter__tests__d414.snap b/src/snapshots/ruff__linter__tests__D414_sections.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__d414.snap rename to src/snapshots/ruff__linter__tests__D414_sections.py.snap diff --git a/src/snapshots/ruff__linter__tests__d415.snap b/src/snapshots/ruff__linter__tests__D415_D.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__d415.snap rename to src/snapshots/ruff__linter__tests__D415_D.py.snap diff --git a/src/snapshots/ruff__linter__tests__d418.snap b/src/snapshots/ruff__linter__tests__D418_D.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__d418.snap rename to src/snapshots/ruff__linter__tests__D418_D.py.snap diff --git a/src/snapshots/ruff__linter__tests__d419.snap b/src/snapshots/ruff__linter__tests__D419_D.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__d419.snap rename to src/snapshots/ruff__linter__tests__D419_D.py.snap diff --git a/src/snapshots/ruff__linter__tests__e402.snap b/src/snapshots/ruff__linter__tests__E402_E402.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__e402.snap rename to src/snapshots/ruff__linter__tests__E402_E402.py.snap diff --git a/src/snapshots/ruff__linter__tests__e501.snap b/src/snapshots/ruff__linter__tests__E501_E501.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__e501.snap rename to src/snapshots/ruff__linter__tests__E501_E501.py.snap diff --git a/src/snapshots/ruff__linter__tests__e711.snap b/src/snapshots/ruff__linter__tests__E711_E711.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__e711.snap rename to src/snapshots/ruff__linter__tests__E711_E711.py.snap diff --git a/src/snapshots/ruff__linter__tests__e712.snap b/src/snapshots/ruff__linter__tests__E712_E712.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__e712.snap rename to src/snapshots/ruff__linter__tests__E712_E712.py.snap diff --git a/src/snapshots/ruff__linter__tests__e713.snap b/src/snapshots/ruff__linter__tests__E713_E713.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__e713.snap rename to src/snapshots/ruff__linter__tests__E713_E713.py.snap diff --git a/src/snapshots/ruff__linter__tests__e714.snap b/src/snapshots/ruff__linter__tests__E714_E714.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__e714.snap rename to src/snapshots/ruff__linter__tests__E714_E714.py.snap diff --git a/src/snapshots/ruff__linter__tests__e721.snap b/src/snapshots/ruff__linter__tests__E721_E721.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__e721.snap rename to src/snapshots/ruff__linter__tests__E721_E721.py.snap diff --git a/src/snapshots/ruff__linter__tests__e722.snap b/src/snapshots/ruff__linter__tests__E722_E722.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__e722.snap rename to src/snapshots/ruff__linter__tests__E722_E722.py.snap diff --git a/src/snapshots/ruff__linter__tests__e731.snap b/src/snapshots/ruff__linter__tests__E731_E731.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__e731.snap rename to src/snapshots/ruff__linter__tests__E731_E731.py.snap diff --git a/src/snapshots/ruff__linter__tests__e741.snap b/src/snapshots/ruff__linter__tests__E741_E741.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__e741.snap rename to src/snapshots/ruff__linter__tests__E741_E741.py.snap diff --git a/src/snapshots/ruff__linter__tests__e742.snap b/src/snapshots/ruff__linter__tests__E742_E742.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__e742.snap rename to src/snapshots/ruff__linter__tests__E742_E742.py.snap diff --git a/src/snapshots/ruff__linter__tests__e743.snap b/src/snapshots/ruff__linter__tests__E743_E743.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__e743.snap rename to src/snapshots/ruff__linter__tests__E743_E743.py.snap diff --git a/src/snapshots/ruff__linter__tests__e999.snap b/src/snapshots/ruff__linter__tests__E999_E999.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__e999.snap rename to src/snapshots/ruff__linter__tests__E999_E999.py.snap diff --git a/src/snapshots/ruff__linter__tests__f401.snap b/src/snapshots/ruff__linter__tests__F401_F401_0.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__f401.snap rename to src/snapshots/ruff__linter__tests__F401_F401_0.py.snap diff --git a/src/snapshots/ruff__linter__tests__f401_1.snap b/src/snapshots/ruff__linter__tests__F401_F401_1.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__f401_1.snap rename to src/snapshots/ruff__linter__tests__F401_F401_1.py.snap diff --git a/src/snapshots/ruff__linter__tests__f401_2.snap b/src/snapshots/ruff__linter__tests__F401_F401_2.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__f401_2.snap rename to src/snapshots/ruff__linter__tests__F401_F401_2.py.snap diff --git a/src/snapshots/ruff__linter__tests__f401_3.snap b/src/snapshots/ruff__linter__tests__F401_F401_3.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__f401_3.snap rename to src/snapshots/ruff__linter__tests__F401_F401_3.py.snap diff --git a/src/snapshots/ruff__linter__tests__f401_4.snap b/src/snapshots/ruff__linter__tests__F401_F401_4.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__f401_4.snap rename to src/snapshots/ruff__linter__tests__F401_F401_4.py.snap diff --git a/src/snapshots/ruff__linter__tests__f402.snap b/src/snapshots/ruff__linter__tests__F402_F402.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__f402.snap rename to src/snapshots/ruff__linter__tests__F402_F402.py.snap diff --git a/src/snapshots/ruff__linter__tests__f403.snap b/src/snapshots/ruff__linter__tests__F403_F403.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__f403.snap rename to src/snapshots/ruff__linter__tests__F403_F403.py.snap diff --git a/src/snapshots/ruff__linter__tests__f404.snap b/src/snapshots/ruff__linter__tests__F404_F404.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__f404.snap rename to src/snapshots/ruff__linter__tests__F404_F404.py.snap diff --git a/src/snapshots/ruff__linter__tests__f405.snap b/src/snapshots/ruff__linter__tests__F405_F405.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__f405.snap rename to src/snapshots/ruff__linter__tests__F405_F405.py.snap diff --git a/src/snapshots/ruff__linter__tests__f406.snap b/src/snapshots/ruff__linter__tests__F406_F406.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__f406.snap rename to src/snapshots/ruff__linter__tests__F406_F406.py.snap diff --git a/src/snapshots/ruff__linter__tests__f407.snap b/src/snapshots/ruff__linter__tests__F407_F407.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__f407.snap rename to src/snapshots/ruff__linter__tests__F407_F407.py.snap diff --git a/src/snapshots/ruff__linter__tests__f541.snap b/src/snapshots/ruff__linter__tests__F541_F541.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__f541.snap rename to src/snapshots/ruff__linter__tests__F541_F541.py.snap diff --git a/src/snapshots/ruff__linter__tests__f601.snap b/src/snapshots/ruff__linter__tests__F601_F601.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__f601.snap rename to src/snapshots/ruff__linter__tests__F601_F601.py.snap diff --git a/src/snapshots/ruff__linter__tests__f602.snap b/src/snapshots/ruff__linter__tests__F602_F602.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__f602.snap rename to src/snapshots/ruff__linter__tests__F602_F602.py.snap diff --git a/src/snapshots/ruff__linter__tests__f622.snap b/src/snapshots/ruff__linter__tests__F622_F622.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__f622.snap rename to src/snapshots/ruff__linter__tests__F622_F622.py.snap diff --git a/src/snapshots/ruff__linter__tests__f631.snap b/src/snapshots/ruff__linter__tests__F631_F631.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__f631.snap rename to src/snapshots/ruff__linter__tests__F631_F631.py.snap diff --git a/src/snapshots/ruff__linter__tests__f632.snap b/src/snapshots/ruff__linter__tests__F632_F632.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__f632.snap rename to src/snapshots/ruff__linter__tests__F632_F632.py.snap diff --git a/src/snapshots/ruff__linter__tests__f633.snap b/src/snapshots/ruff__linter__tests__F633_F633.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__f633.snap rename to src/snapshots/ruff__linter__tests__F633_F633.py.snap diff --git a/src/snapshots/ruff__linter__tests__f634.snap b/src/snapshots/ruff__linter__tests__F634_F634.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__f634.snap rename to src/snapshots/ruff__linter__tests__F634_F634.py.snap diff --git a/src/snapshots/ruff__linter__tests__f701.snap b/src/snapshots/ruff__linter__tests__F701_F701.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__f701.snap rename to src/snapshots/ruff__linter__tests__F701_F701.py.snap diff --git a/src/snapshots/ruff__linter__tests__f702.snap b/src/snapshots/ruff__linter__tests__F702_F702.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__f702.snap rename to src/snapshots/ruff__linter__tests__F702_F702.py.snap diff --git a/src/snapshots/ruff__linter__tests__f704.snap b/src/snapshots/ruff__linter__tests__F704_F704.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__f704.snap rename to src/snapshots/ruff__linter__tests__F704_F704.py.snap diff --git a/src/snapshots/ruff__linter__tests__f706.snap b/src/snapshots/ruff__linter__tests__F706_F706.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__f706.snap rename to src/snapshots/ruff__linter__tests__F706_F706.py.snap diff --git a/src/snapshots/ruff__linter__tests__f707.snap b/src/snapshots/ruff__linter__tests__F707_F707.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__f707.snap rename to src/snapshots/ruff__linter__tests__F707_F707.py.snap diff --git a/src/snapshots/ruff__linter__tests__f722.snap b/src/snapshots/ruff__linter__tests__F722_F722.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__f722.snap rename to src/snapshots/ruff__linter__tests__F722_F722.py.snap diff --git a/src/snapshots/ruff__linter__tests__f821.snap b/src/snapshots/ruff__linter__tests__F821_F821.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__f821.snap rename to src/snapshots/ruff__linter__tests__F821_F821.py.snap diff --git a/src/snapshots/ruff__linter__tests__f822.snap b/src/snapshots/ruff__linter__tests__F822_F822.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__f822.snap rename to src/snapshots/ruff__linter__tests__F822_F822.py.snap diff --git a/src/snapshots/ruff__linter__tests__f823.snap b/src/snapshots/ruff__linter__tests__F823_F823.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__f823.snap rename to src/snapshots/ruff__linter__tests__F823_F823.py.snap diff --git a/src/snapshots/ruff__linter__tests__f831.snap b/src/snapshots/ruff__linter__tests__F831_F831.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__f831.snap rename to src/snapshots/ruff__linter__tests__F831_F831.py.snap diff --git a/src/snapshots/ruff__linter__tests__f841.snap b/src/snapshots/ruff__linter__tests__F841_F841.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__f841.snap rename to src/snapshots/ruff__linter__tests__F841_F841.py.snap diff --git a/src/snapshots/ruff__linter__tests__f901.snap b/src/snapshots/ruff__linter__tests__F901_F901.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__f901.snap rename to src/snapshots/ruff__linter__tests__F901_F901.py.snap diff --git a/src/snapshots/ruff__linter__tests__t201.snap b/src/snapshots/ruff__linter__tests__T201_T201.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__t201.snap rename to src/snapshots/ruff__linter__tests__T201_T201.py.snap diff --git a/src/snapshots/ruff__linter__tests__t203.snap b/src/snapshots/ruff__linter__tests__T203_T203.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__t203.snap rename to src/snapshots/ruff__linter__tests__T203_T203.py.snap diff --git a/src/snapshots/ruff__linter__tests__u001.snap b/src/snapshots/ruff__linter__tests__U001_U001.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__u001.snap rename to src/snapshots/ruff__linter__tests__U001_U001.py.snap diff --git a/src/snapshots/ruff__linter__tests__u002.snap b/src/snapshots/ruff__linter__tests__U002_U002.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__u002.snap rename to src/snapshots/ruff__linter__tests__U002_U002.py.snap diff --git a/src/snapshots/ruff__linter__tests__u003.snap b/src/snapshots/ruff__linter__tests__U003_U003.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__u003.snap rename to src/snapshots/ruff__linter__tests__U003_U003.py.snap diff --git a/src/snapshots/ruff__linter__tests__u004.snap b/src/snapshots/ruff__linter__tests__U004_U004.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__u004.snap rename to src/snapshots/ruff__linter__tests__U004_U004.py.snap diff --git a/src/snapshots/ruff__linter__tests__u005.snap b/src/snapshots/ruff__linter__tests__U005_U005.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__u005.snap rename to src/snapshots/ruff__linter__tests__U005_U005.py.snap diff --git a/src/snapshots/ruff__linter__tests__u006.snap b/src/snapshots/ruff__linter__tests__U006_U006.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__u006.snap rename to src/snapshots/ruff__linter__tests__U006_U006.py.snap diff --git a/src/snapshots/ruff__linter__tests__u007.snap b/src/snapshots/ruff__linter__tests__U007_U007.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__u007.snap rename to src/snapshots/ruff__linter__tests__U007_U007.py.snap diff --git a/src/snapshots/ruff__linter__tests__spr001.snap b/src/snapshots/ruff__linter__tests__U008_U008.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__spr001.snap rename to src/snapshots/ruff__linter__tests__U008_U008.py.snap diff --git a/src/snapshots/ruff__linter__tests__w292.snap b/src/snapshots/ruff__linter__tests__W292_W292_0.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__w292.snap rename to src/snapshots/ruff__linter__tests__W292_W292_0.py.snap diff --git a/src/snapshots/ruff__linter__tests__w292_1.snap b/src/snapshots/ruff__linter__tests__W292_W292_1.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__w292_1.snap rename to src/snapshots/ruff__linter__tests__W292_W292_1.py.snap diff --git a/src/snapshots/ruff__linter__tests__w292_2.snap b/src/snapshots/ruff__linter__tests__W292_W292_2.py.snap similarity index 100% rename from src/snapshots/ruff__linter__tests__w292_2.snap rename to src/snapshots/ruff__linter__tests__W292_W292_2.py.snap diff --git a/src/snapshots/ruff__linter__tests__d200.snap b/src/snapshots/ruff__linter__tests__d200.snap deleted file mode 100644 index 2a22f0278f..0000000000 --- a/src/snapshots/ruff__linter__tests__d200.snap +++ /dev/null @@ -1,13 +0,0 @@ ---- -source: src/linter.rs -expression: checks ---- -- kind: FitsOnOneLine - location: - row: 124 - column: 5 - end_location: - row: 126 - column: 8 - fix: ~ - diff --git a/src/snapshots/ruff__linter__tests__f401_0.snap b/src/snapshots/ruff__linter__tests__f401_0.snap deleted file mode 100644 index 04b0b2a61d..0000000000 --- a/src/snapshots/ruff__linter__tests__f401_0.snap +++ /dev/null @@ -1,131 +0,0 @@ ---- -source: src/linter.rs -expression: checks ---- -- kind: - UnusedImport: - - functools - location: - row: 2 - column: 1 - end_location: - row: 2 - column: 21 - fix: - content: import os - location: - row: 2 - column: 1 - end_location: - row: 2 - column: 21 - applied: false -- kind: - UnusedImport: - - collections.OrderedDict - location: - row: 4 - column: 1 - end_location: - row: 8 - column: 2 - fix: - content: "from collections import (\n Counter,\n namedtuple,\n)" - location: - row: 4 - column: 1 - end_location: - row: 8 - column: 2 - applied: false -- kind: - UnusedImport: - - logging.handlers - location: - row: 12 - column: 1 - end_location: - row: 12 - column: 24 - fix: - content: import logging.handlers - location: - row: 12 - column: 1 - end_location: - row: 12 - column: 24 - applied: false -- kind: - UnusedImport: - - shelve - location: - row: 33 - column: 5 - end_location: - row: 33 - column: 18 - fix: - content: "" - location: - row: 33 - column: 1 - end_location: - row: 34 - column: 1 - applied: false -- kind: - UnusedImport: - - importlib - location: - row: 34 - column: 5 - end_location: - row: 34 - column: 21 - fix: - content: "" - location: - row: 34 - column: 1 - end_location: - row: 35 - column: 1 - applied: false -- kind: - UnusedImport: - - pathlib - location: - row: 38 - column: 5 - end_location: - row: 38 - column: 19 - fix: - content: "" - location: - row: 38 - column: 1 - end_location: - row: 39 - column: 1 - applied: false -- kind: - UnusedImport: - - pickle - location: - row: 53 - column: 9 - end_location: - row: 53 - column: 22 - fix: - content: pass - location: - row: 53 - column: 9 - end_location: - row: 53 - column: 22 - applied: false - diff --git a/src/snapshots/ruff__linter__tests__u008.snap b/src/snapshots/ruff__linter__tests__u008.snap deleted file mode 100644 index 16afacfaeb..0000000000 --- a/src/snapshots/ruff__linter__tests__u008.snap +++ /dev/null @@ -1,85 +0,0 @@ ---- -source: src/linter.rs -expression: checks ---- -- kind: SuperCallWithParameters - location: - row: 17 - column: 18 - end_location: - row: 17 - column: 36 - fix: - content: super() - location: - row: 17 - column: 18 - end_location: - row: 17 - column: 36 - applied: false -- kind: SuperCallWithParameters - location: - row: 18 - column: 9 - end_location: - row: 18 - column: 27 - fix: - content: super() - location: - row: 18 - column: 9 - end_location: - row: 18 - column: 27 - applied: false -- kind: SuperCallWithParameters - location: - row: 19 - column: 9 - end_location: - row: 22 - column: 10 - fix: - content: super() - location: - row: 19 - column: 9 - end_location: - row: 22 - column: 10 - applied: false -- kind: SuperCallWithParameters - location: - row: 36 - column: 9 - end_location: - row: 36 - column: 29 - fix: - content: super() - location: - row: 36 - column: 9 - end_location: - row: 36 - column: 29 - applied: false -- kind: SuperCallWithParameters - location: - row: 50 - column: 13 - end_location: - row: 50 - column: 33 - fix: - content: super() - location: - row: 50 - column: 13 - end_location: - row: 50 - column: 33 - applied: false - diff --git a/src/snapshots/ruff__linter__tests__w292_0.snap b/src/snapshots/ruff__linter__tests__w292_0.snap deleted file mode 100644 index 6f4412588e..0000000000 --- a/src/snapshots/ruff__linter__tests__w292_0.snap +++ /dev/null @@ -1,13 +0,0 @@ ---- -source: src/linter.rs -expression: checks ---- -- kind: NoNewLineAtEndOfFile - location: - row: 2 - column: 9 - end_location: - row: 2 - column: 9 - fix: ~ -