From 2e89cd8802c163b684b137e71fc5c793e36eb69d Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Thu, 1 Dec 2022 13:33:33 -0500 Subject: [PATCH] Split test fixtures up by plugin (#985) --- .../test/fixtures/{ => eradicate}/ERA001.py | 0 .../{ => filesystem}/excluded_file.py | 0 .../with_excluded_directory/__init__.py | 0 .../migrations/__init__.py | 0 .../migrations/migration.py | 0 .../with_excluded_file/other_excluded_file.py | 0 .../test/fixtures/{ => flake8_2020}/YTT101.py | 0 .../test/fixtures/{ => flake8_2020}/YTT102.py | 0 .../test/fixtures/{ => flake8_2020}/YTT103.py | 0 .../test/fixtures/{ => flake8_2020}/YTT201.py | 0 .../test/fixtures/{ => flake8_2020}/YTT202.py | 0 .../test/fixtures/{ => flake8_2020}/YTT203.py | 0 .../test/fixtures/{ => flake8_2020}/YTT204.py | 0 .../test/fixtures/{ => flake8_2020}/YTT301.py | 0 .../test/fixtures/{ => flake8_2020}/YTT302.py | 0 .../test/fixtures/{ => flake8_2020}/YTT303.py | 0 .../test/fixtures/{ => flake8_bandit}/S101.py | 0 .../test/fixtures/{ => flake8_bandit}/S102.py | 0 .../test/fixtures/{ => flake8_bandit}/S104.py | 0 .../test/fixtures/{ => flake8_bandit}/S105.py | 0 .../test/fixtures/{ => flake8_bandit}/S106.py | 0 .../test/fixtures/{ => flake8_bandit}/S107.py | 0 .../fixtures/{ => flake8_blind_except}/BLE.py | 0 .../fixtures/{ => flake8_boolean_trap}/FBT.py | 0 .../fixtures/{ => flake8_bugbear}/B002.py | 0 .../fixtures/{ => flake8_bugbear}/B003.py | 0 .../fixtures/{ => flake8_bugbear}/B004.py | 0 .../fixtures/{ => flake8_bugbear}/B005.py | 0 .../{ => flake8_bugbear}/B006_B008.py | 0 .../fixtures/{ => flake8_bugbear}/B007.py | 0 .../{ => flake8_bugbear}/B008_extended.py | 0 .../{ => flake8_bugbear}/B009_B010.py | 0 .../fixtures/{ => flake8_bugbear}/B011.py | 0 .../fixtures/{ => flake8_bugbear}/B012.py | 0 .../fixtures/{ => flake8_bugbear}/B013.py | 0 .../fixtures/{ => flake8_bugbear}/B014.py | 0 .../fixtures/{ => flake8_bugbear}/B015.py | 0 .../fixtures/{ => flake8_bugbear}/B016.py | 0 .../fixtures/{ => flake8_bugbear}/B017.py | 0 .../fixtures/{ => flake8_bugbear}/B018.py | 0 .../fixtures/{ => flake8_bugbear}/B019.py | 0 .../fixtures/{ => flake8_bugbear}/B020.py | 0 .../fixtures/{ => flake8_bugbear}/B021.py | 0 .../fixtures/{ => flake8_bugbear}/B022.py | 0 .../fixtures/{ => flake8_bugbear}/B023.py | 0 .../fixtures/{ => flake8_bugbear}/B024.py | 0 .../fixtures/{ => flake8_bugbear}/B025.py | 0 .../fixtures/{ => flake8_bugbear}/B026.py | 0 .../fixtures/{ => flake8_bugbear}/B027.py | 0 .../fixtures/{ => flake8_bugbear}/B904.py | 0 .../fixtures/{ => flake8_builtins}/A001.py | 0 .../fixtures/{ => flake8_builtins}/A002.py | 0 .../fixtures/{ => flake8_builtins}/A003.py | 0 .../{ => flake8_comprehensions}/C400.py | 0 .../{ => flake8_comprehensions}/C401.py | 0 .../{ => flake8_comprehensions}/C402.py | 0 .../{ => flake8_comprehensions}/C403.py | 0 .../{ => flake8_comprehensions}/C404.py | 0 .../{ => flake8_comprehensions}/C405.py | 0 .../{ => flake8_comprehensions}/C406.py | 0 .../{ => flake8_comprehensions}/C408.py | 0 .../{ => flake8_comprehensions}/C409.py | 0 .../{ => flake8_comprehensions}/C410.py | 0 .../{ => flake8_comprehensions}/C411.py | 0 .../{ => flake8_comprehensions}/C413.py | 0 .../{ => flake8_comprehensions}/C414.py | 0 .../{ => flake8_comprehensions}/C415.py | 0 .../{ => flake8_comprehensions}/C416.py | 0 .../{ => flake8_comprehensions}/C417.py | 0 .../test/fixtures/{ => flake8_print}/T100.py | 0 .../test/fixtures/{ => flake8_print}/T201.py | 0 .../test/fixtures/{ => flake8_print}/T203.py | 0 .../{ => flake8_tidy_imports}/I252.py | 0 resources/test/fixtures/{ => mccabe}/C901.py | 0 .../test/fixtures/{ => pep8_naming}/N801.py | 0 .../test/fixtures/{ => pep8_naming}/N802.py | 0 .../test/fixtures/{ => pep8_naming}/N803.py | 0 .../test/fixtures/{ => pep8_naming}/N804.py | 0 .../test/fixtures/{ => pep8_naming}/N805.py | 0 .../test/fixtures/{ => pep8_naming}/N806.py | 0 .../test/fixtures/{ => pep8_naming}/N807.py | 0 .../test/fixtures/{ => pep8_naming}/N811.py | 0 .../test/fixtures/{ => pep8_naming}/N812.py | 0 .../test/fixtures/{ => pep8_naming}/N813.py | 0 .../test/fixtures/{ => pep8_naming}/N814.py | 0 .../test/fixtures/{ => pep8_naming}/N815.py | 0 .../test/fixtures/{ => pep8_naming}/N816.py | 0 .../test/fixtures/{ => pep8_naming}/N817.py | 0 .../test/fixtures/{ => pep8_naming}/N818.py | 0 .../test/fixtures/{ => pycodestyle}/E402.py | 0 .../test/fixtures/{ => pycodestyle}/E501.py | 0 .../test/fixtures/{ => pycodestyle}/E711.py | 0 .../test/fixtures/{ => pycodestyle}/E712.py | 0 .../test/fixtures/{ => pycodestyle}/E713.py | 0 .../test/fixtures/{ => pycodestyle}/E714.py | 0 .../test/fixtures/{ => pycodestyle}/E721.py | 0 .../test/fixtures/{ => pycodestyle}/E722.py | 0 .../test/fixtures/{ => pycodestyle}/E731.py | 0 .../test/fixtures/{ => pycodestyle}/E741.py | 0 .../test/fixtures/{ => pycodestyle}/E742.py | 0 .../test/fixtures/{ => pycodestyle}/E743.py | 0 .../test/fixtures/{ => pycodestyle}/E999.py | 0 .../test/fixtures/{ => pycodestyle}/W292_0.py | 0 .../test/fixtures/{ => pycodestyle}/W292_1.py | 0 .../test/fixtures/{ => pycodestyle}/W292_2.py | 0 .../test/fixtures/{ => pycodestyle}/W605_0.py | 0 .../test/fixtures/{ => pycodestyle}/W605_1.py | 0 resources/test/fixtures/{ => pydocstyle}/D.py | 0 .../canonical_google_examples.py | 0 .../canonical_numpy_examples.py | 0 .../fixtures/{ => pydocstyle}/sections.py | 0 .../test/fixtures/{ => pyflakes}/F401_0.py | 0 .../test/fixtures/{ => pyflakes}/F401_1.py | 0 .../test/fixtures/{ => pyflakes}/F401_2.py | 0 .../test/fixtures/{ => pyflakes}/F401_3.py | 0 .../test/fixtures/{ => pyflakes}/F401_4.py | 0 .../test/fixtures/{ => pyflakes}/F401_5.py | 0 .../test/fixtures/{ => pyflakes}/F401_6.py | 0 .../test/fixtures/{ => pyflakes}/F402.py | 0 .../test/fixtures/{ => pyflakes}/F403.py | 0 .../test/fixtures/{ => pyflakes}/F404.py | 0 .../test/fixtures/{ => pyflakes}/F405.py | 0 .../test/fixtures/{ => pyflakes}/F406.py | 0 .../test/fixtures/{ => pyflakes}/F407.py | 0 .../test/fixtures/{ => pyflakes}/F502.py | 0 .../test/fixtures/{ => pyflakes}/F503.py | 0 .../test/fixtures/{ => pyflakes}/F504.py | 0 .../test/fixtures/{ => pyflakes}/F50x.py | 0 .../test/fixtures/{ => pyflakes}/F521.py | 0 .../test/fixtures/{ => pyflakes}/F522.py | 0 .../test/fixtures/{ => pyflakes}/F523.py | 0 .../test/fixtures/{ => pyflakes}/F524.py | 0 .../test/fixtures/{ => pyflakes}/F525.py | 0 .../test/fixtures/{ => pyflakes}/F541.py | 0 .../test/fixtures/{ => pyflakes}/F601.py | 0 .../test/fixtures/{ => pyflakes}/F602.py | 0 .../test/fixtures/{ => pyflakes}/F622.py | 0 .../test/fixtures/{ => pyflakes}/F631.py | 0 .../test/fixtures/{ => pyflakes}/F632.py | 0 .../test/fixtures/{ => pyflakes}/F633.py | 0 .../test/fixtures/{ => pyflakes}/F634.py | 0 .../test/fixtures/{ => pyflakes}/F701.py | 0 .../test/fixtures/{ => pyflakes}/F702.py | 0 .../test/fixtures/{ => pyflakes}/F704.py | 0 .../test/fixtures/{ => pyflakes}/F706.py | 0 .../test/fixtures/{ => pyflakes}/F707.py | 0 .../test/fixtures/{ => pyflakes}/F722.py | 0 .../test/fixtures/{ => pyflakes}/F821_0.py | 0 .../test/fixtures/{ => pyflakes}/F821_1.py | 0 .../test/fixtures/{ => pyflakes}/F821_2.py | 0 .../test/fixtures/{ => pyflakes}/F821_3.py | 0 .../test/fixtures/{ => pyflakes}/F821_4.py | 0 .../test/fixtures/{ => pyflakes}/F821_5.py | 0 .../test/fixtures/{ => pyflakes}/F822.py | 0 .../test/fixtures/{ => pyflakes}/F823.py | 0 .../test/fixtures/{ => pyflakes}/F831.py | 0 .../test/fixtures/{ => pyflakes}/F841.py | 0 .../test/fixtures/{ => pyflakes}/F901.py | 0 .../test/fixtures/{ => pyflakes}/__init__.py | 0 .../{ => pyflakes}/future_annotations.py | 0 .../test/fixtures/{ => pyupgrade}/U001.py | 0 .../test/fixtures/{ => pyupgrade}/U003.py | 0 .../test/fixtures/{ => pyupgrade}/U004.py | 0 .../test/fixtures/{ => pyupgrade}/U005.py | 0 .../test/fixtures/{ => pyupgrade}/U006.py | 0 .../test/fixtures/{ => pyupgrade}/U007.py | 0 .../test/fixtures/{ => pyupgrade}/U008.py | 0 .../test/fixtures/{ => pyupgrade}/U009_0.py | 0 .../test/fixtures/{ => pyupgrade}/U009_1.py | 0 .../test/fixtures/{ => pyupgrade}/U009_2.py | 0 .../test/fixtures/{ => pyupgrade}/U009_3.py | 0 .../test/fixtures/{ => pyupgrade}/U009_4.py | 0 .../test/fixtures/{ => pyupgrade}/U010.py | 0 .../test/fixtures/{ => pyupgrade}/U011_0.py | 0 .../test/fixtures/{ => pyupgrade}/U011_1.py | 0 .../test/fixtures/{ => pyupgrade}/U012.py | 0 .../test/fixtures/{ => pyupgrade}/U013.py | 0 .../test/fixtures/{ => pyupgrade}/U014.py | 0 .../test/fixtures/{ => pyupgrade}/U015.py | 0 .../fixtures/pyupgrade/future_annotations.py | 40 ++ resources/test/fixtures/{ => ruff}/M001.py | 0 resources/test/fixtures/{ => ruff}/RUF001.py | 0 resources/test/fixtures/{ => ruff}/RUF002.py | 0 resources/test/fixtures/{ => ruff}/RUF003.py | 0 .../test/fixtures/{ => ruff}/RUF101_0.py | 0 .../test/fixtures/{ => ruff}/RUF101_1.py | 0 .../test/fixtures/{ => ruff}/RUF101_2.py | 0 .../test/fixtures/{ => ruff}/RUF101_3.py | 0 .../test/fixtures/{ => ruff}/RUF101_4.py | 0 .../test/fixtures/{ => ruff}/RUF101_5.py | 0 .../test/fixtures/{ => ruff}/RUF101_6.py | 0 src/directives.rs | 1 - src/eradicate/mod.rs | 28 ++ ...__eradicate__tests__ERA001_ERA001.py.snap} | 2 +- src/flake8_2020/mod.rs | 37 ++ ...flake8_2020__tests__YTT101_YTT101.py.snap} | 2 +- ...flake8_2020__tests__YTT102_YTT102.py.snap} | 2 +- ...flake8_2020__tests__YTT103_YTT103.py.snap} | 2 +- ...flake8_2020__tests__YTT201_YTT201.py.snap} | 2 +- ...flake8_2020__tests__YTT202_YTT202.py.snap} | 2 +- ...flake8_2020__tests__YTT203_YTT203.py.snap} | 2 +- ...flake8_2020__tests__YTT204_YTT204.py.snap} | 2 +- ...flake8_2020__tests__YTT301_YTT301.py.snap} | 2 +- ...flake8_2020__tests__YTT302_YTT302.py.snap} | 2 +- ...flake8_2020__tests__YTT303_YTT303.py.snap} | 2 +- src/flake8_bandit/mod.rs | 33 ++ ...__flake8_bandit__tests__S101_S101.py.snap} | 2 +- ...__flake8_bandit__tests__S102_S102.py.snap} | 2 +- ...__flake8_bandit__tests__S104_S104.py.snap} | 2 +- ...__flake8_bandit__tests__S105_S105.py.snap} | 2 +- ...__flake8_bandit__tests__S106_S106.py.snap} | 2 +- ...__flake8_bandit__tests__S107_S107.py.snap} | 2 +- src/flake8_blind_except/mod.rs | 28 ++ ...8_blind_except__tests__BLE001_BLE.py.snap} | 2 +- src/flake8_boolean_trap/mod.rs | 30 ++ ...8_boolean_trap__tests__FBT001_FBT.py.snap} | 2 +- ...8_boolean_trap__tests__FBT002_FBT.py.snap} | 2 +- ...8_boolean_trap__tests__FBT003_FBT.py.snap} | 2 +- src/flake8_bugbear/mod.rs | 44 ++- ..._flake8_bugbear__tests__B002_B002.py.snap} | 2 +- ..._flake8_bugbear__tests__B003_B003.py.snap} | 2 +- ..._flake8_bugbear__tests__B004_B004.py.snap} | 2 +- ..._flake8_bugbear__tests__B005_B005.py.snap} | 2 +- ...e8_bugbear__tests__B006_B006_B008.py.snap} | 2 +- ..._flake8_bugbear__tests__B007_B007.py.snap} | 2 +- ...e8_bugbear__tests__B008_B006_B008.py.snap} | 2 +- ...e8_bugbear__tests__B009_B009_B010.py.snap} | 2 +- ...e8_bugbear__tests__B010_B009_B010.py.snap} | 2 +- ..._flake8_bugbear__tests__B011_B011.py.snap} | 2 +- ..._flake8_bugbear__tests__B012_B012.py.snap} | 2 +- ..._flake8_bugbear__tests__B013_B013.py.snap} | 2 +- ..._flake8_bugbear__tests__B014_B014.py.snap} | 2 +- ..._flake8_bugbear__tests__B015_B015.py.snap} | 2 +- ..._flake8_bugbear__tests__B016_B016.py.snap} | 2 +- ..._flake8_bugbear__tests__B017_B017.py.snap} | 2 +- ..._flake8_bugbear__tests__B018_B018.py.snap} | 2 +- ..._flake8_bugbear__tests__B019_B019.py.snap} | 2 +- ..._flake8_bugbear__tests__B020_B020.py.snap} | 2 +- ..._flake8_bugbear__tests__B021_B021.py.snap} | 2 +- ..._flake8_bugbear__tests__B022_B022.py.snap} | 2 +- ..._flake8_bugbear__tests__B023_B023.py.snap} | 2 +- ..._flake8_bugbear__tests__B024_B024.py.snap} | 2 +- ..._flake8_bugbear__tests__B025_B025.py.snap} | 2 +- ..._flake8_bugbear__tests__B026_B026.py.snap} | 2 +- ..._flake8_bugbear__tests__B027_B027.py.snap} | 2 +- ..._flake8_bugbear__tests__B904_B904.py.snap} | 2 +- src/flake8_builtins/mod.rs | 30 ++ ...flake8_builtins__tests__A001_A001.py.snap} | 2 +- ...flake8_builtins__tests__A002_A002.py.snap} | 2 +- ...flake8_builtins__tests__A003_A003.py.snap} | 2 +- src/flake8_comprehensions/mod.rs | 44 +++ ..._comprehensions__tests__C400_C400.py.snap} | 2 +- ..._comprehensions__tests__C401_C401.py.snap} | 2 +- ..._comprehensions__tests__C402_C402.py.snap} | 2 +- ..._comprehensions__tests__C403_C403.py.snap} | 2 +- ..._comprehensions__tests__C404_C404.py.snap} | 2 +- ..._comprehensions__tests__C405_C405.py.snap} | 2 +- ..._comprehensions__tests__C406_C406.py.snap} | 2 +- ..._comprehensions__tests__C408_C408.py.snap} | 2 +- ..._comprehensions__tests__C409_C409.py.snap} | 2 +- ..._comprehensions__tests__C410_C410.py.snap} | 2 +- ..._comprehensions__tests__C411_C411.py.snap} | 2 +- ..._comprehensions__tests__C413_C413.py.snap} | 2 +- ..._comprehensions__tests__C414_C414.py.snap} | 2 +- ..._comprehensions__tests__C415_C415.py.snap} | 2 +- ..._comprehensions__tests__C416_C416.py.snap} | 2 +- ..._comprehensions__tests__C417_C417.py.snap} | 2 +- src/flake8_print/mod.rs | 30 ++ ...f__flake8_print__tests__T100_T100.py.snap} | 2 +- ...f__flake8_print__tests__T201_T201.py.snap} | 2 +- ...f__flake8_print__tests__T203_T203.py.snap} | 2 +- src/flake8_tidy_imports/mod.rs | 4 +- src/linter.rs | 371 ------------------ src/mccabe/mod.rs | 2 +- src/pep8_naming/mod.rs | 42 ++ ...ff__pep8_naming__tests__N801_N801.py.snap} | 2 +- ...ff__pep8_naming__tests__N802_N802.py.snap} | 2 +- ...ff__pep8_naming__tests__N803_N803.py.snap} | 2 +- ...ff__pep8_naming__tests__N804_N804.py.snap} | 2 +- ...ff__pep8_naming__tests__N805_N805.py.snap} | 2 +- ...ff__pep8_naming__tests__N806_N806.py.snap} | 2 +- ...ff__pep8_naming__tests__N807_N807.py.snap} | 2 +- ...ff__pep8_naming__tests__N811_N811.py.snap} | 2 +- ...ff__pep8_naming__tests__N812_N812.py.snap} | 2 +- ...ff__pep8_naming__tests__N813_N813.py.snap} | 2 +- ...ff__pep8_naming__tests__N814_N814.py.snap} | 2 +- ...ff__pep8_naming__tests__N815_N815.py.snap} | 2 +- ...ff__pep8_naming__tests__N816_N816.py.snap} | 2 +- ...ff__pep8_naming__tests__N817_N817.py.snap} | 2 +- ...ff__pep8_naming__tests__N818_N818.py.snap} | 2 +- src/pycodestyle/mod.rs | 45 +++ ...ff__pycodestyle__tests__E402_E402.py.snap} | 2 +- ...ff__pycodestyle__tests__E501_E501.py.snap} | 2 +- ...ff__pycodestyle__tests__E711_E711.py.snap} | 2 +- ...ff__pycodestyle__tests__E712_E712.py.snap} | 2 +- ...ff__pycodestyle__tests__E713_E713.py.snap} | 2 +- ...ff__pycodestyle__tests__E714_E714.py.snap} | 2 +- ...ff__pycodestyle__tests__E721_E721.py.snap} | 2 +- ...ff__pycodestyle__tests__E722_E722.py.snap} | 2 +- ...ff__pycodestyle__tests__E731_E731.py.snap} | 2 +- ...ff__pycodestyle__tests__E741_E741.py.snap} | 2 +- ...ff__pycodestyle__tests__E742_E742.py.snap} | 2 +- ...ff__pycodestyle__tests__E743_E743.py.snap} | 2 +- ...ff__pycodestyle__tests__E999_E999.py.snap} | 2 +- ...__pycodestyle__tests__W292_W292_0.py.snap} | 2 +- ...f__pycodestyle__tests__W292_W292_1.py.snap | 6 + ...f__pycodestyle__tests__W292_W292_2.py.snap | 6 + ...__pycodestyle__tests__W605_W605_0.py.snap} | 2 +- ...__pycodestyle__tests__W605_W605_1.py.snap} | 2 +- src/pydocstyle/mod.rs | 72 ++++ .../ruff__pydocstyle__tests__D100_D.py.snap} | 2 +- .../ruff__pydocstyle__tests__D101_D.py.snap} | 2 +- .../ruff__pydocstyle__tests__D102_D.py.snap} | 2 +- .../ruff__pydocstyle__tests__D103_D.py.snap} | 2 +- .../ruff__pydocstyle__tests__D104_D.py.snap | 6 + .../ruff__pydocstyle__tests__D105_D.py.snap} | 2 +- .../ruff__pydocstyle__tests__D106_D.py.snap | 6 + .../ruff__pydocstyle__tests__D107_D.py.snap} | 2 +- .../ruff__pydocstyle__tests__D201_D.py.snap} | 2 +- .../ruff__pydocstyle__tests__D202_D.py.snap} | 2 +- .../ruff__pydocstyle__tests__D203_D.py.snap} | 2 +- .../ruff__pydocstyle__tests__D204_D.py.snap} | 2 +- .../ruff__pydocstyle__tests__D205_D.py.snap} | 2 +- .../ruff__pydocstyle__tests__D206_D.py.snap | 6 + .../ruff__pydocstyle__tests__D207_D.py.snap} | 2 +- .../ruff__pydocstyle__tests__D208_D.py.snap} | 2 +- .../ruff__pydocstyle__tests__D209_D.py.snap} | 2 +- .../ruff__pydocstyle__tests__D210_D.py.snap} | 2 +- .../ruff__pydocstyle__tests__D211_D.py.snap} | 2 +- .../ruff__pydocstyle__tests__D212_D.py.snap} | 2 +- .../ruff__pydocstyle__tests__D213_D.py.snap} | 2 +- ..._pydocstyle__tests__D214_sections.py.snap} | 2 +- ..._pydocstyle__tests__D215_sections.py.snap} | 2 +- .../ruff__pydocstyle__tests__D300_D.py.snap} | 2 +- .../ruff__pydocstyle__tests__D400_D.py.snap} | 2 +- .../ruff__pydocstyle__tests__D402_D.py.snap} | 2 +- .../ruff__pydocstyle__tests__D403_D.py.snap | 6 + .../ruff__pydocstyle__tests__D404_D.py.snap | 6 + ..._pydocstyle__tests__D405_sections.py.snap} | 2 +- ..._pydocstyle__tests__D406_sections.py.snap} | 2 +- ..._pydocstyle__tests__D407_sections.py.snap} | 2 +- ..._pydocstyle__tests__D408_sections.py.snap} | 2 +- ..._pydocstyle__tests__D409_sections.py.snap} | 2 +- ..._pydocstyle__tests__D410_sections.py.snap} | 2 +- ..._pydocstyle__tests__D411_sections.py.snap} | 2 +- ..._pydocstyle__tests__D412_sections.py.snap} | 2 +- ...__pydocstyle__tests__D413_sections.py.snap | 6 + ..._pydocstyle__tests__D414_sections.py.snap} | 2 +- .../ruff__pydocstyle__tests__D415_D.py.snap} | 2 +- .../ruff__pydocstyle__tests__D416_D.py.snap | 6 + ...ts__D417_canonical_google_examples.py.snap | 6 + ...sts__D417_canonical_numpy_examples.py.snap | 6 + ..._pydocstyle__tests__D417_sections.py.snap} | 2 +- .../ruff__pydocstyle__tests__D418_D.py.snap} | 2 +- .../ruff__pydocstyle__tests__D419_D.py.snap} | 2 +- src/pyflakes/mod.rs | 123 ++++++ ...uff__pyflakes__tests__F401_F401_0.py.snap} | 2 +- ...uff__pyflakes__tests__F401_F401_1.py.snap} | 2 +- ...uff__pyflakes__tests__F401_F401_2.py.snap} | 2 +- ...ruff__pyflakes__tests__F401_F401_3.py.snap | 6 + ...ruff__pyflakes__tests__F401_F401_4.py.snap | 6 + ...uff__pyflakes__tests__F401_F401_5.py.snap} | 2 +- ...uff__pyflakes__tests__F401_F401_6.py.snap} | 2 +- .../ruff__pyflakes__tests__F402_F402.py.snap} | 2 +- .../ruff__pyflakes__tests__F403_F403.py.snap} | 2 +- .../ruff__pyflakes__tests__F404_F404.py.snap} | 2 +- .../ruff__pyflakes__tests__F405_F405.py.snap} | 2 +- .../ruff__pyflakes__tests__F406_F406.py.snap} | 2 +- .../ruff__pyflakes__tests__F407_F407.py.snap} | 2 +- .../ruff__pyflakes__tests__F501_F50x.py.snap} | 2 +- .../ruff__pyflakes__tests__F502_F502.py.snap} | 2 +- .../ruff__pyflakes__tests__F502_F50x.py.snap} | 2 +- .../ruff__pyflakes__tests__F503_F503.py.snap} | 2 +- .../ruff__pyflakes__tests__F503_F50x.py.snap} | 2 +- .../ruff__pyflakes__tests__F504_F504.py.snap} | 2 +- .../ruff__pyflakes__tests__F504_F50x.py.snap} | 2 +- .../ruff__pyflakes__tests__F505_F504.py.snap | 6 + .../ruff__pyflakes__tests__F505_F50x.py.snap} | 2 +- .../ruff__pyflakes__tests__F506_F50x.py.snap} | 2 +- .../ruff__pyflakes__tests__F507_F50x.py.snap} | 2 +- .../ruff__pyflakes__tests__F508_F50x.py.snap} | 2 +- .../ruff__pyflakes__tests__F509_F50x.py.snap} | 2 +- .../ruff__pyflakes__tests__F521_F521.py.snap} | 2 +- .../ruff__pyflakes__tests__F522_F522.py.snap} | 2 +- .../ruff__pyflakes__tests__F523_F523.py.snap} | 2 +- .../ruff__pyflakes__tests__F524_F524.py.snap} | 2 +- .../ruff__pyflakes__tests__F525_F525.py.snap} | 2 +- .../ruff__pyflakes__tests__F541_F541.py.snap} | 2 +- .../ruff__pyflakes__tests__F601_F601.py.snap} | 2 +- .../ruff__pyflakes__tests__F602_F602.py.snap} | 2 +- .../ruff__pyflakes__tests__F622_F622.py.snap} | 2 +- .../ruff__pyflakes__tests__F631_F631.py.snap} | 2 +- .../ruff__pyflakes__tests__F632_F632.py.snap} | 2 +- .../ruff__pyflakes__tests__F633_F633.py.snap} | 2 +- .../ruff__pyflakes__tests__F634_F634.py.snap} | 2 +- .../ruff__pyflakes__tests__F701_F701.py.snap} | 2 +- .../ruff__pyflakes__tests__F702_F702.py.snap} | 2 +- .../ruff__pyflakes__tests__F704_F704.py.snap} | 2 +- .../ruff__pyflakes__tests__F706_F706.py.snap} | 2 +- .../ruff__pyflakes__tests__F707_F707.py.snap} | 2 +- .../ruff__pyflakes__tests__F722_F722.py.snap} | 2 +- ...uff__pyflakes__tests__F821_F821_0.py.snap} | 2 +- ...uff__pyflakes__tests__F821_F821_1.py.snap} | 2 +- ...uff__pyflakes__tests__F821_F821_2.py.snap} | 2 +- ...uff__pyflakes__tests__F821_F821_3.py.snap} | 2 +- ...uff__pyflakes__tests__F821_F821_4.py.snap} | 2 +- ...uff__pyflakes__tests__F821_F821_5.py.snap} | 2 +- .../ruff__pyflakes__tests__F822_F822.py.snap} | 2 +- .../ruff__pyflakes__tests__F823_F823.py.snap} | 2 +- .../ruff__pyflakes__tests__F831_F831.py.snap} | 2 +- .../ruff__pyflakes__tests__F841_F841.py.snap} | 2 +- .../ruff__pyflakes__tests__F901_F901.py.snap} | 2 +- ...akes__tests__f841_dummy_variable_rgx.snap} | 2 +- ..._pyflakes__tests__future_annotations.snap} | 2 +- .../ruff__pyflakes__tests__init.snap | 6 + src/pyupgrade/mod.rs | 107 +++++ ...ruff__pyupgrade__tests__U001_U001.py.snap} | 2 +- ...ruff__pyupgrade__tests__U003_U003.py.snap} | 2 +- ...ruff__pyupgrade__tests__U004_U004.py.snap} | 2 +- ...ruff__pyupgrade__tests__U005_U005.py.snap} | 2 +- ...ruff__pyupgrade__tests__U006_U006.py.snap} | 2 +- ...ruff__pyupgrade__tests__U007_U007.py.snap} | 2 +- ...ruff__pyupgrade__tests__U008_U008.py.snap} | 2 +- ...ff__pyupgrade__tests__U009_U009_0.py.snap} | 2 +- ...ff__pyupgrade__tests__U009_U009_1.py.snap} | 2 +- ...uff__pyupgrade__tests__U009_U009_2.py.snap | 6 + ...uff__pyupgrade__tests__U009_U009_3.py.snap | 6 + ...uff__pyupgrade__tests__U009_U009_4.py.snap | 6 + ...ruff__pyupgrade__tests__U010_U010.py.snap} | 2 +- ...ff__pyupgrade__tests__U011_U011_0.py.snap} | 2 +- ...uff__pyupgrade__tests__U011_U011_1.py.snap | 6 + ...ruff__pyupgrade__tests__U012_U012.py.snap} | 2 +- ...ruff__pyupgrade__tests__U013_U013.py.snap} | 2 +- ...ruff__pyupgrade__tests__U014_U014.py.snap} | 2 +- ...ruff__pyupgrade__tests__U015_U015.py.snap} | 2 +- ...ests__future_annotations_pep_585_p37.snap} | 2 +- ...ts__future_annotations_pep_585_py310.snap} | 2 +- ...ests__future_annotations_pep_604_p37.snap} | 2 +- ...ts__future_annotations_pep_604_py310.snap} | 2 +- src/rules/mod.rs | 49 +++ ...ruff__rules__tests__RUF001_RUF001.py.snap} | 2 +- ...ruff__rules__tests__RUF002_RUF002.py.snap} | 2 +- ...ruff__rules__tests__RUF003_RUF003.py.snap} | 2 +- ...ff__rules__tests__RUF101_RUF101_0.py.snap} | 2 +- ...ff__rules__tests__RUF101_RUF101_1.py.snap} | 2 +- ...ff__rules__tests__RUF101_RUF101_2.py.snap} | 2 +- ...ff__rules__tests__RUF101_RUF101_3.py.snap} | 2 +- ...ff__rules__tests__RUF101_RUF101_4.py.snap} | 2 +- ...ff__rules__tests__RUF101_RUF101_5.py.snap} | 2 +- ...ff__rules__tests__RUF101_RUF101_6.py.snap} | 2 +- .../snapshots/ruff__rules__tests__m001.snap} | 2 +- .../ruff__linter__tests__D404_D.py.snap | 6 - ...ruff__linter__tests__D413_sections.py.snap | 6 - .../ruff__linter__tests__D416_D.py.snap | 6 - ...ts__D417_canonical_google_examples.py.snap | 6 - ...sts__D417_canonical_numpy_examples.py.snap | 6 - .../ruff__linter__tests__F401_F401_1.py.snap | 6 - .../ruff__linter__tests__F401_F401_2.py.snap | 6 - .../ruff__linter__tests__F401_F401_3.py.snap | 6 - .../ruff__linter__tests__F401_F401_4.py.snap | 6 - .../ruff__linter__tests__F505_F504.py.snap | 6 - ...ff__linter__tests__RUF101_RUF101_3.py.snap | 6 - ...ff__linter__tests__RUF101_RUF101_5.py.snap | 6 - .../ruff__linter__tests__U009_U009_2.py.snap | 6 - .../ruff__linter__tests__U009_U009_3.py.snap | 6 - .../ruff__linter__tests__U009_U009_4.py.snap | 6 - .../ruff__linter__tests__U011_U011_1.py.snap | 6 - .../ruff__linter__tests__W292_W292_1.py.snap | 6 - .../ruff__linter__tests__W292_W292_2.py.snap | 6 - src/snapshots/ruff__linter__tests__init.snap | 6 - 470 files changed, 1120 insertions(+), 712 deletions(-) rename resources/test/fixtures/{ => eradicate}/ERA001.py (100%) rename resources/test/fixtures/{ => filesystem}/excluded_file.py (100%) rename resources/test/fixtures/{ => filesystem}/with_excluded_directory/__init__.py (100%) rename resources/test/fixtures/{ => filesystem}/with_excluded_directory/migrations/__init__.py (100%) rename resources/test/fixtures/{ => filesystem}/with_excluded_directory/migrations/migration.py (100%) rename resources/test/fixtures/{ => filesystem}/with_excluded_file/other_excluded_file.py (100%) rename resources/test/fixtures/{ => flake8_2020}/YTT101.py (100%) rename resources/test/fixtures/{ => flake8_2020}/YTT102.py (100%) rename resources/test/fixtures/{ => flake8_2020}/YTT103.py (100%) rename resources/test/fixtures/{ => flake8_2020}/YTT201.py (100%) rename resources/test/fixtures/{ => flake8_2020}/YTT202.py (100%) rename resources/test/fixtures/{ => flake8_2020}/YTT203.py (100%) rename resources/test/fixtures/{ => flake8_2020}/YTT204.py (100%) rename resources/test/fixtures/{ => flake8_2020}/YTT301.py (100%) rename resources/test/fixtures/{ => flake8_2020}/YTT302.py (100%) rename resources/test/fixtures/{ => flake8_2020}/YTT303.py (100%) rename resources/test/fixtures/{ => flake8_bandit}/S101.py (100%) rename resources/test/fixtures/{ => flake8_bandit}/S102.py (100%) rename resources/test/fixtures/{ => flake8_bandit}/S104.py (100%) rename resources/test/fixtures/{ => flake8_bandit}/S105.py (100%) rename resources/test/fixtures/{ => flake8_bandit}/S106.py (100%) rename resources/test/fixtures/{ => flake8_bandit}/S107.py (100%) rename resources/test/fixtures/{ => flake8_blind_except}/BLE.py (100%) rename resources/test/fixtures/{ => flake8_boolean_trap}/FBT.py (100%) rename resources/test/fixtures/{ => flake8_bugbear}/B002.py (100%) rename resources/test/fixtures/{ => flake8_bugbear}/B003.py (100%) rename resources/test/fixtures/{ => flake8_bugbear}/B004.py (100%) rename resources/test/fixtures/{ => flake8_bugbear}/B005.py (100%) rename resources/test/fixtures/{ => flake8_bugbear}/B006_B008.py (100%) rename resources/test/fixtures/{ => flake8_bugbear}/B007.py (100%) rename resources/test/fixtures/{ => flake8_bugbear}/B008_extended.py (100%) rename resources/test/fixtures/{ => flake8_bugbear}/B009_B010.py (100%) rename resources/test/fixtures/{ => flake8_bugbear}/B011.py (100%) rename resources/test/fixtures/{ => flake8_bugbear}/B012.py (100%) rename resources/test/fixtures/{ => flake8_bugbear}/B013.py (100%) rename resources/test/fixtures/{ => flake8_bugbear}/B014.py (100%) rename resources/test/fixtures/{ => flake8_bugbear}/B015.py (100%) rename resources/test/fixtures/{ => flake8_bugbear}/B016.py (100%) rename resources/test/fixtures/{ => flake8_bugbear}/B017.py (100%) rename resources/test/fixtures/{ => flake8_bugbear}/B018.py (100%) rename resources/test/fixtures/{ => flake8_bugbear}/B019.py (100%) rename resources/test/fixtures/{ => flake8_bugbear}/B020.py (100%) rename resources/test/fixtures/{ => flake8_bugbear}/B021.py (100%) rename resources/test/fixtures/{ => flake8_bugbear}/B022.py (100%) rename resources/test/fixtures/{ => flake8_bugbear}/B023.py (100%) rename resources/test/fixtures/{ => flake8_bugbear}/B024.py (100%) rename resources/test/fixtures/{ => flake8_bugbear}/B025.py (100%) rename resources/test/fixtures/{ => flake8_bugbear}/B026.py (100%) rename resources/test/fixtures/{ => flake8_bugbear}/B027.py (100%) rename resources/test/fixtures/{ => flake8_bugbear}/B904.py (100%) rename resources/test/fixtures/{ => flake8_builtins}/A001.py (100%) rename resources/test/fixtures/{ => flake8_builtins}/A002.py (100%) rename resources/test/fixtures/{ => flake8_builtins}/A003.py (100%) rename resources/test/fixtures/{ => flake8_comprehensions}/C400.py (100%) rename resources/test/fixtures/{ => flake8_comprehensions}/C401.py (100%) rename resources/test/fixtures/{ => flake8_comprehensions}/C402.py (100%) rename resources/test/fixtures/{ => flake8_comprehensions}/C403.py (100%) rename resources/test/fixtures/{ => flake8_comprehensions}/C404.py (100%) rename resources/test/fixtures/{ => flake8_comprehensions}/C405.py (100%) rename resources/test/fixtures/{ => flake8_comprehensions}/C406.py (100%) rename resources/test/fixtures/{ => flake8_comprehensions}/C408.py (100%) rename resources/test/fixtures/{ => flake8_comprehensions}/C409.py (100%) rename resources/test/fixtures/{ => flake8_comprehensions}/C410.py (100%) rename resources/test/fixtures/{ => flake8_comprehensions}/C411.py (100%) rename resources/test/fixtures/{ => flake8_comprehensions}/C413.py (100%) rename resources/test/fixtures/{ => flake8_comprehensions}/C414.py (100%) rename resources/test/fixtures/{ => flake8_comprehensions}/C415.py (100%) rename resources/test/fixtures/{ => flake8_comprehensions}/C416.py (100%) rename resources/test/fixtures/{ => flake8_comprehensions}/C417.py (100%) rename resources/test/fixtures/{ => flake8_print}/T100.py (100%) rename resources/test/fixtures/{ => flake8_print}/T201.py (100%) rename resources/test/fixtures/{ => flake8_print}/T203.py (100%) rename resources/test/fixtures/{ => flake8_tidy_imports}/I252.py (100%) rename resources/test/fixtures/{ => mccabe}/C901.py (100%) rename resources/test/fixtures/{ => pep8_naming}/N801.py (100%) rename resources/test/fixtures/{ => pep8_naming}/N802.py (100%) rename resources/test/fixtures/{ => pep8_naming}/N803.py (100%) rename resources/test/fixtures/{ => pep8_naming}/N804.py (100%) rename resources/test/fixtures/{ => pep8_naming}/N805.py (100%) rename resources/test/fixtures/{ => pep8_naming}/N806.py (100%) rename resources/test/fixtures/{ => pep8_naming}/N807.py (100%) rename resources/test/fixtures/{ => pep8_naming}/N811.py (100%) rename resources/test/fixtures/{ => pep8_naming}/N812.py (100%) rename resources/test/fixtures/{ => pep8_naming}/N813.py (100%) rename resources/test/fixtures/{ => pep8_naming}/N814.py (100%) rename resources/test/fixtures/{ => pep8_naming}/N815.py (100%) rename resources/test/fixtures/{ => pep8_naming}/N816.py (100%) rename resources/test/fixtures/{ => pep8_naming}/N817.py (100%) rename resources/test/fixtures/{ => pep8_naming}/N818.py (100%) rename resources/test/fixtures/{ => pycodestyle}/E402.py (100%) rename resources/test/fixtures/{ => pycodestyle}/E501.py (100%) rename resources/test/fixtures/{ => pycodestyle}/E711.py (100%) rename resources/test/fixtures/{ => pycodestyle}/E712.py (100%) rename resources/test/fixtures/{ => pycodestyle}/E713.py (100%) rename resources/test/fixtures/{ => pycodestyle}/E714.py (100%) rename resources/test/fixtures/{ => pycodestyle}/E721.py (100%) rename resources/test/fixtures/{ => pycodestyle}/E722.py (100%) rename resources/test/fixtures/{ => pycodestyle}/E731.py (100%) rename resources/test/fixtures/{ => pycodestyle}/E741.py (100%) rename resources/test/fixtures/{ => pycodestyle}/E742.py (100%) rename resources/test/fixtures/{ => pycodestyle}/E743.py (100%) rename resources/test/fixtures/{ => pycodestyle}/E999.py (100%) rename resources/test/fixtures/{ => pycodestyle}/W292_0.py (100%) rename resources/test/fixtures/{ => pycodestyle}/W292_1.py (100%) rename resources/test/fixtures/{ => pycodestyle}/W292_2.py (100%) rename resources/test/fixtures/{ => pycodestyle}/W605_0.py (100%) rename resources/test/fixtures/{ => pycodestyle}/W605_1.py (100%) rename resources/test/fixtures/{ => pydocstyle}/D.py (100%) rename resources/test/fixtures/{ => pydocstyle}/canonical_google_examples.py (100%) rename resources/test/fixtures/{ => pydocstyle}/canonical_numpy_examples.py (100%) rename resources/test/fixtures/{ => pydocstyle}/sections.py (100%) rename resources/test/fixtures/{ => pyflakes}/F401_0.py (100%) rename resources/test/fixtures/{ => pyflakes}/F401_1.py (100%) rename resources/test/fixtures/{ => pyflakes}/F401_2.py (100%) rename resources/test/fixtures/{ => pyflakes}/F401_3.py (100%) rename resources/test/fixtures/{ => pyflakes}/F401_4.py (100%) rename resources/test/fixtures/{ => pyflakes}/F401_5.py (100%) rename resources/test/fixtures/{ => pyflakes}/F401_6.py (100%) rename resources/test/fixtures/{ => pyflakes}/F402.py (100%) rename resources/test/fixtures/{ => pyflakes}/F403.py (100%) rename resources/test/fixtures/{ => pyflakes}/F404.py (100%) rename resources/test/fixtures/{ => pyflakes}/F405.py (100%) rename resources/test/fixtures/{ => pyflakes}/F406.py (100%) rename resources/test/fixtures/{ => pyflakes}/F407.py (100%) rename resources/test/fixtures/{ => pyflakes}/F502.py (100%) rename resources/test/fixtures/{ => pyflakes}/F503.py (100%) rename resources/test/fixtures/{ => pyflakes}/F504.py (100%) rename resources/test/fixtures/{ => pyflakes}/F50x.py (100%) rename resources/test/fixtures/{ => pyflakes}/F521.py (100%) rename resources/test/fixtures/{ => pyflakes}/F522.py (100%) rename resources/test/fixtures/{ => pyflakes}/F523.py (100%) rename resources/test/fixtures/{ => pyflakes}/F524.py (100%) rename resources/test/fixtures/{ => pyflakes}/F525.py (100%) rename resources/test/fixtures/{ => pyflakes}/F541.py (100%) rename resources/test/fixtures/{ => pyflakes}/F601.py (100%) rename resources/test/fixtures/{ => pyflakes}/F602.py (100%) rename resources/test/fixtures/{ => pyflakes}/F622.py (100%) rename resources/test/fixtures/{ => pyflakes}/F631.py (100%) rename resources/test/fixtures/{ => pyflakes}/F632.py (100%) rename resources/test/fixtures/{ => pyflakes}/F633.py (100%) rename resources/test/fixtures/{ => pyflakes}/F634.py (100%) rename resources/test/fixtures/{ => pyflakes}/F701.py (100%) rename resources/test/fixtures/{ => pyflakes}/F702.py (100%) rename resources/test/fixtures/{ => pyflakes}/F704.py (100%) rename resources/test/fixtures/{ => pyflakes}/F706.py (100%) rename resources/test/fixtures/{ => pyflakes}/F707.py (100%) rename resources/test/fixtures/{ => pyflakes}/F722.py (100%) rename resources/test/fixtures/{ => pyflakes}/F821_0.py (100%) rename resources/test/fixtures/{ => pyflakes}/F821_1.py (100%) rename resources/test/fixtures/{ => pyflakes}/F821_2.py (100%) rename resources/test/fixtures/{ => pyflakes}/F821_3.py (100%) rename resources/test/fixtures/{ => pyflakes}/F821_4.py (100%) rename resources/test/fixtures/{ => pyflakes}/F821_5.py (100%) rename resources/test/fixtures/{ => pyflakes}/F822.py (100%) rename resources/test/fixtures/{ => pyflakes}/F823.py (100%) rename resources/test/fixtures/{ => pyflakes}/F831.py (100%) rename resources/test/fixtures/{ => pyflakes}/F841.py (100%) rename resources/test/fixtures/{ => pyflakes}/F901.py (100%) rename resources/test/fixtures/{ => pyflakes}/__init__.py (100%) rename resources/test/fixtures/{ => pyflakes}/future_annotations.py (100%) rename resources/test/fixtures/{ => pyupgrade}/U001.py (100%) rename resources/test/fixtures/{ => pyupgrade}/U003.py (100%) rename resources/test/fixtures/{ => pyupgrade}/U004.py (100%) rename resources/test/fixtures/{ => pyupgrade}/U005.py (100%) rename resources/test/fixtures/{ => pyupgrade}/U006.py (100%) rename resources/test/fixtures/{ => pyupgrade}/U007.py (100%) rename resources/test/fixtures/{ => pyupgrade}/U008.py (100%) rename resources/test/fixtures/{ => pyupgrade}/U009_0.py (100%) rename resources/test/fixtures/{ => pyupgrade}/U009_1.py (100%) rename resources/test/fixtures/{ => pyupgrade}/U009_2.py (100%) rename resources/test/fixtures/{ => pyupgrade}/U009_3.py (100%) rename resources/test/fixtures/{ => pyupgrade}/U009_4.py (100%) rename resources/test/fixtures/{ => pyupgrade}/U010.py (100%) rename resources/test/fixtures/{ => pyupgrade}/U011_0.py (100%) rename resources/test/fixtures/{ => pyupgrade}/U011_1.py (100%) rename resources/test/fixtures/{ => pyupgrade}/U012.py (100%) rename resources/test/fixtures/{ => pyupgrade}/U013.py (100%) rename resources/test/fixtures/{ => pyupgrade}/U014.py (100%) rename resources/test/fixtures/{ => pyupgrade}/U015.py (100%) create mode 100644 resources/test/fixtures/pyupgrade/future_annotations.py rename resources/test/fixtures/{ => ruff}/M001.py (100%) rename resources/test/fixtures/{ => ruff}/RUF001.py (100%) rename resources/test/fixtures/{ => ruff}/RUF002.py (100%) rename resources/test/fixtures/{ => ruff}/RUF003.py (100%) rename resources/test/fixtures/{ => ruff}/RUF101_0.py (100%) rename resources/test/fixtures/{ => ruff}/RUF101_1.py (100%) rename resources/test/fixtures/{ => ruff}/RUF101_2.py (100%) rename resources/test/fixtures/{ => ruff}/RUF101_3.py (100%) rename resources/test/fixtures/{ => ruff}/RUF101_4.py (100%) rename resources/test/fixtures/{ => ruff}/RUF101_5.py (100%) rename resources/test/fixtures/{ => ruff}/RUF101_6.py (100%) rename src/{snapshots/ruff__linter__tests__ERA001_ERA001.py.snap => eradicate/snapshots/ruff__eradicate__tests__ERA001_ERA001.py.snap} (97%) rename src/{snapshots/ruff__linter__tests__YTT101_YTT101.py.snap => flake8_2020/snapshots/ruff__flake8_2020__tests__YTT101_YTT101.py.snap} (92%) rename src/{snapshots/ruff__linter__tests__YTT102_YTT102.py.snap => flake8_2020/snapshots/ruff__flake8_2020__tests__YTT102_YTT102.py.snap} (89%) rename src/{snapshots/ruff__linter__tests__YTT103_YTT103.py.snap => flake8_2020/snapshots/ruff__flake8_2020__tests__YTT103_YTT103.py.snap} (95%) rename src/{snapshots/ruff__linter__tests__YTT201_YTT201.py.snap => flake8_2020/snapshots/ruff__flake8_2020__tests__YTT201_YTT201.py.snap} (94%) rename src/{snapshots/ruff__linter__tests__YTT202_YTT202.py.snap => flake8_2020/snapshots/ruff__flake8_2020__tests__YTT202_YTT202.py.snap} (89%) rename src/{snapshots/ruff__linter__tests__YTT203_YTT203.py.snap => flake8_2020/snapshots/ruff__flake8_2020__tests__YTT203_YTT203.py.snap} (89%) rename src/{snapshots/ruff__linter__tests__YTT204_YTT204.py.snap => flake8_2020/snapshots/ruff__flake8_2020__tests__YTT204_YTT204.py.snap} (89%) rename src/{snapshots/ruff__linter__tests__YTT301_YTT301.py.snap => flake8_2020/snapshots/ruff__flake8_2020__tests__YTT301_YTT301.py.snap} (89%) rename src/{snapshots/ruff__linter__tests__YTT302_YTT302.py.snap => flake8_2020/snapshots/ruff__flake8_2020__tests__YTT302_YTT302.py.snap} (95%) rename src/{snapshots/ruff__linter__tests__YTT303_YTT303.py.snap => flake8_2020/snapshots/ruff__flake8_2020__tests__YTT303_YTT303.py.snap} (89%) rename src/{snapshots/ruff__linter__tests__S101_S101.py.snap => flake8_bandit/snapshots/ruff__flake8_bandit__tests__S101_S101.py.snap} (91%) rename src/{snapshots/ruff__linter__tests__S102_S102.py.snap => flake8_bandit/snapshots/ruff__flake8_bandit__tests__S102_S102.py.snap} (87%) rename src/{snapshots/ruff__linter__tests__S104_S104.py.snap => flake8_bandit/snapshots/ruff__flake8_bandit__tests__S104_S104.py.snap} (94%) rename src/{snapshots/ruff__linter__tests__S105_S105.py.snap => flake8_bandit/snapshots/ruff__flake8_bandit__tests__S105_S105.py.snap} (99%) rename src/{snapshots/ruff__linter__tests__S106_S106.py.snap => flake8_bandit/snapshots/ruff__flake8_bandit__tests__S106_S106.py.snap} (83%) rename src/{snapshots/ruff__linter__tests__S107_S107.py.snap => flake8_bandit/snapshots/ruff__flake8_bandit__tests__S107_S107.py.snap} (95%) rename src/{snapshots/ruff__linter__tests__BLE001_BLE.py.snap => flake8_blind_except/snapshots/ruff__flake8_blind_except__tests__BLE001_BLE.py.snap} (96%) rename src/{snapshots/ruff__linter__tests__FBT001_FBT.py.snap => flake8_boolean_trap/snapshots/ruff__flake8_boolean_trap__tests__FBT001_FBT.py.snap} (96%) rename src/{snapshots/ruff__linter__tests__FBT002_FBT.py.snap => flake8_boolean_trap/snapshots/ruff__flake8_boolean_trap__tests__FBT002_FBT.py.snap} (93%) rename src/{snapshots/ruff__linter__tests__FBT003_FBT.py.snap => flake8_boolean_trap/snapshots/ruff__flake8_boolean_trap__tests__FBT003_FBT.py.snap} (91%) rename src/{snapshots/ruff__linter__tests__B002_B002.py.snap => flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B002_B002.py.snap} (88%) rename src/{snapshots/ruff__linter__tests__B003_B003.py.snap => flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B003_B003.py.snap} (81%) rename src/{snapshots/ruff__linter__tests__B004_B004.py.snap => flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B004_B004.py.snap} (88%) rename src/{snapshots/ruff__linter__tests__B005_B005.py.snap => flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B005_B005.py.snap} (95%) rename src/{snapshots/ruff__linter__tests__B006_B006_B008.py.snap => flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B006_B006_B008.py.snap} (98%) rename src/{snapshots/ruff__linter__tests__B007_B007.py.snap => flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B007_B007.py.snap} (96%) rename src/{snapshots/ruff__linter__tests__B008_B006_B008.py.snap => flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B008_B006_B008.py.snap} (98%) rename src/{snapshots/ruff__linter__tests__B009_B009_B010.py.snap => flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B009_B009_B010.py.snap} (97%) rename src/{snapshots/ruff__linter__tests__B010_B009_B010.py.snap => flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B010_B009_B010.py.snap} (97%) rename src/{snapshots/ruff__linter__tests__B011_B011.py.snap => flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B011_B011.py.snap} (94%) rename src/{snapshots/ruff__linter__tests__B012_B012.py.snap => flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B012_B012.py.snap} (97%) rename src/{snapshots/ruff__linter__tests__B013_B013.py.snap => flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B013_B013.py.snap} (90%) rename src/{snapshots/ruff__linter__tests__B014_B014.py.snap => flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B014_B014.py.snap} (96%) rename src/{snapshots/ruff__linter__tests__B015_B015.py.snap => flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B015_B015.py.snap} (93%) rename src/{snapshots/ruff__linter__tests__B016_B016.py.snap => flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B016_B016.py.snap} (91%) rename src/{snapshots/ruff__linter__tests__B017_B017.py.snap => flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B017_B017.py.snap} (81%) rename src/{snapshots/ruff__linter__tests__B018_B018.py.snap => flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B018_B018.py.snap} (98%) rename src/{snapshots/ruff__linter__tests__B019_B019.py.snap => flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B019_B019.py.snap} (96%) rename src/{snapshots/ruff__linter__tests__B020_B020.py.snap => flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B020_B020.py.snap} (92%) rename src/{snapshots/ruff__linter__tests__B021_B021.py.snap => flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B021_B021.py.snap} (97%) rename src/{snapshots/ruff__linter__tests__B022_B022.py.snap => flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B022_B022.py.snap} (88%) rename src/{snapshots/ruff__linter__tests__B023_B023.py.snap => flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B023_B023.py.snap} (98%) rename src/{snapshots/ruff__linter__tests__B024_B024.py.snap => flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B024_B024.py.snap} (96%) rename src/{snapshots/ruff__linter__tests__B025_B025.py.snap => flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B025_B025.py.snap} (94%) rename src/{snapshots/ruff__linter__tests__B026_B026.py.snap => flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B026_B026.py.snap} (96%) rename src/{snapshots/ruff__linter__tests__B027_B027.py.snap => flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B027_B027.py.snap} (94%) rename src/{snapshots/ruff__linter__tests__B904_B904.py.snap => flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B904_B904.py.snap} (92%) rename src/{snapshots/ruff__linter__tests__A001_A001.py.snap => flake8_builtins/snapshots/ruff__flake8_builtins__tests__A001_A001.py.snap} (98%) rename src/{snapshots/ruff__linter__tests__A002_A002.py.snap => flake8_builtins/snapshots/ruff__flake8_builtins__tests__A002_A002.py.snap} (96%) rename src/{snapshots/ruff__linter__tests__A003_A003.py.snap => flake8_builtins/snapshots/ruff__flake8_builtins__tests__A003_A003.py.snap} (89%) rename src/{snapshots/ruff__linter__tests__C400_C400.py.snap => flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C400_C400.py.snap} (93%) rename src/{snapshots/ruff__linter__tests__C401_C401.py.snap => flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C401_C401.py.snap} (93%) rename src/{snapshots/ruff__linter__tests__C402_C402.py.snap => flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C402_C402.py.snap} (93%) rename src/{snapshots/ruff__linter__tests__C403_C403.py.snap => flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C403_C403.py.snap} (93%) rename src/{snapshots/ruff__linter__tests__C404_C404.py.snap => flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C404_C404.py.snap} (88%) rename src/{snapshots/ruff__linter__tests__C405_C405.py.snap => flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C405_C405.py.snap} (96%) rename src/{snapshots/ruff__linter__tests__C406_C406.py.snap => flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C406_C406.py.snap} (96%) rename src/{snapshots/ruff__linter__tests__C408_C408.py.snap => flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C408_C408.py.snap} (96%) rename src/{snapshots/ruff__linter__tests__C409_C409.py.snap => flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C409_C409.py.snap} (97%) rename src/{snapshots/ruff__linter__tests__C410_C410.py.snap => flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C410_C410.py.snap} (96%) rename src/{snapshots/ruff__linter__tests__C411_C411.py.snap => flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C411_C411.py.snap} (87%) rename src/{snapshots/ruff__linter__tests__C413_C413.py.snap => flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C413_C413.py.snap} (96%) rename src/{snapshots/ruff__linter__tests__C414_C414.py.snap => flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C414_C414.py.snap} (98%) rename src/{snapshots/ruff__linter__tests__C415_C415.py.snap => flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C415_C415.py.snap} (93%) rename src/{snapshots/ruff__linter__tests__C416_C416.py.snap => flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C416_C416.py.snap} (93%) rename src/{snapshots/ruff__linter__tests__C417_C417.py.snap => flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C417_C417.py.snap} (96%) rename src/{snapshots/ruff__linter__tests__T100_T100.py.snap => flake8_print/snapshots/ruff__flake8_print__tests__T100_T100.py.snap} (97%) rename src/{snapshots/ruff__linter__tests__T201_T201.py.snap => flake8_print/snapshots/ruff__flake8_print__tests__T201_T201.py.snap} (89%) rename src/{snapshots/ruff__linter__tests__T203_T203.py.snap => flake8_print/snapshots/ruff__flake8_print__tests__T203_T203.py.snap} (94%) rename src/{snapshots/ruff__linter__tests__N801_N801.py.snap => pep8_naming/snapshots/ruff__pep8_naming__tests__N801_N801.py.snap} (95%) rename src/{snapshots/ruff__linter__tests__N802_N802.py.snap => pep8_naming/snapshots/ruff__pep8_naming__tests__N802_N802.py.snap} (95%) rename src/{snapshots/ruff__linter__tests__N803_N803.py.snap => pep8_naming/snapshots/ruff__pep8_naming__tests__N803_N803.py.snap} (89%) rename src/{snapshots/ruff__linter__tests__N804_N804.py.snap => pep8_naming/snapshots/ruff__pep8_naming__tests__N804_N804.py.snap} (93%) rename src/{snapshots/ruff__linter__tests__N805_N805.py.snap => pep8_naming/snapshots/ruff__pep8_naming__tests__N805_N805.py.snap} (94%) rename src/{snapshots/ruff__linter__tests__N806_N806.py.snap => pep8_naming/snapshots/ruff__pep8_naming__tests__N806_N806.py.snap} (90%) rename src/{snapshots/ruff__linter__tests__N807_N807.py.snap => pep8_naming/snapshots/ruff__pep8_naming__tests__N807_N807.py.snap} (89%) rename src/{snapshots/ruff__linter__tests__N811_N811.py.snap => pep8_naming/snapshots/ruff__pep8_naming__tests__N811_N811.py.snap} (94%) rename src/{snapshots/ruff__linter__tests__N812_N812.py.snap => pep8_naming/snapshots/ruff__pep8_naming__tests__N812_N812.py.snap} (94%) rename src/{snapshots/ruff__linter__tests__N813_N813.py.snap => pep8_naming/snapshots/ruff__pep8_naming__tests__N813_N813.py.snap} (94%) rename src/{snapshots/ruff__linter__tests__N814_N814.py.snap => pep8_naming/snapshots/ruff__pep8_naming__tests__N814_N814.py.snap} (94%) rename src/{snapshots/ruff__linter__tests__N815_N815.py.snap => pep8_naming/snapshots/ruff__pep8_naming__tests__N815_N815.py.snap} (93%) rename src/{snapshots/ruff__linter__tests__N816_N816.py.snap => pep8_naming/snapshots/ruff__pep8_naming__tests__N816_N816.py.snap} (93%) rename src/{snapshots/ruff__linter__tests__N817_N817.py.snap => pep8_naming/snapshots/ruff__pep8_naming__tests__N817_N817.py.snap} (91%) rename src/{snapshots/ruff__linter__tests__N818_N818.py.snap => pep8_naming/snapshots/ruff__pep8_naming__tests__N818_N818.py.snap} (90%) rename src/{snapshots/ruff__linter__tests__E402_E402.py.snap => pycodestyle/snapshots/ruff__pycodestyle__tests__E402_E402.py.snap} (83%) rename src/{snapshots/ruff__linter__tests__E501_E501.py.snap => pycodestyle/snapshots/ruff__pycodestyle__tests__E501_E501.py.snap} (94%) rename src/{snapshots/ruff__linter__tests__E711_E711.py.snap => pycodestyle/snapshots/ruff__pycodestyle__tests__E711_E711.py.snap} (98%) rename src/{snapshots/ruff__linter__tests__E712_E712.py.snap => pycodestyle/snapshots/ruff__pycodestyle__tests__E712_E712.py.snap} (99%) rename src/{snapshots/ruff__linter__tests__E713_E713.py.snap => pycodestyle/snapshots/ruff__pycodestyle__tests__E713_E713.py.snap} (97%) rename src/{snapshots/ruff__linter__tests__E714_E714.py.snap => pycodestyle/snapshots/ruff__pycodestyle__tests__E714_E714.py.snap} (95%) rename src/{snapshots/ruff__linter__tests__E721_E721.py.snap => pycodestyle/snapshots/ruff__pycodestyle__tests__E721_E721.py.snap} (98%) rename src/{snapshots/ruff__linter__tests__E722_E722.py.snap => pycodestyle/snapshots/ruff__pycodestyle__tests__E722_E722.py.snap} (92%) rename src/{snapshots/ruff__linter__tests__E731_E731.py.snap => pycodestyle/snapshots/ruff__pycodestyle__tests__E731_E731.py.snap} (96%) rename src/{snapshots/ruff__linter__tests__E741_E741.py.snap => pycodestyle/snapshots/ruff__pycodestyle__tests__E741_E741.py.snap} (99%) rename src/{snapshots/ruff__linter__tests__E742_E742.py.snap => pycodestyle/snapshots/ruff__pycodestyle__tests__E742_E742.py.snap} (92%) rename src/{snapshots/ruff__linter__tests__E743_E743.py.snap => pycodestyle/snapshots/ruff__pycodestyle__tests__E743_E743.py.snap} (92%) rename src/{snapshots/ruff__linter__tests__E999_E999.py.snap => pycodestyle/snapshots/ruff__pycodestyle__tests__E999_E999.py.snap} (83%) rename src/{snapshots/ruff__linter__tests__W292_W292_0.py.snap => pycodestyle/snapshots/ruff__pycodestyle__tests__W292_W292_0.py.snap} (82%) create mode 100644 src/pycodestyle/snapshots/ruff__pycodestyle__tests__W292_W292_1.py.snap create mode 100644 src/pycodestyle/snapshots/ruff__pycodestyle__tests__W292_W292_2.py.snap rename src/{snapshots/ruff__linter__tests__W605_W605_1.py.snap => pycodestyle/snapshots/ruff__pycodestyle__tests__W605_W605_0.py.snap} (94%) rename src/{snapshots/ruff__linter__tests__W605_W605_0.py.snap => pycodestyle/snapshots/ruff__pycodestyle__tests__W605_W605_1.py.snap} (94%) rename src/{snapshots/ruff__linter__tests__D100_D.py.snap => pydocstyle/snapshots/ruff__pydocstyle__tests__D100_D.py.snap} (81%) rename src/{snapshots/ruff__linter__tests__D101_D.py.snap => pydocstyle/snapshots/ruff__pydocstyle__tests__D101_D.py.snap} (82%) rename src/{snapshots/ruff__linter__tests__D102_D.py.snap => pydocstyle/snapshots/ruff__pydocstyle__tests__D102_D.py.snap} (92%) rename src/{snapshots/ruff__linter__tests__D103_D.py.snap => pydocstyle/snapshots/ruff__pydocstyle__tests__D103_D.py.snap} (82%) create mode 100644 src/pydocstyle/snapshots/ruff__pydocstyle__tests__D104_D.py.snap rename src/{snapshots/ruff__linter__tests__D105_D.py.snap => pydocstyle/snapshots/ruff__pydocstyle__tests__D105_D.py.snap} (82%) create mode 100644 src/pydocstyle/snapshots/ruff__pydocstyle__tests__D106_D.py.snap rename src/{snapshots/ruff__linter__tests__D107_D.py.snap => pydocstyle/snapshots/ruff__pydocstyle__tests__D107_D.py.snap} (89%) rename src/{snapshots/ruff__linter__tests__D201_D.py.snap => pydocstyle/snapshots/ruff__pydocstyle__tests__D201_D.py.snap} (97%) rename src/{snapshots/ruff__linter__tests__D202_D.py.snap => pydocstyle/snapshots/ruff__pydocstyle__tests__D202_D.py.snap} (97%) rename src/{snapshots/ruff__linter__tests__D203_D.py.snap => pydocstyle/snapshots/ruff__pydocstyle__tests__D203_D.py.snap} (96%) rename src/{snapshots/ruff__linter__tests__D204_D.py.snap => pydocstyle/snapshots/ruff__pydocstyle__tests__D204_D.py.snap} (94%) rename src/{snapshots/ruff__linter__tests__D205_D.py.snap => pydocstyle/snapshots/ruff__pydocstyle__tests__D205_D.py.snap} (94%) create mode 100644 src/pydocstyle/snapshots/ruff__pydocstyle__tests__D206_D.py.snap rename src/{snapshots/ruff__linter__tests__D207_D.py.snap => pydocstyle/snapshots/ruff__pydocstyle__tests__D207_D.py.snap} (95%) rename src/{snapshots/ruff__linter__tests__D208_D.py.snap => pydocstyle/snapshots/ruff__pydocstyle__tests__D208_D.py.snap} (96%) rename src/{snapshots/ruff__linter__tests__D209_D.py.snap => pydocstyle/snapshots/ruff__pydocstyle__tests__D209_D.py.snap} (90%) rename src/{snapshots/ruff__linter__tests__D210_D.py.snap => pydocstyle/snapshots/ruff__pydocstyle__tests__D210_D.py.snap} (96%) rename src/{snapshots/ruff__linter__tests__D211_D.py.snap => pydocstyle/snapshots/ruff__pydocstyle__tests__D211_D.py.snap} (94%) rename src/{snapshots/ruff__linter__tests__D212_D.py.snap => pydocstyle/snapshots/ruff__pydocstyle__tests__D212_D.py.snap} (83%) rename src/{snapshots/ruff__linter__tests__D213_D.py.snap => pydocstyle/snapshots/ruff__pydocstyle__tests__D213_D.py.snap} (98%) rename src/{snapshots/ruff__linter__tests__D214_sections.py.snap => pydocstyle/snapshots/ruff__pydocstyle__tests__D214_sections.py.snap} (90%) rename src/{snapshots/ruff__linter__tests__D215_sections.py.snap => pydocstyle/snapshots/ruff__pydocstyle__tests__D215_sections.py.snap} (95%) rename src/{snapshots/ruff__linter__tests__D300_D.py.snap => pydocstyle/snapshots/ruff__pydocstyle__tests__D300_D.py.snap} (95%) rename src/{snapshots/ruff__linter__tests__D400_D.py.snap => pydocstyle/snapshots/ruff__pydocstyle__tests__D400_D.py.snap} (98%) rename src/{snapshots/ruff__linter__tests__D402_D.py.snap => pydocstyle/snapshots/ruff__pydocstyle__tests__D402_D.py.snap} (82%) create mode 100644 src/pydocstyle/snapshots/ruff__pydocstyle__tests__D403_D.py.snap create mode 100644 src/pydocstyle/snapshots/ruff__pydocstyle__tests__D404_D.py.snap rename src/{snapshots/ruff__linter__tests__D405_sections.py.snap => pydocstyle/snapshots/ruff__pydocstyle__tests__D405_sections.py.snap} (95%) rename src/{snapshots/ruff__linter__tests__D406_sections.py.snap => pydocstyle/snapshots/ruff__pydocstyle__tests__D406_sections.py.snap} (97%) rename src/{snapshots/ruff__linter__tests__D407_sections.py.snap => pydocstyle/snapshots/ruff__pydocstyle__tests__D407_sections.py.snap} (99%) rename src/{snapshots/ruff__linter__tests__D408_sections.py.snap => pydocstyle/snapshots/ruff__pydocstyle__tests__D408_sections.py.snap} (90%) rename src/{snapshots/ruff__linter__tests__D409_sections.py.snap => pydocstyle/snapshots/ruff__pydocstyle__tests__D409_sections.py.snap} (95%) rename src/{snapshots/ruff__linter__tests__D410_sections.py.snap => pydocstyle/snapshots/ruff__pydocstyle__tests__D410_sections.py.snap} (94%) rename src/{snapshots/ruff__linter__tests__D411_sections.py.snap => pydocstyle/snapshots/ruff__pydocstyle__tests__D411_sections.py.snap} (96%) rename src/{snapshots/ruff__linter__tests__D412_sections.py.snap => pydocstyle/snapshots/ruff__pydocstyle__tests__D412_sections.py.snap} (91%) create mode 100644 src/pydocstyle/snapshots/ruff__pydocstyle__tests__D413_sections.py.snap rename src/{snapshots/ruff__linter__tests__D414_sections.py.snap => pydocstyle/snapshots/ruff__pydocstyle__tests__D414_sections.py.snap} (95%) rename src/{snapshots/ruff__linter__tests__D415_D.py.snap => pydocstyle/snapshots/ruff__pydocstyle__tests__D415_D.py.snap} (97%) create mode 100644 src/pydocstyle/snapshots/ruff__pydocstyle__tests__D416_D.py.snap create mode 100644 src/pydocstyle/snapshots/ruff__pydocstyle__tests__D417_canonical_google_examples.py.snap create mode 100644 src/pydocstyle/snapshots/ruff__pydocstyle__tests__D417_canonical_numpy_examples.py.snap rename src/{snapshots/ruff__linter__tests__D417_sections.py.snap => pydocstyle/snapshots/ruff__pydocstyle__tests__D417_sections.py.snap} (98%) rename src/{snapshots/ruff__linter__tests__D418_D.py.snap => pydocstyle/snapshots/ruff__pydocstyle__tests__D418_D.py.snap} (92%) rename src/{snapshots/ruff__linter__tests__D419_D.py.snap => pydocstyle/snapshots/ruff__pydocstyle__tests__D419_D.py.snap} (92%) rename src/{snapshots/ruff__linter__tests__F401_F401_0.py.snap => pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_0.py.snap} (98%) rename src/{snapshots/ruff__linter__tests__D206_D.py.snap => pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_1.py.snap} (52%) rename src/{snapshots/ruff__linter__tests__D403_D.py.snap => pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_2.py.snap} (52%) create mode 100644 src/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_3.py.snap create mode 100644 src/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_4.py.snap rename src/{snapshots/ruff__linter__tests__F401_F401_5.py.snap => pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_5.py.snap} (97%) rename src/{snapshots/ruff__linter__tests__F401_F401_6.py.snap => pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_6.py.snap} (97%) rename src/{snapshots/ruff__linter__tests__F402_F402.py.snap => pyflakes/snapshots/ruff__pyflakes__tests__F402_F402.py.snap} (91%) rename src/{snapshots/ruff__linter__tests__F403_F403.py.snap => pyflakes/snapshots/ruff__pyflakes__tests__F403_F403.py.snap} (90%) rename src/{snapshots/ruff__linter__tests__F404_F404.py.snap => pyflakes/snapshots/ruff__pyflakes__tests__F404_F404.py.snap} (83%) rename src/{snapshots/ruff__linter__tests__F405_F405.py.snap => pyflakes/snapshots/ruff__pyflakes__tests__F405_F405.py.snap} (92%) rename src/{snapshots/ruff__linter__tests__F406_F406.py.snap => pyflakes/snapshots/ruff__pyflakes__tests__F406_F406.py.snap} (91%) rename src/{snapshots/ruff__linter__tests__F407_F407.py.snap => pyflakes/snapshots/ruff__pyflakes__tests__F407_F407.py.snap} (86%) rename src/{snapshots/ruff__linter__tests__F501_F50x.py.snap => pyflakes/snapshots/ruff__pyflakes__tests__F501_F50x.py.snap} (86%) rename src/{snapshots/ruff__linter__tests__F502_F502.py.snap => pyflakes/snapshots/ruff__pyflakes__tests__F502_F502.py.snap} (97%) rename src/{snapshots/ruff__linter__tests__F502_F50x.py.snap => pyflakes/snapshots/ruff__pyflakes__tests__F502_F50x.py.snap} (84%) rename src/{snapshots/ruff__linter__tests__F503_F503.py.snap => pyflakes/snapshots/ruff__pyflakes__tests__F503_F503.py.snap} (93%) rename src/{snapshots/ruff__linter__tests__F503_F50x.py.snap => pyflakes/snapshots/ruff__pyflakes__tests__F503_F50x.py.snap} (84%) rename src/{snapshots/ruff__linter__tests__F504_F504.py.snap => pyflakes/snapshots/ruff__pyflakes__tests__F504_F504.py.snap} (86%) rename src/{snapshots/ruff__linter__tests__F504_F50x.py.snap => pyflakes/snapshots/ruff__pyflakes__tests__F504_F50x.py.snap} (86%) create mode 100644 src/pyflakes/snapshots/ruff__pyflakes__tests__F505_F504.py.snap rename src/{snapshots/ruff__linter__tests__F505_F50x.py.snap => pyflakes/snapshots/ruff__pyflakes__tests__F505_F50x.py.snap} (85%) rename src/{snapshots/ruff__linter__tests__F506_F50x.py.snap => pyflakes/snapshots/ruff__pyflakes__tests__F506_F50x.py.snap} (93%) rename src/{snapshots/ruff__linter__tests__F507_F50x.py.snap => pyflakes/snapshots/ruff__pyflakes__tests__F507_F50x.py.snap} (92%) rename src/{snapshots/ruff__linter__tests__F508_F50x.py.snap => pyflakes/snapshots/ruff__pyflakes__tests__F508_F50x.py.snap} (85%) rename src/{snapshots/ruff__linter__tests__F509_F50x.py.snap => pyflakes/snapshots/ruff__pyflakes__tests__F509_F50x.py.snap} (85%) rename src/{snapshots/ruff__linter__tests__F521_F521.py.snap => pyflakes/snapshots/ruff__pyflakes__tests__F521_F521.py.snap} (97%) rename src/{snapshots/ruff__linter__tests__F522_F522.py.snap => pyflakes/snapshots/ruff__pyflakes__tests__F522_F522.py.snap} (94%) rename src/{snapshots/ruff__linter__tests__F523_F523.py.snap => pyflakes/snapshots/ruff__pyflakes__tests__F523_F523.py.snap} (97%) rename src/{snapshots/ruff__linter__tests__F524_F524.py.snap => pyflakes/snapshots/ruff__pyflakes__tests__F524_F524.py.snap} (97%) rename src/{snapshots/ruff__linter__tests__F525_F525.py.snap => pyflakes/snapshots/ruff__pyflakes__tests__F525_F525.py.snap} (90%) rename src/{snapshots/ruff__linter__tests__F541_F541.py.snap => pyflakes/snapshots/ruff__pyflakes__tests__F541_F541.py.snap} (93%) rename src/{snapshots/ruff__linter__tests__F601_F601.py.snap => pyflakes/snapshots/ruff__pyflakes__tests__F601_F601.py.snap} (93%) rename src/{snapshots/ruff__linter__tests__F602_F602.py.snap => pyflakes/snapshots/ruff__pyflakes__tests__F602_F602.py.snap} (85%) rename src/{snapshots/ruff__linter__tests__F622_F622.py.snap => pyflakes/snapshots/ruff__pyflakes__tests__F622_F622.py.snap} (83%) rename src/{snapshots/ruff__linter__tests__F631_F631.py.snap => pyflakes/snapshots/ruff__pyflakes__tests__F631_F631.py.snap} (89%) rename src/{snapshots/ruff__linter__tests__F632_F632.py.snap => pyflakes/snapshots/ruff__pyflakes__tests__F632_F632.py.snap} (96%) rename src/{snapshots/ruff__linter__tests__F633_F633.py.snap => pyflakes/snapshots/ruff__pyflakes__tests__F633_F633.py.snap} (83%) rename src/{snapshots/ruff__linter__tests__F634_F634.py.snap => pyflakes/snapshots/ruff__pyflakes__tests__F634_F634.py.snap} (89%) rename src/{snapshots/ruff__linter__tests__F701_F701.py.snap => pyflakes/snapshots/ruff__pyflakes__tests__F701_F701.py.snap} (94%) rename src/{snapshots/ruff__linter__tests__F702_F702.py.snap => pyflakes/snapshots/ruff__pyflakes__tests__F702_F702.py.snap} (94%) rename src/{snapshots/ruff__linter__tests__F704_F704.py.snap => pyflakes/snapshots/ruff__pyflakes__tests__F704_F704.py.snap} (95%) rename src/{snapshots/ruff__linter__tests__F706_F706.py.snap => pyflakes/snapshots/ruff__pyflakes__tests__F706_F706.py.snap} (90%) rename src/{snapshots/ruff__linter__tests__F707_F707.py.snap => pyflakes/snapshots/ruff__pyflakes__tests__F707_F707.py.snap} (93%) rename src/{snapshots/ruff__linter__tests__F722_F722.py.snap => pyflakes/snapshots/ruff__pyflakes__tests__F722_F722.py.snap} (85%) rename src/{snapshots/ruff__linter__tests__F821_F821_0.py.snap => pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_0.py.snap} (98%) rename src/{snapshots/ruff__linter__tests__F821_F821_1.py.snap => pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_1.py.snap} (94%) rename src/{snapshots/ruff__linter__tests__F821_F821_2.py.snap => pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_2.py.snap} (84%) rename src/{snapshots/ruff__linter__tests__F821_F821_3.py.snap => pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_3.py.snap} (90%) rename src/{snapshots/ruff__linter__tests__F821_F821_4.py.snap => pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_4.py.snap} (95%) rename src/{snapshots/ruff__linter__tests__F821_F821_5.py.snap => pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_5.py.snap} (84%) rename src/{snapshots/ruff__linter__tests__F822_F822.py.snap => pyflakes/snapshots/ruff__pyflakes__tests__F822_F822.py.snap} (83%) rename src/{snapshots/ruff__linter__tests__F823_F823.py.snap => pyflakes/snapshots/ruff__pyflakes__tests__F823_F823.py.snap} (84%) rename src/{snapshots/ruff__linter__tests__F831_F831.py.snap => pyflakes/snapshots/ruff__pyflakes__tests__F831_F831.py.snap} (93%) rename src/{snapshots/ruff__linter__tests__F841_F841.py.snap => pyflakes/snapshots/ruff__pyflakes__tests__F841_F841.py.snap} (96%) rename src/{snapshots/ruff__linter__tests__F901_F901.py.snap => pyflakes/snapshots/ruff__pyflakes__tests__F901_F901.py.snap} (95%) rename src/{snapshots/ruff__linter__tests__f841_dummy_variable_rgx.snap => pyflakes/snapshots/ruff__pyflakes__tests__f841_dummy_variable_rgx.snap} (97%) rename src/{snapshots/ruff__linter__tests__future_annotations.snap => pyflakes/snapshots/ruff__pyflakes__tests__future_annotations.snap} (94%) create mode 100644 src/pyflakes/snapshots/ruff__pyflakes__tests__init.snap rename src/{snapshots/ruff__linter__tests__U001_U001.py.snap => pyupgrade/snapshots/ruff__pyupgrade__tests__U001_U001.py.snap} (94%) rename src/{snapshots/ruff__linter__tests__U003_U003.py.snap => pyupgrade/snapshots/ruff__pyupgrade__tests__U003_U003.py.snap} (97%) rename src/{snapshots/ruff__linter__tests__U004_U004.py.snap => pyupgrade/snapshots/ruff__pyupgrade__tests__U004_U004.py.snap} (99%) rename src/{snapshots/ruff__linter__tests__U005_U005.py.snap => pyupgrade/snapshots/ruff__pyupgrade__tests__U005_U005.py.snap} (97%) rename src/{snapshots/ruff__linter__tests__U006_U006.py.snap => pyupgrade/snapshots/ruff__pyupgrade__tests__U006_U006.py.snap} (97%) rename src/{snapshots/ruff__linter__tests__U007_U007.py.snap => pyupgrade/snapshots/ruff__pyupgrade__tests__U007_U007.py.snap} (98%) rename src/{snapshots/ruff__linter__tests__U008_U008.py.snap => pyupgrade/snapshots/ruff__pyupgrade__tests__U008_U008.py.snap} (97%) rename src/{snapshots/ruff__linter__tests__U009_U009_0.py.snap => pyupgrade/snapshots/ruff__pyupgrade__tests__U009_U009_0.py.snap} (90%) rename src/{snapshots/ruff__linter__tests__U009_U009_1.py.snap => pyupgrade/snapshots/ruff__pyupgrade__tests__U009_U009_1.py.snap} (90%) create mode 100644 src/pyupgrade/snapshots/ruff__pyupgrade__tests__U009_U009_2.py.snap create mode 100644 src/pyupgrade/snapshots/ruff__pyupgrade__tests__U009_U009_3.py.snap create mode 100644 src/pyupgrade/snapshots/ruff__pyupgrade__tests__U009_U009_4.py.snap rename src/{snapshots/ruff__linter__tests__U010_U010.py.snap => pyupgrade/snapshots/ruff__pyupgrade__tests__U010_U010.py.snap} (99%) rename src/{snapshots/ruff__linter__tests__U011_U011_0.py.snap => pyupgrade/snapshots/ruff__pyupgrade__tests__U011_U011_0.py.snap} (98%) create mode 100644 src/pyupgrade/snapshots/ruff__pyupgrade__tests__U011_U011_1.py.snap rename src/{snapshots/ruff__linter__tests__U012_U012.py.snap => pyupgrade/snapshots/ruff__pyupgrade__tests__U012_U012.py.snap} (99%) rename src/{snapshots/ruff__linter__tests__U013_U013.py.snap => pyupgrade/snapshots/ruff__pyupgrade__tests__U013_U013.py.snap} (99%) rename src/{snapshots/ruff__linter__tests__U014_U014.py.snap => pyupgrade/snapshots/ruff__pyupgrade__tests__U014_U014.py.snap} (97%) rename src/{snapshots/ruff__linter__tests__U015_U015.py.snap => pyupgrade/snapshots/ruff__pyupgrade__tests__U015_U015.py.snap} (99%) rename src/{snapshots/ruff__linter__tests__future_annotations_pep_585_p37.snap => pyupgrade/snapshots/ruff__pyupgrade__tests__future_annotations_pep_585_p37.snap} (90%) rename src/{snapshots/ruff__linter__tests__future_annotations_pep_585_py310.snap => pyupgrade/snapshots/ruff__pyupgrade__tests__future_annotations_pep_585_py310.snap} (95%) rename src/{snapshots/ruff__linter__tests__future_annotations_pep_604_p37.snap => pyupgrade/snapshots/ruff__pyupgrade__tests__future_annotations_pep_604_p37.snap} (90%) rename src/{snapshots/ruff__linter__tests__future_annotations_pep_604_py310.snap => pyupgrade/snapshots/ruff__pyupgrade__tests__future_annotations_pep_604_py310.snap} (90%) rename src/{snapshots/ruff__linter__tests__RUF001_RUF001.py.snap => rules/snapshots/ruff__rules__tests__RUF001_RUF001.py.snap} (92%) rename src/{snapshots/ruff__linter__tests__RUF002_RUF002.py.snap => rules/snapshots/ruff__rules__tests__RUF002_RUF002.py.snap} (92%) rename src/{snapshots/ruff__linter__tests__RUF003_RUF003.py.snap => rules/snapshots/ruff__rules__tests__RUF003_RUF003.py.snap} (92%) rename src/{snapshots/ruff__linter__tests__RUF101_RUF101_0.py.snap => rules/snapshots/ruff__rules__tests__RUF101_RUF101_0.py.snap} (91%) rename src/{snapshots/ruff__linter__tests__RUF101_RUF101_1.py.snap => rules/snapshots/ruff__rules__tests__RUF101_RUF101_1.py.snap} (95%) rename src/{snapshots/ruff__linter__tests__RUF101_RUF101_2.py.snap => rules/snapshots/ruff__rules__tests__RUF101_RUF101_2.py.snap} (95%) rename src/{snapshots/ruff__linter__tests__D104_D.py.snap => rules/snapshots/ruff__rules__tests__RUF101_RUF101_3.py.snap} (55%) rename src/{snapshots/ruff__linter__tests__RUF101_RUF101_4.py.snap => rules/snapshots/ruff__rules__tests__RUF101_RUF101_4.py.snap} (95%) rename src/{snapshots/ruff__linter__tests__D106_D.py.snap => rules/snapshots/ruff__rules__tests__RUF101_RUF101_5.py.snap} (55%) rename src/{snapshots/ruff__linter__tests__RUF101_RUF101_6.py.snap => rules/snapshots/ruff__rules__tests__RUF101_RUF101_6.py.snap} (85%) rename src/{snapshots/ruff__linter__tests__m001.snap => rules/snapshots/ruff__rules__tests__m001.snap} (99%) delete mode 100644 src/snapshots/ruff__linter__tests__D404_D.py.snap delete mode 100644 src/snapshots/ruff__linter__tests__D413_sections.py.snap delete mode 100644 src/snapshots/ruff__linter__tests__D416_D.py.snap delete mode 100644 src/snapshots/ruff__linter__tests__D417_canonical_google_examples.py.snap delete mode 100644 src/snapshots/ruff__linter__tests__D417_canonical_numpy_examples.py.snap delete mode 100644 src/snapshots/ruff__linter__tests__F401_F401_1.py.snap delete mode 100644 src/snapshots/ruff__linter__tests__F401_F401_2.py.snap delete mode 100644 src/snapshots/ruff__linter__tests__F401_F401_3.py.snap delete mode 100644 src/snapshots/ruff__linter__tests__F401_F401_4.py.snap delete mode 100644 src/snapshots/ruff__linter__tests__F505_F504.py.snap delete mode 100644 src/snapshots/ruff__linter__tests__RUF101_RUF101_3.py.snap delete mode 100644 src/snapshots/ruff__linter__tests__RUF101_RUF101_5.py.snap delete mode 100644 src/snapshots/ruff__linter__tests__U009_U009_2.py.snap delete mode 100644 src/snapshots/ruff__linter__tests__U009_U009_3.py.snap delete mode 100644 src/snapshots/ruff__linter__tests__U009_U009_4.py.snap delete mode 100644 src/snapshots/ruff__linter__tests__U011_U011_1.py.snap delete mode 100644 src/snapshots/ruff__linter__tests__W292_W292_1.py.snap delete mode 100644 src/snapshots/ruff__linter__tests__W292_W292_2.py.snap delete mode 100644 src/snapshots/ruff__linter__tests__init.snap diff --git a/resources/test/fixtures/ERA001.py b/resources/test/fixtures/eradicate/ERA001.py similarity index 100% rename from resources/test/fixtures/ERA001.py rename to resources/test/fixtures/eradicate/ERA001.py diff --git a/resources/test/fixtures/excluded_file.py b/resources/test/fixtures/filesystem/excluded_file.py similarity index 100% rename from resources/test/fixtures/excluded_file.py rename to resources/test/fixtures/filesystem/excluded_file.py diff --git a/resources/test/fixtures/with_excluded_directory/__init__.py b/resources/test/fixtures/filesystem/with_excluded_directory/__init__.py similarity index 100% rename from resources/test/fixtures/with_excluded_directory/__init__.py rename to resources/test/fixtures/filesystem/with_excluded_directory/__init__.py diff --git a/resources/test/fixtures/with_excluded_directory/migrations/__init__.py b/resources/test/fixtures/filesystem/with_excluded_directory/migrations/__init__.py similarity index 100% rename from resources/test/fixtures/with_excluded_directory/migrations/__init__.py rename to resources/test/fixtures/filesystem/with_excluded_directory/migrations/__init__.py diff --git a/resources/test/fixtures/with_excluded_directory/migrations/migration.py b/resources/test/fixtures/filesystem/with_excluded_directory/migrations/migration.py similarity index 100% rename from resources/test/fixtures/with_excluded_directory/migrations/migration.py rename to resources/test/fixtures/filesystem/with_excluded_directory/migrations/migration.py diff --git a/resources/test/fixtures/with_excluded_file/other_excluded_file.py b/resources/test/fixtures/filesystem/with_excluded_file/other_excluded_file.py similarity index 100% rename from resources/test/fixtures/with_excluded_file/other_excluded_file.py rename to resources/test/fixtures/filesystem/with_excluded_file/other_excluded_file.py diff --git a/resources/test/fixtures/YTT101.py b/resources/test/fixtures/flake8_2020/YTT101.py similarity index 100% rename from resources/test/fixtures/YTT101.py rename to resources/test/fixtures/flake8_2020/YTT101.py diff --git a/resources/test/fixtures/YTT102.py b/resources/test/fixtures/flake8_2020/YTT102.py similarity index 100% rename from resources/test/fixtures/YTT102.py rename to resources/test/fixtures/flake8_2020/YTT102.py diff --git a/resources/test/fixtures/YTT103.py b/resources/test/fixtures/flake8_2020/YTT103.py similarity index 100% rename from resources/test/fixtures/YTT103.py rename to resources/test/fixtures/flake8_2020/YTT103.py diff --git a/resources/test/fixtures/YTT201.py b/resources/test/fixtures/flake8_2020/YTT201.py similarity index 100% rename from resources/test/fixtures/YTT201.py rename to resources/test/fixtures/flake8_2020/YTT201.py diff --git a/resources/test/fixtures/YTT202.py b/resources/test/fixtures/flake8_2020/YTT202.py similarity index 100% rename from resources/test/fixtures/YTT202.py rename to resources/test/fixtures/flake8_2020/YTT202.py diff --git a/resources/test/fixtures/YTT203.py b/resources/test/fixtures/flake8_2020/YTT203.py similarity index 100% rename from resources/test/fixtures/YTT203.py rename to resources/test/fixtures/flake8_2020/YTT203.py diff --git a/resources/test/fixtures/YTT204.py b/resources/test/fixtures/flake8_2020/YTT204.py similarity index 100% rename from resources/test/fixtures/YTT204.py rename to resources/test/fixtures/flake8_2020/YTT204.py diff --git a/resources/test/fixtures/YTT301.py b/resources/test/fixtures/flake8_2020/YTT301.py similarity index 100% rename from resources/test/fixtures/YTT301.py rename to resources/test/fixtures/flake8_2020/YTT301.py diff --git a/resources/test/fixtures/YTT302.py b/resources/test/fixtures/flake8_2020/YTT302.py similarity index 100% rename from resources/test/fixtures/YTT302.py rename to resources/test/fixtures/flake8_2020/YTT302.py diff --git a/resources/test/fixtures/YTT303.py b/resources/test/fixtures/flake8_2020/YTT303.py similarity index 100% rename from resources/test/fixtures/YTT303.py rename to resources/test/fixtures/flake8_2020/YTT303.py diff --git a/resources/test/fixtures/S101.py b/resources/test/fixtures/flake8_bandit/S101.py similarity index 100% rename from resources/test/fixtures/S101.py rename to resources/test/fixtures/flake8_bandit/S101.py diff --git a/resources/test/fixtures/S102.py b/resources/test/fixtures/flake8_bandit/S102.py similarity index 100% rename from resources/test/fixtures/S102.py rename to resources/test/fixtures/flake8_bandit/S102.py diff --git a/resources/test/fixtures/S104.py b/resources/test/fixtures/flake8_bandit/S104.py similarity index 100% rename from resources/test/fixtures/S104.py rename to resources/test/fixtures/flake8_bandit/S104.py diff --git a/resources/test/fixtures/S105.py b/resources/test/fixtures/flake8_bandit/S105.py similarity index 100% rename from resources/test/fixtures/S105.py rename to resources/test/fixtures/flake8_bandit/S105.py diff --git a/resources/test/fixtures/S106.py b/resources/test/fixtures/flake8_bandit/S106.py similarity index 100% rename from resources/test/fixtures/S106.py rename to resources/test/fixtures/flake8_bandit/S106.py diff --git a/resources/test/fixtures/S107.py b/resources/test/fixtures/flake8_bandit/S107.py similarity index 100% rename from resources/test/fixtures/S107.py rename to resources/test/fixtures/flake8_bandit/S107.py diff --git a/resources/test/fixtures/BLE.py b/resources/test/fixtures/flake8_blind_except/BLE.py similarity index 100% rename from resources/test/fixtures/BLE.py rename to resources/test/fixtures/flake8_blind_except/BLE.py diff --git a/resources/test/fixtures/FBT.py b/resources/test/fixtures/flake8_boolean_trap/FBT.py similarity index 100% rename from resources/test/fixtures/FBT.py rename to resources/test/fixtures/flake8_boolean_trap/FBT.py diff --git a/resources/test/fixtures/B002.py b/resources/test/fixtures/flake8_bugbear/B002.py similarity index 100% rename from resources/test/fixtures/B002.py rename to resources/test/fixtures/flake8_bugbear/B002.py diff --git a/resources/test/fixtures/B003.py b/resources/test/fixtures/flake8_bugbear/B003.py similarity index 100% rename from resources/test/fixtures/B003.py rename to resources/test/fixtures/flake8_bugbear/B003.py diff --git a/resources/test/fixtures/B004.py b/resources/test/fixtures/flake8_bugbear/B004.py similarity index 100% rename from resources/test/fixtures/B004.py rename to resources/test/fixtures/flake8_bugbear/B004.py diff --git a/resources/test/fixtures/B005.py b/resources/test/fixtures/flake8_bugbear/B005.py similarity index 100% rename from resources/test/fixtures/B005.py rename to resources/test/fixtures/flake8_bugbear/B005.py diff --git a/resources/test/fixtures/B006_B008.py b/resources/test/fixtures/flake8_bugbear/B006_B008.py similarity index 100% rename from resources/test/fixtures/B006_B008.py rename to resources/test/fixtures/flake8_bugbear/B006_B008.py diff --git a/resources/test/fixtures/B007.py b/resources/test/fixtures/flake8_bugbear/B007.py similarity index 100% rename from resources/test/fixtures/B007.py rename to resources/test/fixtures/flake8_bugbear/B007.py diff --git a/resources/test/fixtures/B008_extended.py b/resources/test/fixtures/flake8_bugbear/B008_extended.py similarity index 100% rename from resources/test/fixtures/B008_extended.py rename to resources/test/fixtures/flake8_bugbear/B008_extended.py diff --git a/resources/test/fixtures/B009_B010.py b/resources/test/fixtures/flake8_bugbear/B009_B010.py similarity index 100% rename from resources/test/fixtures/B009_B010.py rename to resources/test/fixtures/flake8_bugbear/B009_B010.py diff --git a/resources/test/fixtures/B011.py b/resources/test/fixtures/flake8_bugbear/B011.py similarity index 100% rename from resources/test/fixtures/B011.py rename to resources/test/fixtures/flake8_bugbear/B011.py diff --git a/resources/test/fixtures/B012.py b/resources/test/fixtures/flake8_bugbear/B012.py similarity index 100% rename from resources/test/fixtures/B012.py rename to resources/test/fixtures/flake8_bugbear/B012.py diff --git a/resources/test/fixtures/B013.py b/resources/test/fixtures/flake8_bugbear/B013.py similarity index 100% rename from resources/test/fixtures/B013.py rename to resources/test/fixtures/flake8_bugbear/B013.py diff --git a/resources/test/fixtures/B014.py b/resources/test/fixtures/flake8_bugbear/B014.py similarity index 100% rename from resources/test/fixtures/B014.py rename to resources/test/fixtures/flake8_bugbear/B014.py diff --git a/resources/test/fixtures/B015.py b/resources/test/fixtures/flake8_bugbear/B015.py similarity index 100% rename from resources/test/fixtures/B015.py rename to resources/test/fixtures/flake8_bugbear/B015.py diff --git a/resources/test/fixtures/B016.py b/resources/test/fixtures/flake8_bugbear/B016.py similarity index 100% rename from resources/test/fixtures/B016.py rename to resources/test/fixtures/flake8_bugbear/B016.py diff --git a/resources/test/fixtures/B017.py b/resources/test/fixtures/flake8_bugbear/B017.py similarity index 100% rename from resources/test/fixtures/B017.py rename to resources/test/fixtures/flake8_bugbear/B017.py diff --git a/resources/test/fixtures/B018.py b/resources/test/fixtures/flake8_bugbear/B018.py similarity index 100% rename from resources/test/fixtures/B018.py rename to resources/test/fixtures/flake8_bugbear/B018.py diff --git a/resources/test/fixtures/B019.py b/resources/test/fixtures/flake8_bugbear/B019.py similarity index 100% rename from resources/test/fixtures/B019.py rename to resources/test/fixtures/flake8_bugbear/B019.py diff --git a/resources/test/fixtures/B020.py b/resources/test/fixtures/flake8_bugbear/B020.py similarity index 100% rename from resources/test/fixtures/B020.py rename to resources/test/fixtures/flake8_bugbear/B020.py diff --git a/resources/test/fixtures/B021.py b/resources/test/fixtures/flake8_bugbear/B021.py similarity index 100% rename from resources/test/fixtures/B021.py rename to resources/test/fixtures/flake8_bugbear/B021.py diff --git a/resources/test/fixtures/B022.py b/resources/test/fixtures/flake8_bugbear/B022.py similarity index 100% rename from resources/test/fixtures/B022.py rename to resources/test/fixtures/flake8_bugbear/B022.py diff --git a/resources/test/fixtures/B023.py b/resources/test/fixtures/flake8_bugbear/B023.py similarity index 100% rename from resources/test/fixtures/B023.py rename to resources/test/fixtures/flake8_bugbear/B023.py diff --git a/resources/test/fixtures/B024.py b/resources/test/fixtures/flake8_bugbear/B024.py similarity index 100% rename from resources/test/fixtures/B024.py rename to resources/test/fixtures/flake8_bugbear/B024.py diff --git a/resources/test/fixtures/B025.py b/resources/test/fixtures/flake8_bugbear/B025.py similarity index 100% rename from resources/test/fixtures/B025.py rename to resources/test/fixtures/flake8_bugbear/B025.py diff --git a/resources/test/fixtures/B026.py b/resources/test/fixtures/flake8_bugbear/B026.py similarity index 100% rename from resources/test/fixtures/B026.py rename to resources/test/fixtures/flake8_bugbear/B026.py diff --git a/resources/test/fixtures/B027.py b/resources/test/fixtures/flake8_bugbear/B027.py similarity index 100% rename from resources/test/fixtures/B027.py rename to resources/test/fixtures/flake8_bugbear/B027.py diff --git a/resources/test/fixtures/B904.py b/resources/test/fixtures/flake8_bugbear/B904.py similarity index 100% rename from resources/test/fixtures/B904.py rename to resources/test/fixtures/flake8_bugbear/B904.py diff --git a/resources/test/fixtures/A001.py b/resources/test/fixtures/flake8_builtins/A001.py similarity index 100% rename from resources/test/fixtures/A001.py rename to resources/test/fixtures/flake8_builtins/A001.py diff --git a/resources/test/fixtures/A002.py b/resources/test/fixtures/flake8_builtins/A002.py similarity index 100% rename from resources/test/fixtures/A002.py rename to resources/test/fixtures/flake8_builtins/A002.py diff --git a/resources/test/fixtures/A003.py b/resources/test/fixtures/flake8_builtins/A003.py similarity index 100% rename from resources/test/fixtures/A003.py rename to resources/test/fixtures/flake8_builtins/A003.py diff --git a/resources/test/fixtures/C400.py b/resources/test/fixtures/flake8_comprehensions/C400.py similarity index 100% rename from resources/test/fixtures/C400.py rename to resources/test/fixtures/flake8_comprehensions/C400.py diff --git a/resources/test/fixtures/C401.py b/resources/test/fixtures/flake8_comprehensions/C401.py similarity index 100% rename from resources/test/fixtures/C401.py rename to resources/test/fixtures/flake8_comprehensions/C401.py diff --git a/resources/test/fixtures/C402.py b/resources/test/fixtures/flake8_comprehensions/C402.py similarity index 100% rename from resources/test/fixtures/C402.py rename to resources/test/fixtures/flake8_comprehensions/C402.py diff --git a/resources/test/fixtures/C403.py b/resources/test/fixtures/flake8_comprehensions/C403.py similarity index 100% rename from resources/test/fixtures/C403.py rename to resources/test/fixtures/flake8_comprehensions/C403.py diff --git a/resources/test/fixtures/C404.py b/resources/test/fixtures/flake8_comprehensions/C404.py similarity index 100% rename from resources/test/fixtures/C404.py rename to resources/test/fixtures/flake8_comprehensions/C404.py diff --git a/resources/test/fixtures/C405.py b/resources/test/fixtures/flake8_comprehensions/C405.py similarity index 100% rename from resources/test/fixtures/C405.py rename to resources/test/fixtures/flake8_comprehensions/C405.py diff --git a/resources/test/fixtures/C406.py b/resources/test/fixtures/flake8_comprehensions/C406.py similarity index 100% rename from resources/test/fixtures/C406.py rename to resources/test/fixtures/flake8_comprehensions/C406.py diff --git a/resources/test/fixtures/C408.py b/resources/test/fixtures/flake8_comprehensions/C408.py similarity index 100% rename from resources/test/fixtures/C408.py rename to resources/test/fixtures/flake8_comprehensions/C408.py diff --git a/resources/test/fixtures/C409.py b/resources/test/fixtures/flake8_comprehensions/C409.py similarity index 100% rename from resources/test/fixtures/C409.py rename to resources/test/fixtures/flake8_comprehensions/C409.py diff --git a/resources/test/fixtures/C410.py b/resources/test/fixtures/flake8_comprehensions/C410.py similarity index 100% rename from resources/test/fixtures/C410.py rename to resources/test/fixtures/flake8_comprehensions/C410.py diff --git a/resources/test/fixtures/C411.py b/resources/test/fixtures/flake8_comprehensions/C411.py similarity index 100% rename from resources/test/fixtures/C411.py rename to resources/test/fixtures/flake8_comprehensions/C411.py diff --git a/resources/test/fixtures/C413.py b/resources/test/fixtures/flake8_comprehensions/C413.py similarity index 100% rename from resources/test/fixtures/C413.py rename to resources/test/fixtures/flake8_comprehensions/C413.py diff --git a/resources/test/fixtures/C414.py b/resources/test/fixtures/flake8_comprehensions/C414.py similarity index 100% rename from resources/test/fixtures/C414.py rename to resources/test/fixtures/flake8_comprehensions/C414.py diff --git a/resources/test/fixtures/C415.py b/resources/test/fixtures/flake8_comprehensions/C415.py similarity index 100% rename from resources/test/fixtures/C415.py rename to resources/test/fixtures/flake8_comprehensions/C415.py diff --git a/resources/test/fixtures/C416.py b/resources/test/fixtures/flake8_comprehensions/C416.py similarity index 100% rename from resources/test/fixtures/C416.py rename to resources/test/fixtures/flake8_comprehensions/C416.py diff --git a/resources/test/fixtures/C417.py b/resources/test/fixtures/flake8_comprehensions/C417.py similarity index 100% rename from resources/test/fixtures/C417.py rename to resources/test/fixtures/flake8_comprehensions/C417.py diff --git a/resources/test/fixtures/T100.py b/resources/test/fixtures/flake8_print/T100.py similarity index 100% rename from resources/test/fixtures/T100.py rename to resources/test/fixtures/flake8_print/T100.py diff --git a/resources/test/fixtures/T201.py b/resources/test/fixtures/flake8_print/T201.py similarity index 100% rename from resources/test/fixtures/T201.py rename to resources/test/fixtures/flake8_print/T201.py diff --git a/resources/test/fixtures/T203.py b/resources/test/fixtures/flake8_print/T203.py similarity index 100% rename from resources/test/fixtures/T203.py rename to resources/test/fixtures/flake8_print/T203.py diff --git a/resources/test/fixtures/I252.py b/resources/test/fixtures/flake8_tidy_imports/I252.py similarity index 100% rename from resources/test/fixtures/I252.py rename to resources/test/fixtures/flake8_tidy_imports/I252.py diff --git a/resources/test/fixtures/C901.py b/resources/test/fixtures/mccabe/C901.py similarity index 100% rename from resources/test/fixtures/C901.py rename to resources/test/fixtures/mccabe/C901.py diff --git a/resources/test/fixtures/N801.py b/resources/test/fixtures/pep8_naming/N801.py similarity index 100% rename from resources/test/fixtures/N801.py rename to resources/test/fixtures/pep8_naming/N801.py diff --git a/resources/test/fixtures/N802.py b/resources/test/fixtures/pep8_naming/N802.py similarity index 100% rename from resources/test/fixtures/N802.py rename to resources/test/fixtures/pep8_naming/N802.py diff --git a/resources/test/fixtures/N803.py b/resources/test/fixtures/pep8_naming/N803.py similarity index 100% rename from resources/test/fixtures/N803.py rename to resources/test/fixtures/pep8_naming/N803.py diff --git a/resources/test/fixtures/N804.py b/resources/test/fixtures/pep8_naming/N804.py similarity index 100% rename from resources/test/fixtures/N804.py rename to resources/test/fixtures/pep8_naming/N804.py diff --git a/resources/test/fixtures/N805.py b/resources/test/fixtures/pep8_naming/N805.py similarity index 100% rename from resources/test/fixtures/N805.py rename to resources/test/fixtures/pep8_naming/N805.py diff --git a/resources/test/fixtures/N806.py b/resources/test/fixtures/pep8_naming/N806.py similarity index 100% rename from resources/test/fixtures/N806.py rename to resources/test/fixtures/pep8_naming/N806.py diff --git a/resources/test/fixtures/N807.py b/resources/test/fixtures/pep8_naming/N807.py similarity index 100% rename from resources/test/fixtures/N807.py rename to resources/test/fixtures/pep8_naming/N807.py diff --git a/resources/test/fixtures/N811.py b/resources/test/fixtures/pep8_naming/N811.py similarity index 100% rename from resources/test/fixtures/N811.py rename to resources/test/fixtures/pep8_naming/N811.py diff --git a/resources/test/fixtures/N812.py b/resources/test/fixtures/pep8_naming/N812.py similarity index 100% rename from resources/test/fixtures/N812.py rename to resources/test/fixtures/pep8_naming/N812.py diff --git a/resources/test/fixtures/N813.py b/resources/test/fixtures/pep8_naming/N813.py similarity index 100% rename from resources/test/fixtures/N813.py rename to resources/test/fixtures/pep8_naming/N813.py diff --git a/resources/test/fixtures/N814.py b/resources/test/fixtures/pep8_naming/N814.py similarity index 100% rename from resources/test/fixtures/N814.py rename to resources/test/fixtures/pep8_naming/N814.py diff --git a/resources/test/fixtures/N815.py b/resources/test/fixtures/pep8_naming/N815.py similarity index 100% rename from resources/test/fixtures/N815.py rename to resources/test/fixtures/pep8_naming/N815.py diff --git a/resources/test/fixtures/N816.py b/resources/test/fixtures/pep8_naming/N816.py similarity index 100% rename from resources/test/fixtures/N816.py rename to resources/test/fixtures/pep8_naming/N816.py diff --git a/resources/test/fixtures/N817.py b/resources/test/fixtures/pep8_naming/N817.py similarity index 100% rename from resources/test/fixtures/N817.py rename to resources/test/fixtures/pep8_naming/N817.py diff --git a/resources/test/fixtures/N818.py b/resources/test/fixtures/pep8_naming/N818.py similarity index 100% rename from resources/test/fixtures/N818.py rename to resources/test/fixtures/pep8_naming/N818.py diff --git a/resources/test/fixtures/E402.py b/resources/test/fixtures/pycodestyle/E402.py similarity index 100% rename from resources/test/fixtures/E402.py rename to resources/test/fixtures/pycodestyle/E402.py diff --git a/resources/test/fixtures/E501.py b/resources/test/fixtures/pycodestyle/E501.py similarity index 100% rename from resources/test/fixtures/E501.py rename to resources/test/fixtures/pycodestyle/E501.py diff --git a/resources/test/fixtures/E711.py b/resources/test/fixtures/pycodestyle/E711.py similarity index 100% rename from resources/test/fixtures/E711.py rename to resources/test/fixtures/pycodestyle/E711.py diff --git a/resources/test/fixtures/E712.py b/resources/test/fixtures/pycodestyle/E712.py similarity index 100% rename from resources/test/fixtures/E712.py rename to resources/test/fixtures/pycodestyle/E712.py diff --git a/resources/test/fixtures/E713.py b/resources/test/fixtures/pycodestyle/E713.py similarity index 100% rename from resources/test/fixtures/E713.py rename to resources/test/fixtures/pycodestyle/E713.py diff --git a/resources/test/fixtures/E714.py b/resources/test/fixtures/pycodestyle/E714.py similarity index 100% rename from resources/test/fixtures/E714.py rename to resources/test/fixtures/pycodestyle/E714.py diff --git a/resources/test/fixtures/E721.py b/resources/test/fixtures/pycodestyle/E721.py similarity index 100% rename from resources/test/fixtures/E721.py rename to resources/test/fixtures/pycodestyle/E721.py diff --git a/resources/test/fixtures/E722.py b/resources/test/fixtures/pycodestyle/E722.py similarity index 100% rename from resources/test/fixtures/E722.py rename to resources/test/fixtures/pycodestyle/E722.py diff --git a/resources/test/fixtures/E731.py b/resources/test/fixtures/pycodestyle/E731.py similarity index 100% rename from resources/test/fixtures/E731.py rename to resources/test/fixtures/pycodestyle/E731.py diff --git a/resources/test/fixtures/E741.py b/resources/test/fixtures/pycodestyle/E741.py similarity index 100% rename from resources/test/fixtures/E741.py rename to resources/test/fixtures/pycodestyle/E741.py diff --git a/resources/test/fixtures/E742.py b/resources/test/fixtures/pycodestyle/E742.py similarity index 100% rename from resources/test/fixtures/E742.py rename to resources/test/fixtures/pycodestyle/E742.py diff --git a/resources/test/fixtures/E743.py b/resources/test/fixtures/pycodestyle/E743.py similarity index 100% rename from resources/test/fixtures/E743.py rename to resources/test/fixtures/pycodestyle/E743.py diff --git a/resources/test/fixtures/E999.py b/resources/test/fixtures/pycodestyle/E999.py similarity index 100% rename from resources/test/fixtures/E999.py rename to resources/test/fixtures/pycodestyle/E999.py diff --git a/resources/test/fixtures/W292_0.py b/resources/test/fixtures/pycodestyle/W292_0.py similarity index 100% rename from resources/test/fixtures/W292_0.py rename to resources/test/fixtures/pycodestyle/W292_0.py diff --git a/resources/test/fixtures/W292_1.py b/resources/test/fixtures/pycodestyle/W292_1.py similarity index 100% rename from resources/test/fixtures/W292_1.py rename to resources/test/fixtures/pycodestyle/W292_1.py diff --git a/resources/test/fixtures/W292_2.py b/resources/test/fixtures/pycodestyle/W292_2.py similarity index 100% rename from resources/test/fixtures/W292_2.py rename to resources/test/fixtures/pycodestyle/W292_2.py diff --git a/resources/test/fixtures/W605_0.py b/resources/test/fixtures/pycodestyle/W605_0.py similarity index 100% rename from resources/test/fixtures/W605_0.py rename to resources/test/fixtures/pycodestyle/W605_0.py diff --git a/resources/test/fixtures/W605_1.py b/resources/test/fixtures/pycodestyle/W605_1.py similarity index 100% rename from resources/test/fixtures/W605_1.py rename to resources/test/fixtures/pycodestyle/W605_1.py diff --git a/resources/test/fixtures/D.py b/resources/test/fixtures/pydocstyle/D.py similarity index 100% rename from resources/test/fixtures/D.py rename to resources/test/fixtures/pydocstyle/D.py diff --git a/resources/test/fixtures/canonical_google_examples.py b/resources/test/fixtures/pydocstyle/canonical_google_examples.py similarity index 100% rename from resources/test/fixtures/canonical_google_examples.py rename to resources/test/fixtures/pydocstyle/canonical_google_examples.py diff --git a/resources/test/fixtures/canonical_numpy_examples.py b/resources/test/fixtures/pydocstyle/canonical_numpy_examples.py similarity index 100% rename from resources/test/fixtures/canonical_numpy_examples.py rename to resources/test/fixtures/pydocstyle/canonical_numpy_examples.py diff --git a/resources/test/fixtures/sections.py b/resources/test/fixtures/pydocstyle/sections.py similarity index 100% rename from resources/test/fixtures/sections.py rename to resources/test/fixtures/pydocstyle/sections.py diff --git a/resources/test/fixtures/F401_0.py b/resources/test/fixtures/pyflakes/F401_0.py similarity index 100% rename from resources/test/fixtures/F401_0.py rename to resources/test/fixtures/pyflakes/F401_0.py diff --git a/resources/test/fixtures/F401_1.py b/resources/test/fixtures/pyflakes/F401_1.py similarity index 100% rename from resources/test/fixtures/F401_1.py rename to resources/test/fixtures/pyflakes/F401_1.py diff --git a/resources/test/fixtures/F401_2.py b/resources/test/fixtures/pyflakes/F401_2.py similarity index 100% rename from resources/test/fixtures/F401_2.py rename to resources/test/fixtures/pyflakes/F401_2.py diff --git a/resources/test/fixtures/F401_3.py b/resources/test/fixtures/pyflakes/F401_3.py similarity index 100% rename from resources/test/fixtures/F401_3.py rename to resources/test/fixtures/pyflakes/F401_3.py diff --git a/resources/test/fixtures/F401_4.py b/resources/test/fixtures/pyflakes/F401_4.py similarity index 100% rename from resources/test/fixtures/F401_4.py rename to resources/test/fixtures/pyflakes/F401_4.py diff --git a/resources/test/fixtures/F401_5.py b/resources/test/fixtures/pyflakes/F401_5.py similarity index 100% rename from resources/test/fixtures/F401_5.py rename to resources/test/fixtures/pyflakes/F401_5.py diff --git a/resources/test/fixtures/F401_6.py b/resources/test/fixtures/pyflakes/F401_6.py similarity index 100% rename from resources/test/fixtures/F401_6.py rename to resources/test/fixtures/pyflakes/F401_6.py diff --git a/resources/test/fixtures/F402.py b/resources/test/fixtures/pyflakes/F402.py similarity index 100% rename from resources/test/fixtures/F402.py rename to resources/test/fixtures/pyflakes/F402.py diff --git a/resources/test/fixtures/F403.py b/resources/test/fixtures/pyflakes/F403.py similarity index 100% rename from resources/test/fixtures/F403.py rename to resources/test/fixtures/pyflakes/F403.py diff --git a/resources/test/fixtures/F404.py b/resources/test/fixtures/pyflakes/F404.py similarity index 100% rename from resources/test/fixtures/F404.py rename to resources/test/fixtures/pyflakes/F404.py diff --git a/resources/test/fixtures/F405.py b/resources/test/fixtures/pyflakes/F405.py similarity index 100% rename from resources/test/fixtures/F405.py rename to resources/test/fixtures/pyflakes/F405.py diff --git a/resources/test/fixtures/F406.py b/resources/test/fixtures/pyflakes/F406.py similarity index 100% rename from resources/test/fixtures/F406.py rename to resources/test/fixtures/pyflakes/F406.py diff --git a/resources/test/fixtures/F407.py b/resources/test/fixtures/pyflakes/F407.py similarity index 100% rename from resources/test/fixtures/F407.py rename to resources/test/fixtures/pyflakes/F407.py diff --git a/resources/test/fixtures/F502.py b/resources/test/fixtures/pyflakes/F502.py similarity index 100% rename from resources/test/fixtures/F502.py rename to resources/test/fixtures/pyflakes/F502.py diff --git a/resources/test/fixtures/F503.py b/resources/test/fixtures/pyflakes/F503.py similarity index 100% rename from resources/test/fixtures/F503.py rename to resources/test/fixtures/pyflakes/F503.py diff --git a/resources/test/fixtures/F504.py b/resources/test/fixtures/pyflakes/F504.py similarity index 100% rename from resources/test/fixtures/F504.py rename to resources/test/fixtures/pyflakes/F504.py diff --git a/resources/test/fixtures/F50x.py b/resources/test/fixtures/pyflakes/F50x.py similarity index 100% rename from resources/test/fixtures/F50x.py rename to resources/test/fixtures/pyflakes/F50x.py diff --git a/resources/test/fixtures/F521.py b/resources/test/fixtures/pyflakes/F521.py similarity index 100% rename from resources/test/fixtures/F521.py rename to resources/test/fixtures/pyflakes/F521.py diff --git a/resources/test/fixtures/F522.py b/resources/test/fixtures/pyflakes/F522.py similarity index 100% rename from resources/test/fixtures/F522.py rename to resources/test/fixtures/pyflakes/F522.py diff --git a/resources/test/fixtures/F523.py b/resources/test/fixtures/pyflakes/F523.py similarity index 100% rename from resources/test/fixtures/F523.py rename to resources/test/fixtures/pyflakes/F523.py diff --git a/resources/test/fixtures/F524.py b/resources/test/fixtures/pyflakes/F524.py similarity index 100% rename from resources/test/fixtures/F524.py rename to resources/test/fixtures/pyflakes/F524.py diff --git a/resources/test/fixtures/F525.py b/resources/test/fixtures/pyflakes/F525.py similarity index 100% rename from resources/test/fixtures/F525.py rename to resources/test/fixtures/pyflakes/F525.py diff --git a/resources/test/fixtures/F541.py b/resources/test/fixtures/pyflakes/F541.py similarity index 100% rename from resources/test/fixtures/F541.py rename to resources/test/fixtures/pyflakes/F541.py diff --git a/resources/test/fixtures/F601.py b/resources/test/fixtures/pyflakes/F601.py similarity index 100% rename from resources/test/fixtures/F601.py rename to resources/test/fixtures/pyflakes/F601.py diff --git a/resources/test/fixtures/F602.py b/resources/test/fixtures/pyflakes/F602.py similarity index 100% rename from resources/test/fixtures/F602.py rename to resources/test/fixtures/pyflakes/F602.py diff --git a/resources/test/fixtures/F622.py b/resources/test/fixtures/pyflakes/F622.py similarity index 100% rename from resources/test/fixtures/F622.py rename to resources/test/fixtures/pyflakes/F622.py diff --git a/resources/test/fixtures/F631.py b/resources/test/fixtures/pyflakes/F631.py similarity index 100% rename from resources/test/fixtures/F631.py rename to resources/test/fixtures/pyflakes/F631.py diff --git a/resources/test/fixtures/F632.py b/resources/test/fixtures/pyflakes/F632.py similarity index 100% rename from resources/test/fixtures/F632.py rename to resources/test/fixtures/pyflakes/F632.py diff --git a/resources/test/fixtures/F633.py b/resources/test/fixtures/pyflakes/F633.py similarity index 100% rename from resources/test/fixtures/F633.py rename to resources/test/fixtures/pyflakes/F633.py diff --git a/resources/test/fixtures/F634.py b/resources/test/fixtures/pyflakes/F634.py similarity index 100% rename from resources/test/fixtures/F634.py rename to resources/test/fixtures/pyflakes/F634.py diff --git a/resources/test/fixtures/F701.py b/resources/test/fixtures/pyflakes/F701.py similarity index 100% rename from resources/test/fixtures/F701.py rename to resources/test/fixtures/pyflakes/F701.py diff --git a/resources/test/fixtures/F702.py b/resources/test/fixtures/pyflakes/F702.py similarity index 100% rename from resources/test/fixtures/F702.py rename to resources/test/fixtures/pyflakes/F702.py diff --git a/resources/test/fixtures/F704.py b/resources/test/fixtures/pyflakes/F704.py similarity index 100% rename from resources/test/fixtures/F704.py rename to resources/test/fixtures/pyflakes/F704.py diff --git a/resources/test/fixtures/F706.py b/resources/test/fixtures/pyflakes/F706.py similarity index 100% rename from resources/test/fixtures/F706.py rename to resources/test/fixtures/pyflakes/F706.py diff --git a/resources/test/fixtures/F707.py b/resources/test/fixtures/pyflakes/F707.py similarity index 100% rename from resources/test/fixtures/F707.py rename to resources/test/fixtures/pyflakes/F707.py diff --git a/resources/test/fixtures/F722.py b/resources/test/fixtures/pyflakes/F722.py similarity index 100% rename from resources/test/fixtures/F722.py rename to resources/test/fixtures/pyflakes/F722.py diff --git a/resources/test/fixtures/F821_0.py b/resources/test/fixtures/pyflakes/F821_0.py similarity index 100% rename from resources/test/fixtures/F821_0.py rename to resources/test/fixtures/pyflakes/F821_0.py diff --git a/resources/test/fixtures/F821_1.py b/resources/test/fixtures/pyflakes/F821_1.py similarity index 100% rename from resources/test/fixtures/F821_1.py rename to resources/test/fixtures/pyflakes/F821_1.py diff --git a/resources/test/fixtures/F821_2.py b/resources/test/fixtures/pyflakes/F821_2.py similarity index 100% rename from resources/test/fixtures/F821_2.py rename to resources/test/fixtures/pyflakes/F821_2.py diff --git a/resources/test/fixtures/F821_3.py b/resources/test/fixtures/pyflakes/F821_3.py similarity index 100% rename from resources/test/fixtures/F821_3.py rename to resources/test/fixtures/pyflakes/F821_3.py diff --git a/resources/test/fixtures/F821_4.py b/resources/test/fixtures/pyflakes/F821_4.py similarity index 100% rename from resources/test/fixtures/F821_4.py rename to resources/test/fixtures/pyflakes/F821_4.py diff --git a/resources/test/fixtures/F821_5.py b/resources/test/fixtures/pyflakes/F821_5.py similarity index 100% rename from resources/test/fixtures/F821_5.py rename to resources/test/fixtures/pyflakes/F821_5.py diff --git a/resources/test/fixtures/F822.py b/resources/test/fixtures/pyflakes/F822.py similarity index 100% rename from resources/test/fixtures/F822.py rename to resources/test/fixtures/pyflakes/F822.py diff --git a/resources/test/fixtures/F823.py b/resources/test/fixtures/pyflakes/F823.py similarity index 100% rename from resources/test/fixtures/F823.py rename to resources/test/fixtures/pyflakes/F823.py diff --git a/resources/test/fixtures/F831.py b/resources/test/fixtures/pyflakes/F831.py similarity index 100% rename from resources/test/fixtures/F831.py rename to resources/test/fixtures/pyflakes/F831.py diff --git a/resources/test/fixtures/F841.py b/resources/test/fixtures/pyflakes/F841.py similarity index 100% rename from resources/test/fixtures/F841.py rename to resources/test/fixtures/pyflakes/F841.py diff --git a/resources/test/fixtures/F901.py b/resources/test/fixtures/pyflakes/F901.py similarity index 100% rename from resources/test/fixtures/F901.py rename to resources/test/fixtures/pyflakes/F901.py diff --git a/resources/test/fixtures/__init__.py b/resources/test/fixtures/pyflakes/__init__.py similarity index 100% rename from resources/test/fixtures/__init__.py rename to resources/test/fixtures/pyflakes/__init__.py diff --git a/resources/test/fixtures/future_annotations.py b/resources/test/fixtures/pyflakes/future_annotations.py similarity index 100% rename from resources/test/fixtures/future_annotations.py rename to resources/test/fixtures/pyflakes/future_annotations.py diff --git a/resources/test/fixtures/U001.py b/resources/test/fixtures/pyupgrade/U001.py similarity index 100% rename from resources/test/fixtures/U001.py rename to resources/test/fixtures/pyupgrade/U001.py diff --git a/resources/test/fixtures/U003.py b/resources/test/fixtures/pyupgrade/U003.py similarity index 100% rename from resources/test/fixtures/U003.py rename to resources/test/fixtures/pyupgrade/U003.py diff --git a/resources/test/fixtures/U004.py b/resources/test/fixtures/pyupgrade/U004.py similarity index 100% rename from resources/test/fixtures/U004.py rename to resources/test/fixtures/pyupgrade/U004.py diff --git a/resources/test/fixtures/U005.py b/resources/test/fixtures/pyupgrade/U005.py similarity index 100% rename from resources/test/fixtures/U005.py rename to resources/test/fixtures/pyupgrade/U005.py diff --git a/resources/test/fixtures/U006.py b/resources/test/fixtures/pyupgrade/U006.py similarity index 100% rename from resources/test/fixtures/U006.py rename to resources/test/fixtures/pyupgrade/U006.py diff --git a/resources/test/fixtures/U007.py b/resources/test/fixtures/pyupgrade/U007.py similarity index 100% rename from resources/test/fixtures/U007.py rename to resources/test/fixtures/pyupgrade/U007.py diff --git a/resources/test/fixtures/U008.py b/resources/test/fixtures/pyupgrade/U008.py similarity index 100% rename from resources/test/fixtures/U008.py rename to resources/test/fixtures/pyupgrade/U008.py diff --git a/resources/test/fixtures/U009_0.py b/resources/test/fixtures/pyupgrade/U009_0.py similarity index 100% rename from resources/test/fixtures/U009_0.py rename to resources/test/fixtures/pyupgrade/U009_0.py diff --git a/resources/test/fixtures/U009_1.py b/resources/test/fixtures/pyupgrade/U009_1.py similarity index 100% rename from resources/test/fixtures/U009_1.py rename to resources/test/fixtures/pyupgrade/U009_1.py diff --git a/resources/test/fixtures/U009_2.py b/resources/test/fixtures/pyupgrade/U009_2.py similarity index 100% rename from resources/test/fixtures/U009_2.py rename to resources/test/fixtures/pyupgrade/U009_2.py diff --git a/resources/test/fixtures/U009_3.py b/resources/test/fixtures/pyupgrade/U009_3.py similarity index 100% rename from resources/test/fixtures/U009_3.py rename to resources/test/fixtures/pyupgrade/U009_3.py diff --git a/resources/test/fixtures/U009_4.py b/resources/test/fixtures/pyupgrade/U009_4.py similarity index 100% rename from resources/test/fixtures/U009_4.py rename to resources/test/fixtures/pyupgrade/U009_4.py diff --git a/resources/test/fixtures/U010.py b/resources/test/fixtures/pyupgrade/U010.py similarity index 100% rename from resources/test/fixtures/U010.py rename to resources/test/fixtures/pyupgrade/U010.py diff --git a/resources/test/fixtures/U011_0.py b/resources/test/fixtures/pyupgrade/U011_0.py similarity index 100% rename from resources/test/fixtures/U011_0.py rename to resources/test/fixtures/pyupgrade/U011_0.py diff --git a/resources/test/fixtures/U011_1.py b/resources/test/fixtures/pyupgrade/U011_1.py similarity index 100% rename from resources/test/fixtures/U011_1.py rename to resources/test/fixtures/pyupgrade/U011_1.py diff --git a/resources/test/fixtures/U012.py b/resources/test/fixtures/pyupgrade/U012.py similarity index 100% rename from resources/test/fixtures/U012.py rename to resources/test/fixtures/pyupgrade/U012.py diff --git a/resources/test/fixtures/U013.py b/resources/test/fixtures/pyupgrade/U013.py similarity index 100% rename from resources/test/fixtures/U013.py rename to resources/test/fixtures/pyupgrade/U013.py diff --git a/resources/test/fixtures/U014.py b/resources/test/fixtures/pyupgrade/U014.py similarity index 100% rename from resources/test/fixtures/U014.py rename to resources/test/fixtures/pyupgrade/U014.py diff --git a/resources/test/fixtures/U015.py b/resources/test/fixtures/pyupgrade/U015.py similarity index 100% rename from resources/test/fixtures/U015.py rename to resources/test/fixtures/pyupgrade/U015.py diff --git a/resources/test/fixtures/pyupgrade/future_annotations.py b/resources/test/fixtures/pyupgrade/future_annotations.py new file mode 100644 index 0000000000..992cb00905 --- /dev/null +++ b/resources/test/fixtures/pyupgrade/future_annotations.py @@ -0,0 +1,40 @@ +from __future__ import annotations + +from dataclasses import dataclass +from typing import List, Optional + +from models import ( + Fruit, + Nut, +) + + +@dataclass +class Foo: + x: int + y: int + + @classmethod + def a(cls) -> Foo: + return cls(x=0, y=0) + + @classmethod + def b(cls) -> "Foo": + return cls(x=0, y=0) + + @classmethod + def c(cls) -> Bar: + return cls(x=0, y=0) + + @classmethod + def d(cls) -> Fruit: + return cls(x=0, y=0) + + +def f(x: int) -> List[int]: + y = List[int]() + y.append(x) + return y + + +x: Optional[int] = None diff --git a/resources/test/fixtures/M001.py b/resources/test/fixtures/ruff/M001.py similarity index 100% rename from resources/test/fixtures/M001.py rename to resources/test/fixtures/ruff/M001.py diff --git a/resources/test/fixtures/RUF001.py b/resources/test/fixtures/ruff/RUF001.py similarity index 100% rename from resources/test/fixtures/RUF001.py rename to resources/test/fixtures/ruff/RUF001.py diff --git a/resources/test/fixtures/RUF002.py b/resources/test/fixtures/ruff/RUF002.py similarity index 100% rename from resources/test/fixtures/RUF002.py rename to resources/test/fixtures/ruff/RUF002.py diff --git a/resources/test/fixtures/RUF003.py b/resources/test/fixtures/ruff/RUF003.py similarity index 100% rename from resources/test/fixtures/RUF003.py rename to resources/test/fixtures/ruff/RUF003.py diff --git a/resources/test/fixtures/RUF101_0.py b/resources/test/fixtures/ruff/RUF101_0.py similarity index 100% rename from resources/test/fixtures/RUF101_0.py rename to resources/test/fixtures/ruff/RUF101_0.py diff --git a/resources/test/fixtures/RUF101_1.py b/resources/test/fixtures/ruff/RUF101_1.py similarity index 100% rename from resources/test/fixtures/RUF101_1.py rename to resources/test/fixtures/ruff/RUF101_1.py diff --git a/resources/test/fixtures/RUF101_2.py b/resources/test/fixtures/ruff/RUF101_2.py similarity index 100% rename from resources/test/fixtures/RUF101_2.py rename to resources/test/fixtures/ruff/RUF101_2.py diff --git a/resources/test/fixtures/RUF101_3.py b/resources/test/fixtures/ruff/RUF101_3.py similarity index 100% rename from resources/test/fixtures/RUF101_3.py rename to resources/test/fixtures/ruff/RUF101_3.py diff --git a/resources/test/fixtures/RUF101_4.py b/resources/test/fixtures/ruff/RUF101_4.py similarity index 100% rename from resources/test/fixtures/RUF101_4.py rename to resources/test/fixtures/ruff/RUF101_4.py diff --git a/resources/test/fixtures/RUF101_5.py b/resources/test/fixtures/ruff/RUF101_5.py similarity index 100% rename from resources/test/fixtures/RUF101_5.py rename to resources/test/fixtures/ruff/RUF101_5.py diff --git a/resources/test/fixtures/RUF101_6.py b/resources/test/fixtures/ruff/RUF101_6.py similarity index 100% rename from resources/test/fixtures/RUF101_6.py rename to resources/test/fixtures/ruff/RUF101_6.py diff --git a/src/directives.rs b/src/directives.rs index 087f997807..90e11fcdf1 100644 --- a/src/directives.rs +++ b/src/directives.rs @@ -113,7 +113,6 @@ pub fn extract_isort_exclusions(lxr: &[LexResult], locator: &SourceCodeLocator) #[cfg(test)] mod tests { - use nohash_hasher::IntMap; use rustpython_parser::lexer; use rustpython_parser::lexer::LexResult; diff --git a/src/eradicate/mod.rs b/src/eradicate/mod.rs index d602ab1fb1..49dcf9bb65 100644 --- a/src/eradicate/mod.rs +++ b/src/eradicate/mod.rs @@ -1,2 +1,30 @@ pub mod checks; pub mod detection; + +#[cfg(test)] +mod tests { + use std::convert::AsRef; + use std::path::Path; + + use anyhow::Result; + use test_case::test_case; + + use crate::checks::CheckCode; + use crate::linter::test_path; + use crate::settings; + + #[test_case(CheckCode::ERA001, Path::new("ERA001.py"); "ERA001")] + fn checks(check_code: CheckCode, path: &Path) -> Result<()> { + let snapshot = format!("{}_{}", check_code.as_ref(), path.to_string_lossy()); + let mut checks = test_path( + Path::new("./resources/test/fixtures/eradicate") + .join(path) + .as_path(), + &settings::Settings::for_rule(check_code), + true, + )?; + checks.sort_by_key(|check| check.location); + insta::assert_yaml_snapshot!(snapshot, checks); + Ok(()) + } +} diff --git a/src/snapshots/ruff__linter__tests__ERA001_ERA001.py.snap b/src/eradicate/snapshots/ruff__eradicate__tests__ERA001_ERA001.py.snap similarity index 97% rename from src/snapshots/ruff__linter__tests__ERA001_ERA001.py.snap rename to src/eradicate/snapshots/ruff__eradicate__tests__ERA001_ERA001.py.snap index 1e85e38742..fc5aac4def 100644 --- a/src/snapshots/ruff__linter__tests__ERA001_ERA001.py.snap +++ b/src/eradicate/snapshots/ruff__eradicate__tests__ERA001_ERA001.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/eradicate/mod.rs expression: checks --- - kind: CommentedOutCode diff --git a/src/flake8_2020/mod.rs b/src/flake8_2020/mod.rs index 25a06164e5..8b4327034f 100644 --- a/src/flake8_2020/mod.rs +++ b/src/flake8_2020/mod.rs @@ -1 +1,38 @@ pub mod plugins; + +#[cfg(test)] +mod tests { + use std::convert::AsRef; + use std::path::Path; + + use anyhow::Result; + use test_case::test_case; + + use crate::checks::CheckCode; + use crate::linter::test_path; + use crate::settings; + + #[test_case(CheckCode::YTT101, Path::new("YTT101.py"); "YTT101")] + #[test_case(CheckCode::YTT102, Path::new("YTT102.py"); "YTT102")] + #[test_case(CheckCode::YTT103, Path::new("YTT103.py"); "YTT103")] + #[test_case(CheckCode::YTT201, Path::new("YTT201.py"); "YTT201")] + #[test_case(CheckCode::YTT202, Path::new("YTT202.py"); "YTT202")] + #[test_case(CheckCode::YTT203, Path::new("YTT203.py"); "YTT203")] + #[test_case(CheckCode::YTT204, Path::new("YTT204.py"); "YTT204")] + #[test_case(CheckCode::YTT301, Path::new("YTT301.py"); "YTT301")] + #[test_case(CheckCode::YTT302, Path::new("YTT302.py"); "YTT302")] + #[test_case(CheckCode::YTT303, Path::new("YTT303.py"); "YTT303")] + fn checks(check_code: CheckCode, path: &Path) -> Result<()> { + let snapshot = format!("{}_{}", check_code.as_ref(), path.to_string_lossy()); + let mut checks = test_path( + Path::new("./resources/test/fixtures/flake8_2020") + .join(path) + .as_path(), + &settings::Settings::for_rule(check_code), + true, + )?; + checks.sort_by_key(|check| check.location); + insta::assert_yaml_snapshot!(snapshot, checks); + Ok(()) + } +} diff --git a/src/snapshots/ruff__linter__tests__YTT101_YTT101.py.snap b/src/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT101_YTT101.py.snap similarity index 92% rename from src/snapshots/ruff__linter__tests__YTT101_YTT101.py.snap rename to src/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT101_YTT101.py.snap index c6a6b7760c..d4e1d5a7c2 100644 --- a/src/snapshots/ruff__linter__tests__YTT101_YTT101.py.snap +++ b/src/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT101_YTT101.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_2020/mod.rs expression: checks --- - kind: SysVersionSlice3Referenced diff --git a/src/snapshots/ruff__linter__tests__YTT102_YTT102.py.snap b/src/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT102_YTT102.py.snap similarity index 89% rename from src/snapshots/ruff__linter__tests__YTT102_YTT102.py.snap rename to src/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT102_YTT102.py.snap index c0827b9f68..b8f2b1face 100644 --- a/src/snapshots/ruff__linter__tests__YTT102_YTT102.py.snap +++ b/src/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT102_YTT102.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_2020/mod.rs expression: checks --- - kind: SysVersion2Referenced diff --git a/src/snapshots/ruff__linter__tests__YTT103_YTT103.py.snap b/src/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT103_YTT103.py.snap similarity index 95% rename from src/snapshots/ruff__linter__tests__YTT103_YTT103.py.snap rename to src/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT103_YTT103.py.snap index c271407d8e..f25354493c 100644 --- a/src/snapshots/ruff__linter__tests__YTT103_YTT103.py.snap +++ b/src/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT103_YTT103.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_2020/mod.rs expression: checks --- - kind: SysVersionCmpStr3 diff --git a/src/snapshots/ruff__linter__tests__YTT201_YTT201.py.snap b/src/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT201_YTT201.py.snap similarity index 94% rename from src/snapshots/ruff__linter__tests__YTT201_YTT201.py.snap rename to src/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT201_YTT201.py.snap index 0b3c7ca17b..ae36c2ef4e 100644 --- a/src/snapshots/ruff__linter__tests__YTT201_YTT201.py.snap +++ b/src/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT201_YTT201.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_2020/mod.rs expression: checks --- - kind: SysVersionInfo0Eq3Referenced diff --git a/src/snapshots/ruff__linter__tests__YTT202_YTT202.py.snap b/src/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT202_YTT202.py.snap similarity index 89% rename from src/snapshots/ruff__linter__tests__YTT202_YTT202.py.snap rename to src/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT202_YTT202.py.snap index 62a89d1196..725d81164f 100644 --- a/src/snapshots/ruff__linter__tests__YTT202_YTT202.py.snap +++ b/src/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT202_YTT202.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_2020/mod.rs expression: checks --- - kind: SixPY3Referenced diff --git a/src/snapshots/ruff__linter__tests__YTT203_YTT203.py.snap b/src/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT203_YTT203.py.snap similarity index 89% rename from src/snapshots/ruff__linter__tests__YTT203_YTT203.py.snap rename to src/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT203_YTT203.py.snap index 7be13d5842..4322bfb30d 100644 --- a/src/snapshots/ruff__linter__tests__YTT203_YTT203.py.snap +++ b/src/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT203_YTT203.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_2020/mod.rs expression: checks --- - kind: SysVersionInfo1CmpInt diff --git a/src/snapshots/ruff__linter__tests__YTT204_YTT204.py.snap b/src/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT204_YTT204.py.snap similarity index 89% rename from src/snapshots/ruff__linter__tests__YTT204_YTT204.py.snap rename to src/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT204_YTT204.py.snap index 22bede3d69..1deb56fd3b 100644 --- a/src/snapshots/ruff__linter__tests__YTT204_YTT204.py.snap +++ b/src/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT204_YTT204.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_2020/mod.rs expression: checks --- - kind: SysVersionInfoMinorCmpInt diff --git a/src/snapshots/ruff__linter__tests__YTT301_YTT301.py.snap b/src/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT301_YTT301.py.snap similarity index 89% rename from src/snapshots/ruff__linter__tests__YTT301_YTT301.py.snap rename to src/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT301_YTT301.py.snap index 1784fd4089..d4f289527c 100644 --- a/src/snapshots/ruff__linter__tests__YTT301_YTT301.py.snap +++ b/src/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT301_YTT301.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_2020/mod.rs expression: checks --- - kind: SysVersion0Referenced diff --git a/src/snapshots/ruff__linter__tests__YTT302_YTT302.py.snap b/src/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT302_YTT302.py.snap similarity index 95% rename from src/snapshots/ruff__linter__tests__YTT302_YTT302.py.snap rename to src/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT302_YTT302.py.snap index c45c63d270..4b4b304076 100644 --- a/src/snapshots/ruff__linter__tests__YTT302_YTT302.py.snap +++ b/src/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT302_YTT302.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_2020/mod.rs expression: checks --- - kind: SysVersionCmpStr10 diff --git a/src/snapshots/ruff__linter__tests__YTT303_YTT303.py.snap b/src/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT303_YTT303.py.snap similarity index 89% rename from src/snapshots/ruff__linter__tests__YTT303_YTT303.py.snap rename to src/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT303_YTT303.py.snap index a2aaa9edb7..cdb58142c4 100644 --- a/src/snapshots/ruff__linter__tests__YTT303_YTT303.py.snap +++ b/src/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT303_YTT303.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_2020/mod.rs expression: checks --- - kind: SysVersionSlice1Referenced diff --git a/src/flake8_bandit/mod.rs b/src/flake8_bandit/mod.rs index ef735e49ff..067047a8a5 100644 --- a/src/flake8_bandit/mod.rs +++ b/src/flake8_bandit/mod.rs @@ -1,2 +1,35 @@ mod helpers; pub mod plugins; + +#[cfg(test)] +mod tests { + use std::convert::AsRef; + use std::path::Path; + + use anyhow::Result; + use test_case::test_case; + + use crate::checks::CheckCode; + use crate::linter::test_path; + use crate::settings; + + #[test_case(CheckCode::S101, Path::new("S101.py"); "S101")] + #[test_case(CheckCode::S102, Path::new("S102.py"); "S102")] + #[test_case(CheckCode::S104, Path::new("S104.py"); "S104")] + #[test_case(CheckCode::S105, Path::new("S105.py"); "S105")] + #[test_case(CheckCode::S106, Path::new("S106.py"); "S106")] + #[test_case(CheckCode::S107, Path::new("S107.py"); "S107")] + fn checks(check_code: CheckCode, path: &Path) -> Result<()> { + let snapshot = format!("{}_{}", check_code.as_ref(), path.to_string_lossy()); + let mut checks = test_path( + Path::new("./resources/test/fixtures/flake8_bandit") + .join(path) + .as_path(), + &settings::Settings::for_rule(check_code), + true, + )?; + checks.sort_by_key(|check| check.location); + insta::assert_yaml_snapshot!(snapshot, checks); + Ok(()) + } +} diff --git a/src/snapshots/ruff__linter__tests__S101_S101.py.snap b/src/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S101_S101.py.snap similarity index 91% rename from src/snapshots/ruff__linter__tests__S101_S101.py.snap rename to src/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S101_S101.py.snap index 6f529a8c9e..aa1c1f2611 100644 --- a/src/snapshots/ruff__linter__tests__S101_S101.py.snap +++ b/src/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S101_S101.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_bandit/mod.rs expression: checks --- - kind: AssertUsed diff --git a/src/snapshots/ruff__linter__tests__S102_S102.py.snap b/src/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S102_S102.py.snap similarity index 87% rename from src/snapshots/ruff__linter__tests__S102_S102.py.snap rename to src/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S102_S102.py.snap index 82532d4410..5864e53f25 100644 --- a/src/snapshots/ruff__linter__tests__S102_S102.py.snap +++ b/src/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S102_S102.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_bandit/mod.rs expression: checks --- - kind: ExecUsed diff --git a/src/snapshots/ruff__linter__tests__S104_S104.py.snap b/src/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S104_S104.py.snap similarity index 94% rename from src/snapshots/ruff__linter__tests__S104_S104.py.snap rename to src/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S104_S104.py.snap index 13779f2bc7..da42d3c049 100644 --- a/src/snapshots/ruff__linter__tests__S104_S104.py.snap +++ b/src/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S104_S104.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_bandit/mod.rs expression: checks --- - kind: HardcodedBindAllInterfaces diff --git a/src/snapshots/ruff__linter__tests__S105_S105.py.snap b/src/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S105_S105.py.snap similarity index 99% rename from src/snapshots/ruff__linter__tests__S105_S105.py.snap rename to src/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S105_S105.py.snap index 9bdbd91f7e..5cf4c38af9 100644 --- a/src/snapshots/ruff__linter__tests__S105_S105.py.snap +++ b/src/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S105_S105.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_bandit/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__S106_S106.py.snap b/src/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S106_S106.py.snap similarity index 83% rename from src/snapshots/ruff__linter__tests__S106_S106.py.snap rename to src/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S106_S106.py.snap index 7b90fa73e9..bc4999cb22 100644 --- a/src/snapshots/ruff__linter__tests__S106_S106.py.snap +++ b/src/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S106_S106.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_bandit/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__S107_S107.py.snap b/src/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S107_S107.py.snap similarity index 95% rename from src/snapshots/ruff__linter__tests__S107_S107.py.snap rename to src/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S107_S107.py.snap index 5faef919ce..d1581d5ead 100644 --- a/src/snapshots/ruff__linter__tests__S107_S107.py.snap +++ b/src/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S107_S107.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_bandit/mod.rs expression: checks --- - kind: diff --git a/src/flake8_blind_except/mod.rs b/src/flake8_blind_except/mod.rs index 25a06164e5..687ae52da1 100644 --- a/src/flake8_blind_except/mod.rs +++ b/src/flake8_blind_except/mod.rs @@ -1 +1,29 @@ pub mod plugins; + +#[cfg(test)] +mod tests { + use std::convert::AsRef; + use std::path::Path; + + use anyhow::Result; + use test_case::test_case; + + use crate::checks::CheckCode; + use crate::linter::test_path; + use crate::settings; + + #[test_case(CheckCode::BLE001, Path::new("BLE.py"); "BLE001")] + fn checks(check_code: CheckCode, path: &Path) -> Result<()> { + let snapshot = format!("{}_{}", check_code.as_ref(), path.to_string_lossy()); + let mut checks = test_path( + Path::new("./resources/test/fixtures/flake8_blind_except") + .join(path) + .as_path(), + &settings::Settings::for_rule(check_code), + true, + )?; + checks.sort_by_key(|check| check.location); + insta::assert_yaml_snapshot!(snapshot, checks); + Ok(()) + } +} diff --git a/src/snapshots/ruff__linter__tests__BLE001_BLE.py.snap b/src/flake8_blind_except/snapshots/ruff__flake8_blind_except__tests__BLE001_BLE.py.snap similarity index 96% rename from src/snapshots/ruff__linter__tests__BLE001_BLE.py.snap rename to src/flake8_blind_except/snapshots/ruff__flake8_blind_except__tests__BLE001_BLE.py.snap index f68f242da3..2b9c70cfaa 100644 --- a/src/snapshots/ruff__linter__tests__BLE001_BLE.py.snap +++ b/src/flake8_blind_except/snapshots/ruff__flake8_blind_except__tests__BLE001_BLE.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_blind_except/mod.rs expression: checks --- - kind: BlindExcept diff --git a/src/flake8_boolean_trap/mod.rs b/src/flake8_boolean_trap/mod.rs index 25a06164e5..94ea1c252f 100644 --- a/src/flake8_boolean_trap/mod.rs +++ b/src/flake8_boolean_trap/mod.rs @@ -1 +1,31 @@ pub mod plugins; + +#[cfg(test)] +mod tests { + use std::convert::AsRef; + use std::path::Path; + + use anyhow::Result; + use test_case::test_case; + + use crate::checks::CheckCode; + use crate::linter::test_path; + use crate::settings; + + #[test_case(CheckCode::FBT001, Path::new("FBT.py"); "FBT001")] + #[test_case(CheckCode::FBT002, Path::new("FBT.py"); "FBT002")] + #[test_case(CheckCode::FBT003, Path::new("FBT.py"); "FBT003")] + fn checks(check_code: CheckCode, path: &Path) -> Result<()> { + let snapshot = format!("{}_{}", check_code.as_ref(), path.to_string_lossy()); + let mut checks = test_path( + Path::new("./resources/test/fixtures/flake8_boolean_trap") + .join(path) + .as_path(), + &settings::Settings::for_rule(check_code), + true, + )?; + checks.sort_by_key(|check| check.location); + insta::assert_yaml_snapshot!(snapshot, checks); + Ok(()) + } +} diff --git a/src/snapshots/ruff__linter__tests__FBT001_FBT.py.snap b/src/flake8_boolean_trap/snapshots/ruff__flake8_boolean_trap__tests__FBT001_FBT.py.snap similarity index 96% rename from src/snapshots/ruff__linter__tests__FBT001_FBT.py.snap rename to src/flake8_boolean_trap/snapshots/ruff__flake8_boolean_trap__tests__FBT001_FBT.py.snap index b91be5183b..2272568520 100644 --- a/src/snapshots/ruff__linter__tests__FBT001_FBT.py.snap +++ b/src/flake8_boolean_trap/snapshots/ruff__flake8_boolean_trap__tests__FBT001_FBT.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_boolean_trap/mod.rs expression: checks --- - kind: BooleanPositionalArgInFunctionDefinition diff --git a/src/snapshots/ruff__linter__tests__FBT002_FBT.py.snap b/src/flake8_boolean_trap/snapshots/ruff__flake8_boolean_trap__tests__FBT002_FBT.py.snap similarity index 93% rename from src/snapshots/ruff__linter__tests__FBT002_FBT.py.snap rename to src/flake8_boolean_trap/snapshots/ruff__flake8_boolean_trap__tests__FBT002_FBT.py.snap index 32c5ee948a..d72bcfc5c9 100644 --- a/src/snapshots/ruff__linter__tests__FBT002_FBT.py.snap +++ b/src/flake8_boolean_trap/snapshots/ruff__flake8_boolean_trap__tests__FBT002_FBT.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_boolean_trap/mod.rs expression: checks --- - kind: BooleanDefaultValueInFunctionDefinition diff --git a/src/snapshots/ruff__linter__tests__FBT003_FBT.py.snap b/src/flake8_boolean_trap/snapshots/ruff__flake8_boolean_trap__tests__FBT003_FBT.py.snap similarity index 91% rename from src/snapshots/ruff__linter__tests__FBT003_FBT.py.snap rename to src/flake8_boolean_trap/snapshots/ruff__flake8_boolean_trap__tests__FBT003_FBT.py.snap index 79dd04e9cc..43828067c4 100644 --- a/src/snapshots/ruff__linter__tests__FBT003_FBT.py.snap +++ b/src/flake8_boolean_trap/snapshots/ruff__flake8_boolean_trap__tests__FBT003_FBT.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_boolean_trap/mod.rs expression: checks --- - kind: BooleanPositionalValueInFunctionCall diff --git a/src/flake8_bugbear/mod.rs b/src/flake8_bugbear/mod.rs index 44483b80a3..8504110d32 100644 --- a/src/flake8_bugbear/mod.rs +++ b/src/flake8_bugbear/mod.rs @@ -6,16 +6,58 @@ mod tests { use std::path::Path; use anyhow::Result; + use test_case::test_case; use crate::checks::CheckCode; use crate::linter::test_path; use crate::{flake8_bugbear, Settings}; + #[test_case(CheckCode::B002, Path::new("B002.py"); "B002")] + #[test_case(CheckCode::B003, Path::new("B003.py"); "B003")] + #[test_case(CheckCode::B004, Path::new("B004.py"); "B004")] + #[test_case(CheckCode::B005, Path::new("B005.py"); "B005")] + #[test_case(CheckCode::B006, Path::new("B006_B008.py"); "B006")] + #[test_case(CheckCode::B007, Path::new("B007.py"); "B007")] + #[test_case(CheckCode::B008, Path::new("B006_B008.py"); "B008")] + #[test_case(CheckCode::B009, Path::new("B009_B010.py"); "B009")] + #[test_case(CheckCode::B010, Path::new("B009_B010.py"); "B010")] + #[test_case(CheckCode::B011, Path::new("B011.py"); "B011")] + #[test_case(CheckCode::B012, Path::new("B012.py"); "B012")] + #[test_case(CheckCode::B013, Path::new("B013.py"); "B013")] + #[test_case(CheckCode::B014, Path::new("B014.py"); "B014")] + #[test_case(CheckCode::B015, Path::new("B015.py"); "B015")] + #[test_case(CheckCode::B016, Path::new("B016.py"); "B016")] + #[test_case(CheckCode::B017, Path::new("B017.py"); "B017")] + #[test_case(CheckCode::B018, Path::new("B018.py"); "B018")] + #[test_case(CheckCode::B019, Path::new("B019.py"); "B019")] + #[test_case(CheckCode::B020, Path::new("B020.py"); "B020")] + #[test_case(CheckCode::B021, Path::new("B021.py"); "B021")] + #[test_case(CheckCode::B022, Path::new("B022.py"); "B022")] + #[test_case(CheckCode::B023, Path::new("B023.py"); "B023")] + #[test_case(CheckCode::B024, Path::new("B024.py"); "B024")] + #[test_case(CheckCode::B025, Path::new("B025.py"); "B025")] + #[test_case(CheckCode::B026, Path::new("B026.py"); "B026")] + #[test_case(CheckCode::B027, Path::new("B027.py"); "B027")] + #[test_case(CheckCode::B904, Path::new("B904.py"); "B904")] + fn checks(check_code: CheckCode, path: &Path) -> Result<()> { + let snapshot = format!("{}_{}", check_code.as_ref(), path.to_string_lossy()); + let mut checks = test_path( + Path::new("./resources/test/fixtures/flake8_bugbear") + .join(path) + .as_path(), + &Settings::for_rule(check_code), + true, + )?; + checks.sort_by_key(|check| check.location); + insta::assert_yaml_snapshot!(snapshot, checks); + Ok(()) + } + #[test] fn extend_immutable_calls() -> Result<()> { let snapshot = "extend_immutable_calls".to_string(); let mut checks = test_path( - Path::new("./resources/test/fixtures/B008_extended.py"), + Path::new("./resources/test/fixtures/flake8_bugbear/B008_extended.py"), &Settings { flake8_bugbear: flake8_bugbear::settings::Settings { extend_immutable_calls: vec![ diff --git a/src/snapshots/ruff__linter__tests__B002_B002.py.snap b/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B002_B002.py.snap similarity index 88% rename from src/snapshots/ruff__linter__tests__B002_B002.py.snap rename to src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B002_B002.py.snap index a404c1edef..65235e3d30 100644 --- a/src/snapshots/ruff__linter__tests__B002_B002.py.snap +++ b/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B002_B002.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_bugbear/mod.rs expression: checks --- - kind: UnaryPrefixIncrement diff --git a/src/snapshots/ruff__linter__tests__B003_B003.py.snap b/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B003_B003.py.snap similarity index 81% rename from src/snapshots/ruff__linter__tests__B003_B003.py.snap rename to src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B003_B003.py.snap index 7153d37857..a69d4ed4b6 100644 --- a/src/snapshots/ruff__linter__tests__B003_B003.py.snap +++ b/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B003_B003.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_bugbear/mod.rs expression: checks --- - kind: AssignmentToOsEnviron diff --git a/src/snapshots/ruff__linter__tests__B004_B004.py.snap b/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B004_B004.py.snap similarity index 88% rename from src/snapshots/ruff__linter__tests__B004_B004.py.snap rename to src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B004_B004.py.snap index ca80cc54ce..b8bc8f727f 100644 --- a/src/snapshots/ruff__linter__tests__B004_B004.py.snap +++ b/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B004_B004.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_bugbear/mod.rs expression: checks --- - kind: UnreliableCallableCheck diff --git a/src/snapshots/ruff__linter__tests__B005_B005.py.snap b/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B005_B005.py.snap similarity index 95% rename from src/snapshots/ruff__linter__tests__B005_B005.py.snap rename to src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B005_B005.py.snap index dbe3b1f9a3..6c506cb36b 100644 --- a/src/snapshots/ruff__linter__tests__B005_B005.py.snap +++ b/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B005_B005.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_bugbear/mod.rs expression: checks --- - kind: StripWithMultiCharacters diff --git a/src/snapshots/ruff__linter__tests__B006_B006_B008.py.snap b/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B006_B006_B008.py.snap similarity index 98% rename from src/snapshots/ruff__linter__tests__B006_B006_B008.py.snap rename to src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B006_B006_B008.py.snap index 4054c283bd..dab1d67896 100644 --- a/src/snapshots/ruff__linter__tests__B006_B006_B008.py.snap +++ b/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B006_B006_B008.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_bugbear/mod.rs expression: checks --- - kind: MutableArgumentDefault diff --git a/src/snapshots/ruff__linter__tests__B007_B007.py.snap b/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B007_B007.py.snap similarity index 96% rename from src/snapshots/ruff__linter__tests__B007_B007.py.snap rename to src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B007_B007.py.snap index fce08834d0..4c4da78829 100644 --- a/src/snapshots/ruff__linter__tests__B007_B007.py.snap +++ b/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B007_B007.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_bugbear/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__B008_B006_B008.py.snap b/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B008_B006_B008.py.snap similarity index 98% rename from src/snapshots/ruff__linter__tests__B008_B006_B008.py.snap rename to src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B008_B006_B008.py.snap index 75eef9cef2..ac2472bf3d 100644 --- a/src/snapshots/ruff__linter__tests__B008_B006_B008.py.snap +++ b/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B008_B006_B008.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_bugbear/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__B009_B009_B010.py.snap b/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B009_B009_B010.py.snap similarity index 97% rename from src/snapshots/ruff__linter__tests__B009_B009_B010.py.snap rename to src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B009_B009_B010.py.snap index 3b49ce9cca..8332cfbf89 100644 --- a/src/snapshots/ruff__linter__tests__B009_B009_B010.py.snap +++ b/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B009_B009_B010.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_bugbear/mod.rs expression: checks --- - kind: GetAttrWithConstant diff --git a/src/snapshots/ruff__linter__tests__B010_B009_B010.py.snap b/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B010_B009_B010.py.snap similarity index 97% rename from src/snapshots/ruff__linter__tests__B010_B009_B010.py.snap rename to src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B010_B009_B010.py.snap index 77aab517cf..56837bc121 100644 --- a/src/snapshots/ruff__linter__tests__B010_B009_B010.py.snap +++ b/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B010_B009_B010.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_bugbear/mod.rs expression: checks --- - kind: SetAttrWithConstant diff --git a/src/snapshots/ruff__linter__tests__B011_B011.py.snap b/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B011_B011.py.snap similarity index 94% rename from src/snapshots/ruff__linter__tests__B011_B011.py.snap rename to src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B011_B011.py.snap index 345d4ead78..14f86088f6 100644 --- a/src/snapshots/ruff__linter__tests__B011_B011.py.snap +++ b/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B011_B011.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_bugbear/mod.rs expression: checks --- - kind: DoNotAssertFalse diff --git a/src/snapshots/ruff__linter__tests__B012_B012.py.snap b/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B012_B012.py.snap similarity index 97% rename from src/snapshots/ruff__linter__tests__B012_B012.py.snap rename to src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B012_B012.py.snap index f6fa5e6661..48d43707af 100644 --- a/src/snapshots/ruff__linter__tests__B012_B012.py.snap +++ b/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B012_B012.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_bugbear/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__B013_B013.py.snap b/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B013_B013.py.snap similarity index 90% rename from src/snapshots/ruff__linter__tests__B013_B013.py.snap rename to src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B013_B013.py.snap index 74ee70f07d..8e279a3606 100644 --- a/src/snapshots/ruff__linter__tests__B013_B013.py.snap +++ b/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B013_B013.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_bugbear/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__B014_B014.py.snap b/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B014_B014.py.snap similarity index 96% rename from src/snapshots/ruff__linter__tests__B014_B014.py.snap rename to src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B014_B014.py.snap index aca787fbbd..8eec40c5c3 100644 --- a/src/snapshots/ruff__linter__tests__B014_B014.py.snap +++ b/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B014_B014.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_bugbear/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__B015_B015.py.snap b/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B015_B015.py.snap similarity index 93% rename from src/snapshots/ruff__linter__tests__B015_B015.py.snap rename to src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B015_B015.py.snap index a53a882843..6b7464922d 100644 --- a/src/snapshots/ruff__linter__tests__B015_B015.py.snap +++ b/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B015_B015.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_bugbear/mod.rs expression: checks --- - kind: UselessComparison diff --git a/src/snapshots/ruff__linter__tests__B016_B016.py.snap b/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B016_B016.py.snap similarity index 91% rename from src/snapshots/ruff__linter__tests__B016_B016.py.snap rename to src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B016_B016.py.snap index 0ca8862916..cb567e27ca 100644 --- a/src/snapshots/ruff__linter__tests__B016_B016.py.snap +++ b/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B016_B016.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_bugbear/mod.rs expression: checks --- - kind: CannotRaiseLiteral diff --git a/src/snapshots/ruff__linter__tests__B017_B017.py.snap b/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B017_B017.py.snap similarity index 81% rename from src/snapshots/ruff__linter__tests__B017_B017.py.snap rename to src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B017_B017.py.snap index 3a9fd8231b..5ec7446179 100644 --- a/src/snapshots/ruff__linter__tests__B017_B017.py.snap +++ b/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B017_B017.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_bugbear/mod.rs expression: checks --- - kind: NoAssertRaisesException diff --git a/src/snapshots/ruff__linter__tests__B018_B018.py.snap b/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B018_B018.py.snap similarity index 98% rename from src/snapshots/ruff__linter__tests__B018_B018.py.snap rename to src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B018_B018.py.snap index 78b0822227..951d0a3e3c 100644 --- a/src/snapshots/ruff__linter__tests__B018_B018.py.snap +++ b/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B018_B018.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_bugbear/mod.rs expression: checks --- - kind: UselessExpression diff --git a/src/snapshots/ruff__linter__tests__B019_B019.py.snap b/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B019_B019.py.snap similarity index 96% rename from src/snapshots/ruff__linter__tests__B019_B019.py.snap rename to src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B019_B019.py.snap index 7980a548ef..6a37d584ed 100644 --- a/src/snapshots/ruff__linter__tests__B019_B019.py.snap +++ b/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B019_B019.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_bugbear/mod.rs expression: checks --- - kind: CachedInstanceMethod diff --git a/src/snapshots/ruff__linter__tests__B020_B020.py.snap b/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B020_B020.py.snap similarity index 92% rename from src/snapshots/ruff__linter__tests__B020_B020.py.snap rename to src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B020_B020.py.snap index cce10096b4..9184870296 100644 --- a/src/snapshots/ruff__linter__tests__B020_B020.py.snap +++ b/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B020_B020.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_bugbear/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__B021_B021.py.snap b/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B021_B021.py.snap similarity index 97% rename from src/snapshots/ruff__linter__tests__B021_B021.py.snap rename to src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B021_B021.py.snap index 530fa68ef2..4658191e00 100644 --- a/src/snapshots/ruff__linter__tests__B021_B021.py.snap +++ b/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B021_B021.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_bugbear/mod.rs expression: checks --- - kind: FStringDocstring diff --git a/src/snapshots/ruff__linter__tests__B022_B022.py.snap b/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B022_B022.py.snap similarity index 88% rename from src/snapshots/ruff__linter__tests__B022_B022.py.snap rename to src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B022_B022.py.snap index b5411d4a3b..021c0528df 100644 --- a/src/snapshots/ruff__linter__tests__B022_B022.py.snap +++ b/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B022_B022.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.r +source: src/flake8_bugbear/mod.rs expression: checks --- - kind: UselessContextlibSuppress diff --git a/src/snapshots/ruff__linter__tests__B023_B023.py.snap b/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B023_B023.py.snap similarity index 98% rename from src/snapshots/ruff__linter__tests__B023_B023.py.snap rename to src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B023_B023.py.snap index ef65854d14..1a50d3fe47 100644 --- a/src/snapshots/ruff__linter__tests__B023_B023.py.snap +++ b/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B023_B023.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_bugbear/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__B024_B024.py.snap b/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B024_B024.py.snap similarity index 96% rename from src/snapshots/ruff__linter__tests__B024_B024.py.snap rename to src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B024_B024.py.snap index bca0dc11f1..8451771399 100644 --- a/src/snapshots/ruff__linter__tests__B024_B024.py.snap +++ b/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B024_B024.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_bugbear/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__B025_B025.py.snap b/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B025_B025.py.snap similarity index 94% rename from src/snapshots/ruff__linter__tests__B025_B025.py.snap rename to src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B025_B025.py.snap index 90d9c4b735..be90998ede 100644 --- a/src/snapshots/ruff__linter__tests__B025_B025.py.snap +++ b/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B025_B025.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_bugbear/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__B026_B026.py.snap b/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B026_B026.py.snap similarity index 96% rename from src/snapshots/ruff__linter__tests__B026_B026.py.snap rename to src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B026_B026.py.snap index 6b7c8dc5de..964a63c737 100644 --- a/src/snapshots/ruff__linter__tests__B026_B026.py.snap +++ b/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B026_B026.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_bugbear/mod.rs expression: checks --- - kind: StarArgUnpackingAfterKeywordArg diff --git a/src/snapshots/ruff__linter__tests__B027_B027.py.snap b/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B027_B027.py.snap similarity index 94% rename from src/snapshots/ruff__linter__tests__B027_B027.py.snap rename to src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B027_B027.py.snap index a00e9be5f1..0fda95cf22 100644 --- a/src/snapshots/ruff__linter__tests__B027_B027.py.snap +++ b/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B027_B027.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_bugbear/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__B904_B904.py.snap b/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B904_B904.py.snap similarity index 92% rename from src/snapshots/ruff__linter__tests__B904_B904.py.snap rename to src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B904_B904.py.snap index 8dcad29d9d..15b599fff9 100644 --- a/src/snapshots/ruff__linter__tests__B904_B904.py.snap +++ b/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B904_B904.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_bugbear/mod.rs expression: checks --- - kind: RaiseWithoutFromInsideExcept diff --git a/src/flake8_builtins/mod.rs b/src/flake8_builtins/mod.rs index 62a8881c0e..c4767898e4 100644 --- a/src/flake8_builtins/mod.rs +++ b/src/flake8_builtins/mod.rs @@ -1,2 +1,32 @@ pub mod checks; pub mod types; + +#[cfg(test)] +mod tests { + use std::convert::AsRef; + use std::path::Path; + + use anyhow::Result; + use test_case::test_case; + + use crate::checks::CheckCode; + use crate::linter::test_path; + use crate::settings; + + #[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")] + fn checks(check_code: CheckCode, path: &Path) -> Result<()> { + let snapshot = format!("{}_{}", check_code.as_ref(), path.to_string_lossy()); + let mut checks = test_path( + Path::new("./resources/test/fixtures/flake8_builtins") + .join(path) + .as_path(), + &settings::Settings::for_rule(check_code), + true, + )?; + checks.sort_by_key(|check| check.location); + insta::assert_yaml_snapshot!(snapshot, checks); + Ok(()) + } +} diff --git a/src/snapshots/ruff__linter__tests__A001_A001.py.snap b/src/flake8_builtins/snapshots/ruff__flake8_builtins__tests__A001_A001.py.snap similarity index 98% rename from src/snapshots/ruff__linter__tests__A001_A001.py.snap rename to src/flake8_builtins/snapshots/ruff__flake8_builtins__tests__A001_A001.py.snap index 31fe5db192..4f52ffcc5b 100644 --- a/src/snapshots/ruff__linter__tests__A001_A001.py.snap +++ b/src/flake8_builtins/snapshots/ruff__flake8_builtins__tests__A001_A001.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_builtins/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__A002_A002.py.snap b/src/flake8_builtins/snapshots/ruff__flake8_builtins__tests__A002_A002.py.snap similarity index 96% rename from src/snapshots/ruff__linter__tests__A002_A002.py.snap rename to src/flake8_builtins/snapshots/ruff__flake8_builtins__tests__A002_A002.py.snap index 3f939e4c9d..0dfff82d4c 100644 --- a/src/snapshots/ruff__linter__tests__A002_A002.py.snap +++ b/src/flake8_builtins/snapshots/ruff__flake8_builtins__tests__A002_A002.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_builtins/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__A003_A003.py.snap b/src/flake8_builtins/snapshots/ruff__flake8_builtins__tests__A003_A003.py.snap similarity index 89% rename from src/snapshots/ruff__linter__tests__A003_A003.py.snap rename to src/flake8_builtins/snapshots/ruff__flake8_builtins__tests__A003_A003.py.snap index 4dbb9d17fa..e7e24a367a 100644 --- a/src/snapshots/ruff__linter__tests__A003_A003.py.snap +++ b/src/flake8_builtins/snapshots/ruff__flake8_builtins__tests__A003_A003.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_builtins/mod.rs expression: checks --- - kind: diff --git a/src/flake8_comprehensions/mod.rs b/src/flake8_comprehensions/mod.rs index 0f6dbc1b70..ceb7c72c46 100644 --- a/src/flake8_comprehensions/mod.rs +++ b/src/flake8_comprehensions/mod.rs @@ -1,2 +1,46 @@ pub mod checks; mod fixes; + +#[cfg(test)] +mod tests { + use std::convert::AsRef; + use std::path::Path; + + use anyhow::Result; + use test_case::test_case; + + use crate::checks::CheckCode; + use crate::linter::test_path; + use crate::settings; + + #[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::C417, Path::new("C417.py"); "C417")] + + fn checks(check_code: CheckCode, path: &Path) -> Result<()> { + let snapshot = format!("{}_{}", check_code.as_ref(), path.to_string_lossy()); + let mut checks = test_path( + Path::new("./resources/test/fixtures/flake8_comprehensions") + .join(path) + .as_path(), + &settings::Settings::for_rule(check_code), + true, + )?; + checks.sort_by_key(|check| check.location); + insta::assert_yaml_snapshot!(snapshot, checks); + Ok(()) + } +} diff --git a/src/snapshots/ruff__linter__tests__C400_C400.py.snap b/src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C400_C400.py.snap similarity index 93% rename from src/snapshots/ruff__linter__tests__C400_C400.py.snap rename to src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C400_C400.py.snap index 3ee17658fd..0261badeea 100644 --- a/src/snapshots/ruff__linter__tests__C400_C400.py.snap +++ b/src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C400_C400.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_comprehensions/mod.rs expression: checks --- - kind: UnnecessaryGeneratorList diff --git a/src/snapshots/ruff__linter__tests__C401_C401.py.snap b/src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C401_C401.py.snap similarity index 93% rename from src/snapshots/ruff__linter__tests__C401_C401.py.snap rename to src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C401_C401.py.snap index 560cb1077a..ba7b007ffe 100644 --- a/src/snapshots/ruff__linter__tests__C401_C401.py.snap +++ b/src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C401_C401.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_comprehensions/mod.rs expression: checks --- - kind: UnnecessaryGeneratorSet diff --git a/src/snapshots/ruff__linter__tests__C402_C402.py.snap b/src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C402_C402.py.snap similarity index 93% rename from src/snapshots/ruff__linter__tests__C402_C402.py.snap rename to src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C402_C402.py.snap index e44102a03a..ea0bdf3ee9 100644 --- a/src/snapshots/ruff__linter__tests__C402_C402.py.snap +++ b/src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C402_C402.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_comprehensions/mod.rs expression: checks --- - kind: UnnecessaryGeneratorDict diff --git a/src/snapshots/ruff__linter__tests__C403_C403.py.snap b/src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C403_C403.py.snap similarity index 93% rename from src/snapshots/ruff__linter__tests__C403_C403.py.snap rename to src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C403_C403.py.snap index a624f32aef..1829c23225 100644 --- a/src/snapshots/ruff__linter__tests__C403_C403.py.snap +++ b/src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C403_C403.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_comprehensions/mod.rs expression: checks --- - kind: UnnecessaryListComprehensionSet diff --git a/src/snapshots/ruff__linter__tests__C404_C404.py.snap b/src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C404_C404.py.snap similarity index 88% rename from src/snapshots/ruff__linter__tests__C404_C404.py.snap rename to src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C404_C404.py.snap index bf79c2754e..dfef6434da 100644 --- a/src/snapshots/ruff__linter__tests__C404_C404.py.snap +++ b/src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C404_C404.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_comprehensions/mod.rs expression: checks --- - kind: UnnecessaryListComprehensionDict diff --git a/src/snapshots/ruff__linter__tests__C405_C405.py.snap b/src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C405_C405.py.snap similarity index 96% rename from src/snapshots/ruff__linter__tests__C405_C405.py.snap rename to src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C405_C405.py.snap index 0b36737d50..0c32029dbe 100644 --- a/src/snapshots/ruff__linter__tests__C405_C405.py.snap +++ b/src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C405_C405.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_comprehensions/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__C406_C406.py.snap b/src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C406_C406.py.snap similarity index 96% rename from src/snapshots/ruff__linter__tests__C406_C406.py.snap rename to src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C406_C406.py.snap index 8922567d36..6ddc9dd728 100644 --- a/src/snapshots/ruff__linter__tests__C406_C406.py.snap +++ b/src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C406_C406.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_comprehensions/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__C408_C408.py.snap b/src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C408_C408.py.snap similarity index 96% rename from src/snapshots/ruff__linter__tests__C408_C408.py.snap rename to src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C408_C408.py.snap index 5708cb7aa9..8410fc240a 100644 --- a/src/snapshots/ruff__linter__tests__C408_C408.py.snap +++ b/src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C408_C408.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_comprehensions/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__C409_C409.py.snap b/src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C409_C409.py.snap similarity index 97% rename from src/snapshots/ruff__linter__tests__C409_C409.py.snap rename to src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C409_C409.py.snap index ba01e2050e..446ab288ad 100644 --- a/src/snapshots/ruff__linter__tests__C409_C409.py.snap +++ b/src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C409_C409.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_comprehensions/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__C410_C410.py.snap b/src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C410_C410.py.snap similarity index 96% rename from src/snapshots/ruff__linter__tests__C410_C410.py.snap rename to src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C410_C410.py.snap index 5672fab07f..1ba8f4ae79 100644 --- a/src/snapshots/ruff__linter__tests__C410_C410.py.snap +++ b/src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C410_C410.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_comprehensions/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__C411_C411.py.snap b/src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C411_C411.py.snap similarity index 87% rename from src/snapshots/ruff__linter__tests__C411_C411.py.snap rename to src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C411_C411.py.snap index e4dfa154ef..ea46a669ea 100644 --- a/src/snapshots/ruff__linter__tests__C411_C411.py.snap +++ b/src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C411_C411.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_comprehensions/mod.rs expression: checks --- - kind: UnnecessaryListCall diff --git a/src/snapshots/ruff__linter__tests__C413_C413.py.snap b/src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C413_C413.py.snap similarity index 96% rename from src/snapshots/ruff__linter__tests__C413_C413.py.snap rename to src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C413_C413.py.snap index 385ac80e86..93e0cf215a 100644 --- a/src/snapshots/ruff__linter__tests__C413_C413.py.snap +++ b/src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C413_C413.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_comprehensions/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__C414_C414.py.snap b/src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C414_C414.py.snap similarity index 98% rename from src/snapshots/ruff__linter__tests__C414_C414.py.snap rename to src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C414_C414.py.snap index a2fa2227ed..a25d532fef 100644 --- a/src/snapshots/ruff__linter__tests__C414_C414.py.snap +++ b/src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C414_C414.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_comprehensions/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__C415_C415.py.snap b/src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C415_C415.py.snap similarity index 93% rename from src/snapshots/ruff__linter__tests__C415_C415.py.snap rename to src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C415_C415.py.snap index e3e3dec86c..6fd19c953d 100644 --- a/src/snapshots/ruff__linter__tests__C415_C415.py.snap +++ b/src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C415_C415.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_comprehensions/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__C416_C416.py.snap b/src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C416_C416.py.snap similarity index 93% rename from src/snapshots/ruff__linter__tests__C416_C416.py.snap rename to src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C416_C416.py.snap index fd6e0c2179..71f2c38471 100644 --- a/src/snapshots/ruff__linter__tests__C416_C416.py.snap +++ b/src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C416_C416.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_comprehensions/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__C417_C417.py.snap b/src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C417_C417.py.snap similarity index 96% rename from src/snapshots/ruff__linter__tests__C417_C417.py.snap rename to src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C417_C417.py.snap index bd5d044cfc..140111a92c 100644 --- a/src/snapshots/ruff__linter__tests__C417_C417.py.snap +++ b/src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C417_C417.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_comprehensions/mod.rs expression: checks --- - kind: diff --git a/src/flake8_print/mod.rs b/src/flake8_print/mod.rs index a6dbe125cb..3c19482db2 100644 --- a/src/flake8_print/mod.rs +++ b/src/flake8_print/mod.rs @@ -1,2 +1,32 @@ mod checks; pub mod plugins; + +#[cfg(test)] +mod tests { + use std::convert::AsRef; + use std::path::Path; + + use anyhow::Result; + use test_case::test_case; + + use crate::checks::CheckCode; + use crate::linter::test_path; + use crate::settings; + + #[test_case(CheckCode::T100, Path::new("T100.py"); "T100")] + #[test_case(CheckCode::T201, Path::new("T201.py"); "T201")] + #[test_case(CheckCode::T203, Path::new("T203.py"); "T203")] + fn checks(check_code: CheckCode, path: &Path) -> Result<()> { + let snapshot = format!("{}_{}", check_code.as_ref(), path.to_string_lossy()); + let mut checks = test_path( + Path::new("./resources/test/fixtures/flake8_print") + .join(path) + .as_path(), + &settings::Settings::for_rule(check_code), + true, + )?; + checks.sort_by_key(|check| check.location); + insta::assert_yaml_snapshot!(snapshot, checks); + Ok(()) + } +} diff --git a/src/snapshots/ruff__linter__tests__T100_T100.py.snap b/src/flake8_print/snapshots/ruff__flake8_print__tests__T100_T100.py.snap similarity index 97% rename from src/snapshots/ruff__linter__tests__T100_T100.py.snap rename to src/flake8_print/snapshots/ruff__flake8_print__tests__T100_T100.py.snap index df82b6ca3d..25bb47b4a3 100644 --- a/src/snapshots/ruff__linter__tests__T100_T100.py.snap +++ b/src/flake8_print/snapshots/ruff__flake8_print__tests__T100_T100.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_print/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__T201_T201.py.snap b/src/flake8_print/snapshots/ruff__flake8_print__tests__T201_T201.py.snap similarity index 89% rename from src/snapshots/ruff__linter__tests__T201_T201.py.snap rename to src/flake8_print/snapshots/ruff__flake8_print__tests__T201_T201.py.snap index f0229e8424..8e0233ecfa 100644 --- a/src/snapshots/ruff__linter__tests__T201_T201.py.snap +++ b/src/flake8_print/snapshots/ruff__flake8_print__tests__T201_T201.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_print/mod.rs expression: checks --- - kind: PrintFound diff --git a/src/snapshots/ruff__linter__tests__T203_T203.py.snap b/src/flake8_print/snapshots/ruff__flake8_print__tests__T203_T203.py.snap similarity index 94% rename from src/snapshots/ruff__linter__tests__T203_T203.py.snap rename to src/flake8_print/snapshots/ruff__flake8_print__tests__T203_T203.py.snap index b262e92841..e67734dc58 100644 --- a/src/snapshots/ruff__linter__tests__T203_T203.py.snap +++ b/src/flake8_print/snapshots/ruff__flake8_print__tests__T203_T203.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/flake8_print/mod.rs expression: checks --- - kind: PPrintFound diff --git a/src/flake8_tidy_imports/mod.rs b/src/flake8_tidy_imports/mod.rs index 2501876834..f15f33e491 100644 --- a/src/flake8_tidy_imports/mod.rs +++ b/src/flake8_tidy_imports/mod.rs @@ -15,7 +15,7 @@ mod tests { #[test] fn ban_parent_imports() -> Result<()> { let mut checks = test_path( - Path::new("./resources/test/fixtures/I252.py"), + Path::new("./resources/test/fixtures/flake8_tidy_imports/I252.py"), &Settings { flake8_tidy_imports: flake8_tidy_imports::settings::Settings { ban_relative_imports: Strictness::Parents, @@ -32,7 +32,7 @@ mod tests { #[test] fn ban_all_imports() -> Result<()> { let mut checks = test_path( - Path::new("./resources/test/fixtures/I252.py"), + Path::new("./resources/test/fixtures/flake8_tidy_imports/I252.py"), &Settings { flake8_tidy_imports: flake8_tidy_imports::settings::Settings { ban_relative_imports: Strictness::All, diff --git a/src/linter.rs b/src/linter.rs index 831333df42..c8f5eaee5b 100644 --- a/src/linter.rs +++ b/src/linter.rs @@ -392,374 +392,3 @@ pub fn test_path(path: &Path, settings: &Settings, autofix: bool) -> Result Result<()> { - let snapshot = format!("{}_{}", check_code.as_ref(), path.to_string_lossy()); - let mut checks = test_path( - Path::new("./resources/test/fixtures").join(path).as_path(), - &settings::Settings::for_rule(check_code), - true, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(snapshot, checks); - Ok(()) - } - - #[test] - fn f841_dummy_variable_rgx() -> Result<()> { - let mut checks = test_path( - Path::new("./resources/test/fixtures/F841.py"), - &settings::Settings { - dummy_variable_rgx: Regex::new(r"^z$").unwrap(), - ..settings::Settings::for_rule(CheckCode::F841) - }, - true, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn m001() -> Result<()> { - let mut checks = test_path( - Path::new("./resources/test/fixtures/M001.py"), - &settings::Settings::for_rules(vec![CheckCode::M001, CheckCode::E501, CheckCode::F841]), - true, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn init() -> Result<()> { - let mut checks = test_path( - Path::new("./resources/test/fixtures/__init__.py"), - &settings::Settings::for_rules(vec![CheckCode::F821, CheckCode::F822]), - true, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn future_annotations() -> Result<()> { - let mut checks = test_path( - Path::new("./resources/test/fixtures/future_annotations.py"), - &settings::Settings::for_rules(vec![CheckCode::F401, CheckCode::F821]), - true, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn future_annotations_pep_585_p37() -> Result<()> { - let mut checks = test_path( - Path::new("./resources/test/fixtures/future_annotations.py"), - &settings::Settings { - target_version: PythonVersion::Py37, - ..settings::Settings::for_rule(CheckCode::U006) - }, - true, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn future_annotations_pep_585_py310() -> Result<()> { - let mut checks = test_path( - Path::new("./resources/test/fixtures/future_annotations.py"), - &settings::Settings { - target_version: PythonVersion::Py310, - ..settings::Settings::for_rule(CheckCode::U006) - }, - true, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn future_annotations_pep_604_p37() -> Result<()> { - let mut checks = test_path( - Path::new("./resources/test/fixtures/future_annotations.py"), - &settings::Settings { - target_version: PythonVersion::Py37, - ..settings::Settings::for_rule(CheckCode::U007) - }, - true, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } - - #[test] - fn future_annotations_pep_604_py310() -> Result<()> { - let mut checks = test_path( - Path::new("./resources/test/fixtures/future_annotations.py"), - &settings::Settings { - target_version: PythonVersion::Py310, - ..settings::Settings::for_rule(CheckCode::U007) - }, - true, - )?; - checks.sort_by_key(|check| check.location); - insta::assert_yaml_snapshot!(checks); - Ok(()) - } -} diff --git a/src/mccabe/mod.rs b/src/mccabe/mod.rs index 517b13e4db..f414a5c13e 100644 --- a/src/mccabe/mod.rs +++ b/src/mccabe/mod.rs @@ -18,7 +18,7 @@ mod tests { fn max_complexity_zero(max_complexity: usize) -> Result<()> { let snapshot = format!("max_complexity_{max_complexity}"); let mut checks = test_path( - Path::new("./resources/test/fixtures/C901.py"), + Path::new("./resources/test/fixtures/mccabe/C901.py"), &Settings { mccabe: mccabe::settings::Settings { max_complexity }, ..Settings::for_rules(vec![CheckCode::C901]) diff --git a/src/pep8_naming/mod.rs b/src/pep8_naming/mod.rs index 3708822895..bbfd0bf6d3 100644 --- a/src/pep8_naming/mod.rs +++ b/src/pep8_naming/mod.rs @@ -2,3 +2,45 @@ pub mod checks; mod helpers; pub mod plugins; pub mod settings; + +#[cfg(test)] +mod tests { + use std::convert::AsRef; + use std::path::Path; + + use anyhow::Result; + use test_case::test_case; + + use crate::checks::CheckCode; + use crate::linter::test_path; + use crate::settings; + + #[test_case(CheckCode::N801, Path::new("N801.py"); "N801")] + #[test_case(CheckCode::N802, Path::new("N802.py"); "N802")] + #[test_case(CheckCode::N803, Path::new("N803.py"); "N803")] + #[test_case(CheckCode::N804, Path::new("N804.py"); "N804")] + #[test_case(CheckCode::N805, Path::new("N805.py"); "N805")] + #[test_case(CheckCode::N806, Path::new("N806.py"); "N806")] + #[test_case(CheckCode::N807, Path::new("N807.py"); "N807")] + #[test_case(CheckCode::N811, Path::new("N811.py"); "N811")] + #[test_case(CheckCode::N812, Path::new("N812.py"); "N812")] + #[test_case(CheckCode::N813, Path::new("N813.py"); "N813")] + #[test_case(CheckCode::N814, Path::new("N814.py"); "N814")] + #[test_case(CheckCode::N815, Path::new("N815.py"); "N815")] + #[test_case(CheckCode::N816, Path::new("N816.py"); "N816")] + #[test_case(CheckCode::N817, Path::new("N817.py"); "N817")] + #[test_case(CheckCode::N818, Path::new("N818.py"); "N818")] + fn checks(check_code: CheckCode, path: &Path) -> Result<()> { + let snapshot = format!("{}_{}", check_code.as_ref(), path.to_string_lossy()); + let mut checks = test_path( + Path::new("./resources/test/fixtures/pep8_naming") + .join(path) + .as_path(), + &settings::Settings::for_rule(check_code), + true, + )?; + checks.sort_by_key(|check| check.location); + insta::assert_yaml_snapshot!(snapshot, checks); + Ok(()) + } +} diff --git a/src/snapshots/ruff__linter__tests__N801_N801.py.snap b/src/pep8_naming/snapshots/ruff__pep8_naming__tests__N801_N801.py.snap similarity index 95% rename from src/snapshots/ruff__linter__tests__N801_N801.py.snap rename to src/pep8_naming/snapshots/ruff__pep8_naming__tests__N801_N801.py.snap index f2396882b4..aec2aa7a6b 100644 --- a/src/snapshots/ruff__linter__tests__N801_N801.py.snap +++ b/src/pep8_naming/snapshots/ruff__pep8_naming__tests__N801_N801.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pep8_naming/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__N802_N802.py.snap b/src/pep8_naming/snapshots/ruff__pep8_naming__tests__N802_N802.py.snap similarity index 95% rename from src/snapshots/ruff__linter__tests__N802_N802.py.snap rename to src/pep8_naming/snapshots/ruff__pep8_naming__tests__N802_N802.py.snap index 50ed5b580a..21c21a75ec 100644 --- a/src/snapshots/ruff__linter__tests__N802_N802.py.snap +++ b/src/pep8_naming/snapshots/ruff__pep8_naming__tests__N802_N802.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pep8_naming/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__N803_N803.py.snap b/src/pep8_naming/snapshots/ruff__pep8_naming__tests__N803_N803.py.snap similarity index 89% rename from src/snapshots/ruff__linter__tests__N803_N803.py.snap rename to src/pep8_naming/snapshots/ruff__pep8_naming__tests__N803_N803.py.snap index 52b959cbf3..1206c01577 100644 --- a/src/snapshots/ruff__linter__tests__N803_N803.py.snap +++ b/src/pep8_naming/snapshots/ruff__pep8_naming__tests__N803_N803.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pep8_naming/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__N804_N804.py.snap b/src/pep8_naming/snapshots/ruff__pep8_naming__tests__N804_N804.py.snap similarity index 93% rename from src/snapshots/ruff__linter__tests__N804_N804.py.snap rename to src/pep8_naming/snapshots/ruff__pep8_naming__tests__N804_N804.py.snap index 9e9f45548c..923968048a 100644 --- a/src/snapshots/ruff__linter__tests__N804_N804.py.snap +++ b/src/pep8_naming/snapshots/ruff__pep8_naming__tests__N804_N804.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pep8_naming/mod.rs expression: checks --- - kind: InvalidFirstArgumentNameForClassMethod diff --git a/src/snapshots/ruff__linter__tests__N805_N805.py.snap b/src/pep8_naming/snapshots/ruff__pep8_naming__tests__N805_N805.py.snap similarity index 94% rename from src/snapshots/ruff__linter__tests__N805_N805.py.snap rename to src/pep8_naming/snapshots/ruff__pep8_naming__tests__N805_N805.py.snap index bbda120516..9fccbc7ec1 100644 --- a/src/snapshots/ruff__linter__tests__N805_N805.py.snap +++ b/src/pep8_naming/snapshots/ruff__pep8_naming__tests__N805_N805.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pep8_naming/mod.rs expression: checks --- - kind: InvalidFirstArgumentNameForMethod diff --git a/src/snapshots/ruff__linter__tests__N806_N806.py.snap b/src/pep8_naming/snapshots/ruff__pep8_naming__tests__N806_N806.py.snap similarity index 90% rename from src/snapshots/ruff__linter__tests__N806_N806.py.snap rename to src/pep8_naming/snapshots/ruff__pep8_naming__tests__N806_N806.py.snap index e6e8725df4..2a282271c0 100644 --- a/src/snapshots/ruff__linter__tests__N806_N806.py.snap +++ b/src/pep8_naming/snapshots/ruff__pep8_naming__tests__N806_N806.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pep8_naming/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__N807_N807.py.snap b/src/pep8_naming/snapshots/ruff__pep8_naming__tests__N807_N807.py.snap similarity index 89% rename from src/snapshots/ruff__linter__tests__N807_N807.py.snap rename to src/pep8_naming/snapshots/ruff__pep8_naming__tests__N807_N807.py.snap index 5805c2506a..c82bcd809e 100644 --- a/src/snapshots/ruff__linter__tests__N807_N807.py.snap +++ b/src/pep8_naming/snapshots/ruff__pep8_naming__tests__N807_N807.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pep8_naming/mod.rs expression: checks --- - kind: DunderFunctionName diff --git a/src/snapshots/ruff__linter__tests__N811_N811.py.snap b/src/pep8_naming/snapshots/ruff__pep8_naming__tests__N811_N811.py.snap similarity index 94% rename from src/snapshots/ruff__linter__tests__N811_N811.py.snap rename to src/pep8_naming/snapshots/ruff__pep8_naming__tests__N811_N811.py.snap index 11e9d09847..364dfa61ce 100644 --- a/src/snapshots/ruff__linter__tests__N811_N811.py.snap +++ b/src/pep8_naming/snapshots/ruff__pep8_naming__tests__N811_N811.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pep8_naming/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__N812_N812.py.snap b/src/pep8_naming/snapshots/ruff__pep8_naming__tests__N812_N812.py.snap similarity index 94% rename from src/snapshots/ruff__linter__tests__N812_N812.py.snap rename to src/pep8_naming/snapshots/ruff__pep8_naming__tests__N812_N812.py.snap index 6843902042..522df3006f 100644 --- a/src/snapshots/ruff__linter__tests__N812_N812.py.snap +++ b/src/pep8_naming/snapshots/ruff__pep8_naming__tests__N812_N812.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pep8_naming/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__N813_N813.py.snap b/src/pep8_naming/snapshots/ruff__pep8_naming__tests__N813_N813.py.snap similarity index 94% rename from src/snapshots/ruff__linter__tests__N813_N813.py.snap rename to src/pep8_naming/snapshots/ruff__pep8_naming__tests__N813_N813.py.snap index d98c931a27..a620e3e420 100644 --- a/src/snapshots/ruff__linter__tests__N813_N813.py.snap +++ b/src/pep8_naming/snapshots/ruff__pep8_naming__tests__N813_N813.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pep8_naming/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__N814_N814.py.snap b/src/pep8_naming/snapshots/ruff__pep8_naming__tests__N814_N814.py.snap similarity index 94% rename from src/snapshots/ruff__linter__tests__N814_N814.py.snap rename to src/pep8_naming/snapshots/ruff__pep8_naming__tests__N814_N814.py.snap index aaa74bb993..caad0f0663 100644 --- a/src/snapshots/ruff__linter__tests__N814_N814.py.snap +++ b/src/pep8_naming/snapshots/ruff__pep8_naming__tests__N814_N814.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pep8_naming/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__N815_N815.py.snap b/src/pep8_naming/snapshots/ruff__pep8_naming__tests__N815_N815.py.snap similarity index 93% rename from src/snapshots/ruff__linter__tests__N815_N815.py.snap rename to src/pep8_naming/snapshots/ruff__pep8_naming__tests__N815_N815.py.snap index 8da0b6d9ea..0e420b071a 100644 --- a/src/snapshots/ruff__linter__tests__N815_N815.py.snap +++ b/src/pep8_naming/snapshots/ruff__pep8_naming__tests__N815_N815.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pep8_naming/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__N816_N816.py.snap b/src/pep8_naming/snapshots/ruff__pep8_naming__tests__N816_N816.py.snap similarity index 93% rename from src/snapshots/ruff__linter__tests__N816_N816.py.snap rename to src/pep8_naming/snapshots/ruff__pep8_naming__tests__N816_N816.py.snap index 1615a63550..53ffb9f0cf 100644 --- a/src/snapshots/ruff__linter__tests__N816_N816.py.snap +++ b/src/pep8_naming/snapshots/ruff__pep8_naming__tests__N816_N816.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pep8_naming/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__N817_N817.py.snap b/src/pep8_naming/snapshots/ruff__pep8_naming__tests__N817_N817.py.snap similarity index 91% rename from src/snapshots/ruff__linter__tests__N817_N817.py.snap rename to src/pep8_naming/snapshots/ruff__pep8_naming__tests__N817_N817.py.snap index 5257f2e424..2b0e78da35 100644 --- a/src/snapshots/ruff__linter__tests__N817_N817.py.snap +++ b/src/pep8_naming/snapshots/ruff__pep8_naming__tests__N817_N817.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pep8_naming/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__N818_N818.py.snap b/src/pep8_naming/snapshots/ruff__pep8_naming__tests__N818_N818.py.snap similarity index 90% rename from src/snapshots/ruff__linter__tests__N818_N818.py.snap rename to src/pep8_naming/snapshots/ruff__pep8_naming__tests__N818_N818.py.snap index 3eadb42f47..30d7dde13f 100644 --- a/src/snapshots/ruff__linter__tests__N818_N818.py.snap +++ b/src/pep8_naming/snapshots/ruff__pep8_naming__tests__N818_N818.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pep8_naming/mod.rs expression: checks --- - kind: diff --git a/src/pycodestyle/mod.rs b/src/pycodestyle/mod.rs index 6cab51a666..332967b123 100644 --- a/src/pycodestyle/mod.rs +++ b/src/pycodestyle/mod.rs @@ -1,2 +1,47 @@ pub mod checks; pub mod plugins; + +#[cfg(test)] +mod tests { + use std::convert::AsRef; + use std::path::Path; + + use anyhow::Result; + use test_case::test_case; + + use crate::checks::CheckCode; + use crate::linter::test_path; + use crate::settings; + + #[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::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")] + #[test_case(CheckCode::W605, Path::new("W605_0.py"); "W605_0")] + #[test_case(CheckCode::W605, Path::new("W605_1.py"); "W605_1")] + fn checks(check_code: CheckCode, path: &Path) -> Result<()> { + let snapshot = format!("{}_{}", check_code.as_ref(), path.to_string_lossy()); + let mut checks = test_path( + Path::new("./resources/test/fixtures/pycodestyle") + .join(path) + .as_path(), + &settings::Settings::for_rule(check_code), + true, + )?; + checks.sort_by_key(|check| check.location); + insta::assert_yaml_snapshot!(snapshot, checks); + Ok(()) + } +} diff --git a/src/snapshots/ruff__linter__tests__E402_E402.py.snap b/src/pycodestyle/snapshots/ruff__pycodestyle__tests__E402_E402.py.snap similarity index 83% rename from src/snapshots/ruff__linter__tests__E402_E402.py.snap rename to src/pycodestyle/snapshots/ruff__pycodestyle__tests__E402_E402.py.snap index 60c078802a..b15e4a1daf 100644 --- a/src/snapshots/ruff__linter__tests__E402_E402.py.snap +++ b/src/pycodestyle/snapshots/ruff__pycodestyle__tests__E402_E402.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pycodestyle/mod.rs expression: checks --- - kind: ModuleImportNotAtTopOfFile diff --git a/src/snapshots/ruff__linter__tests__E501_E501.py.snap b/src/pycodestyle/snapshots/ruff__pycodestyle__tests__E501_E501.py.snap similarity index 94% rename from src/snapshots/ruff__linter__tests__E501_E501.py.snap rename to src/pycodestyle/snapshots/ruff__pycodestyle__tests__E501_E501.py.snap index fc48cd87fc..c118717025 100644 --- a/src/snapshots/ruff__linter__tests__E501_E501.py.snap +++ b/src/pycodestyle/snapshots/ruff__pycodestyle__tests__E501_E501.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pycodestyle/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__E711_E711.py.snap b/src/pycodestyle/snapshots/ruff__pycodestyle__tests__E711_E711.py.snap similarity index 98% rename from src/snapshots/ruff__linter__tests__E711_E711.py.snap rename to src/pycodestyle/snapshots/ruff__pycodestyle__tests__E711_E711.py.snap index bc1d75cc18..475603d128 100644 --- a/src/snapshots/ruff__linter__tests__E711_E711.py.snap +++ b/src/pycodestyle/snapshots/ruff__pycodestyle__tests__E711_E711.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pycodestyle/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__E712_E712.py.snap b/src/pycodestyle/snapshots/ruff__pycodestyle__tests__E712_E712.py.snap similarity index 99% rename from src/snapshots/ruff__linter__tests__E712_E712.py.snap rename to src/pycodestyle/snapshots/ruff__pycodestyle__tests__E712_E712.py.snap index f14588e0b6..863cc63da2 100644 --- a/src/snapshots/ruff__linter__tests__E712_E712.py.snap +++ b/src/pycodestyle/snapshots/ruff__pycodestyle__tests__E712_E712.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pycodestyle/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__E713_E713.py.snap b/src/pycodestyle/snapshots/ruff__pycodestyle__tests__E713_E713.py.snap similarity index 97% rename from src/snapshots/ruff__linter__tests__E713_E713.py.snap rename to src/pycodestyle/snapshots/ruff__pycodestyle__tests__E713_E713.py.snap index 39f0fb717a..a2bc02b2dc 100644 --- a/src/snapshots/ruff__linter__tests__E713_E713.py.snap +++ b/src/pycodestyle/snapshots/ruff__pycodestyle__tests__E713_E713.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pycodestyle/mod.rs expression: checks --- - kind: NotInTest diff --git a/src/snapshots/ruff__linter__tests__E714_E714.py.snap b/src/pycodestyle/snapshots/ruff__pycodestyle__tests__E714_E714.py.snap similarity index 95% rename from src/snapshots/ruff__linter__tests__E714_E714.py.snap rename to src/pycodestyle/snapshots/ruff__pycodestyle__tests__E714_E714.py.snap index 2078f71c33..557fefa842 100644 --- a/src/snapshots/ruff__linter__tests__E714_E714.py.snap +++ b/src/pycodestyle/snapshots/ruff__pycodestyle__tests__E714_E714.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pycodestyle/mod.rs expression: checks --- - kind: NotIsTest diff --git a/src/snapshots/ruff__linter__tests__E721_E721.py.snap b/src/pycodestyle/snapshots/ruff__pycodestyle__tests__E721_E721.py.snap similarity index 98% rename from src/snapshots/ruff__linter__tests__E721_E721.py.snap rename to src/pycodestyle/snapshots/ruff__pycodestyle__tests__E721_E721.py.snap index 1eeca2db2c..969af13bda 100644 --- a/src/snapshots/ruff__linter__tests__E721_E721.py.snap +++ b/src/pycodestyle/snapshots/ruff__pycodestyle__tests__E721_E721.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pycodestyle/mod.rs expression: checks --- - kind: TypeComparison diff --git a/src/snapshots/ruff__linter__tests__E722_E722.py.snap b/src/pycodestyle/snapshots/ruff__pycodestyle__tests__E722_E722.py.snap similarity index 92% rename from src/snapshots/ruff__linter__tests__E722_E722.py.snap rename to src/pycodestyle/snapshots/ruff__pycodestyle__tests__E722_E722.py.snap index a074be6bb3..b2eab00f58 100644 --- a/src/snapshots/ruff__linter__tests__E722_E722.py.snap +++ b/src/pycodestyle/snapshots/ruff__pycodestyle__tests__E722_E722.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pycodestyle/mod.rs expression: checks --- - kind: DoNotUseBareExcept diff --git a/src/snapshots/ruff__linter__tests__E731_E731.py.snap b/src/pycodestyle/snapshots/ruff__pycodestyle__tests__E731_E731.py.snap similarity index 96% rename from src/snapshots/ruff__linter__tests__E731_E731.py.snap rename to src/pycodestyle/snapshots/ruff__pycodestyle__tests__E731_E731.py.snap index 23ac8d42d3..7d2c5834df 100644 --- a/src/snapshots/ruff__linter__tests__E731_E731.py.snap +++ b/src/pycodestyle/snapshots/ruff__pycodestyle__tests__E731_E731.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pycodestyle/mod.rs expression: checks --- - kind: DoNotAssignLambda diff --git a/src/snapshots/ruff__linter__tests__E741_E741.py.snap b/src/pycodestyle/snapshots/ruff__pycodestyle__tests__E741_E741.py.snap similarity index 99% rename from src/snapshots/ruff__linter__tests__E741_E741.py.snap rename to src/pycodestyle/snapshots/ruff__pycodestyle__tests__E741_E741.py.snap index 788b3d69bd..cd63b3753e 100644 --- a/src/snapshots/ruff__linter__tests__E741_E741.py.snap +++ b/src/pycodestyle/snapshots/ruff__pycodestyle__tests__E741_E741.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pycodestyle/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__E742_E742.py.snap b/src/pycodestyle/snapshots/ruff__pycodestyle__tests__E742_E742.py.snap similarity index 92% rename from src/snapshots/ruff__linter__tests__E742_E742.py.snap rename to src/pycodestyle/snapshots/ruff__pycodestyle__tests__E742_E742.py.snap index 42ac00c995..661af133cf 100644 --- a/src/snapshots/ruff__linter__tests__E742_E742.py.snap +++ b/src/pycodestyle/snapshots/ruff__pycodestyle__tests__E742_E742.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pycodestyle/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__E743_E743.py.snap b/src/pycodestyle/snapshots/ruff__pycodestyle__tests__E743_E743.py.snap similarity index 92% rename from src/snapshots/ruff__linter__tests__E743_E743.py.snap rename to src/pycodestyle/snapshots/ruff__pycodestyle__tests__E743_E743.py.snap index 3570b0ba0c..43c428f9fa 100644 --- a/src/snapshots/ruff__linter__tests__E743_E743.py.snap +++ b/src/pycodestyle/snapshots/ruff__pycodestyle__tests__E743_E743.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pycodestyle/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__E999_E999.py.snap b/src/pycodestyle/snapshots/ruff__pycodestyle__tests__E999_E999.py.snap similarity index 83% rename from src/snapshots/ruff__linter__tests__E999_E999.py.snap rename to src/pycodestyle/snapshots/ruff__pycodestyle__tests__E999_E999.py.snap index 2badd99e82..c040c11157 100644 --- a/src/snapshots/ruff__linter__tests__E999_E999.py.snap +++ b/src/pycodestyle/snapshots/ruff__pycodestyle__tests__E999_E999.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pycodestyle/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__W292_W292_0.py.snap b/src/pycodestyle/snapshots/ruff__pycodestyle__tests__W292_W292_0.py.snap similarity index 82% rename from src/snapshots/ruff__linter__tests__W292_W292_0.py.snap rename to src/pycodestyle/snapshots/ruff__pycodestyle__tests__W292_W292_0.py.snap index 6f4412588e..2bd3ea6397 100644 --- a/src/snapshots/ruff__linter__tests__W292_W292_0.py.snap +++ b/src/pycodestyle/snapshots/ruff__pycodestyle__tests__W292_W292_0.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pycodestyle/mod.rs expression: checks --- - kind: NoNewLineAtEndOfFile diff --git a/src/pycodestyle/snapshots/ruff__pycodestyle__tests__W292_W292_1.py.snap b/src/pycodestyle/snapshots/ruff__pycodestyle__tests__W292_W292_1.py.snap new file mode 100644 index 0000000000..803588cfbe --- /dev/null +++ b/src/pycodestyle/snapshots/ruff__pycodestyle__tests__W292_W292_1.py.snap @@ -0,0 +1,6 @@ +--- +source: src/pycodestyle/mod.rs +expression: checks +--- +[] + diff --git a/src/pycodestyle/snapshots/ruff__pycodestyle__tests__W292_W292_2.py.snap b/src/pycodestyle/snapshots/ruff__pycodestyle__tests__W292_W292_2.py.snap new file mode 100644 index 0000000000..803588cfbe --- /dev/null +++ b/src/pycodestyle/snapshots/ruff__pycodestyle__tests__W292_W292_2.py.snap @@ -0,0 +1,6 @@ +--- +source: src/pycodestyle/mod.rs +expression: checks +--- +[] + diff --git a/src/snapshots/ruff__linter__tests__W605_W605_1.py.snap b/src/pycodestyle/snapshots/ruff__pycodestyle__tests__W605_W605_0.py.snap similarity index 94% rename from src/snapshots/ruff__linter__tests__W605_W605_1.py.snap rename to src/pycodestyle/snapshots/ruff__pycodestyle__tests__W605_W605_0.py.snap index 5b71f59433..d095a040ff 100644 --- a/src/snapshots/ruff__linter__tests__W605_W605_1.py.snap +++ b/src/pycodestyle/snapshots/ruff__pycodestyle__tests__W605_W605_0.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pycodestyle/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__W605_W605_0.py.snap b/src/pycodestyle/snapshots/ruff__pycodestyle__tests__W605_W605_1.py.snap similarity index 94% rename from src/snapshots/ruff__linter__tests__W605_W605_0.py.snap rename to src/pycodestyle/snapshots/ruff__pycodestyle__tests__W605_W605_1.py.snap index 5b71f59433..d095a040ff 100644 --- a/src/snapshots/ruff__linter__tests__W605_W605_0.py.snap +++ b/src/pycodestyle/snapshots/ruff__pycodestyle__tests__W605_W605_1.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pycodestyle/mod.rs expression: checks --- - kind: diff --git a/src/pydocstyle/mod.rs b/src/pydocstyle/mod.rs index 25a06164e5..e7dc86fb73 100644 --- a/src/pydocstyle/mod.rs +++ b/src/pydocstyle/mod.rs @@ -1 +1,73 @@ pub mod plugins; + +#[cfg(test)] +mod tests { + use std::convert::AsRef; + use std::path::Path; + + use anyhow::Result; + use test_case::test_case; + + use crate::checks::CheckCode; + use crate::linter::test_path; + use crate::settings; + + #[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::D206, Path::new("D.py"); "D206")] + #[test_case(CheckCode::D207, Path::new("D.py"); "D207")] + #[test_case(CheckCode::D208, Path::new("D.py"); "D208")] + #[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::D214, Path::new("sections.py"); "D214")] + #[test_case(CheckCode::D215, Path::new("sections.py"); "D215")] + #[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::D416, Path::new("D.py"); "D416")] + #[test_case(CheckCode::D417, Path::new("canonical_google_examples.py"); "D417_2")] + #[test_case(CheckCode::D417, Path::new("canonical_numpy_examples.py"); "D417_1")] + #[test_case(CheckCode::D417, Path::new("sections.py"); "D417_0")] + #[test_case(CheckCode::D418, Path::new("D.py"); "D418")] + #[test_case(CheckCode::D419, Path::new("D.py"); "D419")] + fn checks(check_code: CheckCode, path: &Path) -> Result<()> { + let snapshot = format!("{}_{}", check_code.as_ref(), path.to_string_lossy()); + let mut checks = test_path( + Path::new("./resources/test/fixtures/pydocstyle") + .join(path) + .as_path(), + &settings::Settings::for_rule(check_code), + true, + )?; + checks.sort_by_key(|check| check.location); + insta::assert_yaml_snapshot!(snapshot, checks); + Ok(()) + } +} diff --git a/src/snapshots/ruff__linter__tests__D100_D.py.snap b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D100_D.py.snap similarity index 81% rename from src/snapshots/ruff__linter__tests__D100_D.py.snap rename to src/pydocstyle/snapshots/ruff__pydocstyle__tests__D100_D.py.snap index 7d86a1bfe8..5147782389 100644 --- a/src/snapshots/ruff__linter__tests__D100_D.py.snap +++ b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D100_D.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pydocstyle/mod.rs expression: checks --- - kind: PublicModule diff --git a/src/snapshots/ruff__linter__tests__D101_D.py.snap b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D101_D.py.snap similarity index 82% rename from src/snapshots/ruff__linter__tests__D101_D.py.snap rename to src/pydocstyle/snapshots/ruff__pydocstyle__tests__D101_D.py.snap index f72d7de89b..b4f25d5b69 100644 --- a/src/snapshots/ruff__linter__tests__D101_D.py.snap +++ b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D101_D.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pydocstyle/mod.rs expression: checks --- - kind: PublicClass diff --git a/src/snapshots/ruff__linter__tests__D102_D.py.snap b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D102_D.py.snap similarity index 92% rename from src/snapshots/ruff__linter__tests__D102_D.py.snap rename to src/pydocstyle/snapshots/ruff__pydocstyle__tests__D102_D.py.snap index 954baa6cc1..5f830a315c 100644 --- a/src/snapshots/ruff__linter__tests__D102_D.py.snap +++ b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D102_D.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pydocstyle/mod.rs expression: checks --- - kind: PublicMethod diff --git a/src/snapshots/ruff__linter__tests__D103_D.py.snap b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D103_D.py.snap similarity index 82% rename from src/snapshots/ruff__linter__tests__D103_D.py.snap rename to src/pydocstyle/snapshots/ruff__pydocstyle__tests__D103_D.py.snap index ba5817a5ee..9e48e3268e 100644 --- a/src/snapshots/ruff__linter__tests__D103_D.py.snap +++ b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D103_D.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pydocstyle/mod.rs expression: checks --- - kind: PublicFunction diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D104_D.py.snap b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D104_D.py.snap new file mode 100644 index 0000000000..71bd58e2bb --- /dev/null +++ b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D104_D.py.snap @@ -0,0 +1,6 @@ +--- +source: src/pydocstyle/mod.rs +expression: checks +--- +[] + diff --git a/src/snapshots/ruff__linter__tests__D105_D.py.snap b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D105_D.py.snap similarity index 82% rename from src/snapshots/ruff__linter__tests__D105_D.py.snap rename to src/pydocstyle/snapshots/ruff__pydocstyle__tests__D105_D.py.snap index c09e89b371..56ab31b073 100644 --- a/src/snapshots/ruff__linter__tests__D105_D.py.snap +++ b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D105_D.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pydocstyle/mod.rs expression: checks --- - kind: MagicMethod diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D106_D.py.snap b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D106_D.py.snap new file mode 100644 index 0000000000..71bd58e2bb --- /dev/null +++ b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D106_D.py.snap @@ -0,0 +1,6 @@ +--- +source: src/pydocstyle/mod.rs +expression: checks +--- +[] + diff --git a/src/snapshots/ruff__linter__tests__D107_D.py.snap b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D107_D.py.snap similarity index 89% rename from src/snapshots/ruff__linter__tests__D107_D.py.snap rename to src/pydocstyle/snapshots/ruff__pydocstyle__tests__D107_D.py.snap index a9d41c7b7e..ed7e9b9984 100644 --- a/src/snapshots/ruff__linter__tests__D107_D.py.snap +++ b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D107_D.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pydocstyle/mod.rs expression: checks --- - kind: PublicInit diff --git a/src/snapshots/ruff__linter__tests__D201_D.py.snap b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D201_D.py.snap similarity index 97% rename from src/snapshots/ruff__linter__tests__D201_D.py.snap rename to src/pydocstyle/snapshots/ruff__pydocstyle__tests__D201_D.py.snap index 5460752b19..cf90aca774 100644 --- a/src/snapshots/ruff__linter__tests__D201_D.py.snap +++ b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D201_D.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pydocstyle/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__D202_D.py.snap b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D202_D.py.snap similarity index 97% rename from src/snapshots/ruff__linter__tests__D202_D.py.snap rename to src/pydocstyle/snapshots/ruff__pydocstyle__tests__D202_D.py.snap index 2539e7af5c..83b21bf523 100644 --- a/src/snapshots/ruff__linter__tests__D202_D.py.snap +++ b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D202_D.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pydocstyle/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__D203_D.py.snap b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D203_D.py.snap similarity index 96% rename from src/snapshots/ruff__linter__tests__D203_D.py.snap rename to src/pydocstyle/snapshots/ruff__pydocstyle__tests__D203_D.py.snap index 9a33b3e32a..f0bb1ddc65 100644 --- a/src/snapshots/ruff__linter__tests__D203_D.py.snap +++ b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D203_D.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pydocstyle/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__D204_D.py.snap b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D204_D.py.snap similarity index 94% rename from src/snapshots/ruff__linter__tests__D204_D.py.snap rename to src/pydocstyle/snapshots/ruff__pydocstyle__tests__D204_D.py.snap index e71700f042..c22e054cbe 100644 --- a/src/snapshots/ruff__linter__tests__D204_D.py.snap +++ b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D204_D.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pydocstyle/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__D205_D.py.snap b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D205_D.py.snap similarity index 94% rename from src/snapshots/ruff__linter__tests__D205_D.py.snap rename to src/pydocstyle/snapshots/ruff__pydocstyle__tests__D205_D.py.snap index 2170a309ae..6aa08f15f0 100644 --- a/src/snapshots/ruff__linter__tests__D205_D.py.snap +++ b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D205_D.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pydocstyle/mod.rs expression: checks --- - kind: BlankLineAfterSummary diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D206_D.py.snap b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D206_D.py.snap new file mode 100644 index 0000000000..71bd58e2bb --- /dev/null +++ b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D206_D.py.snap @@ -0,0 +1,6 @@ +--- +source: src/pydocstyle/mod.rs +expression: checks +--- +[] + diff --git a/src/snapshots/ruff__linter__tests__D207_D.py.snap b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D207_D.py.snap similarity index 95% rename from src/snapshots/ruff__linter__tests__D207_D.py.snap rename to src/pydocstyle/snapshots/ruff__pydocstyle__tests__D207_D.py.snap index 0df593eb6b..4841db7ac1 100644 --- a/src/snapshots/ruff__linter__tests__D207_D.py.snap +++ b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D207_D.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pydocstyle/mod.rs expression: checks --- - kind: NoUnderIndentation diff --git a/src/snapshots/ruff__linter__tests__D208_D.py.snap b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D208_D.py.snap similarity index 96% rename from src/snapshots/ruff__linter__tests__D208_D.py.snap rename to src/pydocstyle/snapshots/ruff__pydocstyle__tests__D208_D.py.snap index 6aadd8811a..c13acd1d63 100644 --- a/src/snapshots/ruff__linter__tests__D208_D.py.snap +++ b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D208_D.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pydocstyle/mod.rs expression: checks --- - kind: NoOverIndentation diff --git a/src/snapshots/ruff__linter__tests__D209_D.py.snap b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D209_D.py.snap similarity index 90% rename from src/snapshots/ruff__linter__tests__D209_D.py.snap rename to src/pydocstyle/snapshots/ruff__pydocstyle__tests__D209_D.py.snap index d6a74fb804..93c5e90420 100644 --- a/src/snapshots/ruff__linter__tests__D209_D.py.snap +++ b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D209_D.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pydocstyle/mod.rs expression: checks --- - kind: NewLineAfterLastParagraph diff --git a/src/snapshots/ruff__linter__tests__D210_D.py.snap b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D210_D.py.snap similarity index 96% rename from src/snapshots/ruff__linter__tests__D210_D.py.snap rename to src/pydocstyle/snapshots/ruff__pydocstyle__tests__D210_D.py.snap index fae56a5b30..637f6cc386 100644 --- a/src/snapshots/ruff__linter__tests__D210_D.py.snap +++ b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D210_D.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pydocstyle/mod.rs expression: checks --- - kind: NoSurroundingWhitespace diff --git a/src/snapshots/ruff__linter__tests__D211_D.py.snap b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D211_D.py.snap similarity index 94% rename from src/snapshots/ruff__linter__tests__D211_D.py.snap rename to src/pydocstyle/snapshots/ruff__pydocstyle__tests__D211_D.py.snap index 40ee0cd4f3..08478e6789 100644 --- a/src/snapshots/ruff__linter__tests__D211_D.py.snap +++ b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D211_D.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pydocstyle/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__D212_D.py.snap b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D212_D.py.snap similarity index 83% rename from src/snapshots/ruff__linter__tests__D212_D.py.snap rename to src/pydocstyle/snapshots/ruff__pydocstyle__tests__D212_D.py.snap index 4543e4bccd..752e4365fb 100644 --- a/src/snapshots/ruff__linter__tests__D212_D.py.snap +++ b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D212_D.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pydocstyle/mod.rs expression: checks --- - kind: MultiLineSummaryFirstLine diff --git a/src/snapshots/ruff__linter__tests__D213_D.py.snap b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D213_D.py.snap similarity index 98% rename from src/snapshots/ruff__linter__tests__D213_D.py.snap rename to src/pydocstyle/snapshots/ruff__pydocstyle__tests__D213_D.py.snap index f233ad0d40..56f871133e 100644 --- a/src/snapshots/ruff__linter__tests__D213_D.py.snap +++ b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D213_D.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pydocstyle/mod.rs expression: checks --- - kind: MultiLineSummarySecondLine diff --git a/src/snapshots/ruff__linter__tests__D214_sections.py.snap b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D214_sections.py.snap similarity index 90% rename from src/snapshots/ruff__linter__tests__D214_sections.py.snap rename to src/pydocstyle/snapshots/ruff__pydocstyle__tests__D214_sections.py.snap index ab71989886..fa51842ddc 100644 --- a/src/snapshots/ruff__linter__tests__D214_sections.py.snap +++ b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D214_sections.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pydocstyle/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__D215_sections.py.snap b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D215_sections.py.snap similarity index 95% rename from src/snapshots/ruff__linter__tests__D215_sections.py.snap rename to src/pydocstyle/snapshots/ruff__pydocstyle__tests__D215_sections.py.snap index bef9f8d336..d71fe7a838 100644 --- a/src/snapshots/ruff__linter__tests__D215_sections.py.snap +++ b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D215_sections.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pydocstyle/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__D300_D.py.snap b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D300_D.py.snap similarity index 95% rename from src/snapshots/ruff__linter__tests__D300_D.py.snap rename to src/pydocstyle/snapshots/ruff__pydocstyle__tests__D300_D.py.snap index 1b1736352a..8dbd9ada0a 100644 --- a/src/snapshots/ruff__linter__tests__D300_D.py.snap +++ b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D300_D.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pydocstyle/mod.rs expression: checks --- - kind: UsesTripleQuotes diff --git a/src/snapshots/ruff__linter__tests__D400_D.py.snap b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D400_D.py.snap similarity index 98% rename from src/snapshots/ruff__linter__tests__D400_D.py.snap rename to src/pydocstyle/snapshots/ruff__pydocstyle__tests__D400_D.py.snap index d8661081d4..b4c7f9f41d 100644 --- a/src/snapshots/ruff__linter__tests__D400_D.py.snap +++ b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D400_D.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pydocstyle/mod.rs expression: checks --- - kind: EndsInPeriod diff --git a/src/snapshots/ruff__linter__tests__D402_D.py.snap b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D402_D.py.snap similarity index 82% rename from src/snapshots/ruff__linter__tests__D402_D.py.snap rename to src/pydocstyle/snapshots/ruff__pydocstyle__tests__D402_D.py.snap index cdbadb853e..6f0e37ad44 100644 --- a/src/snapshots/ruff__linter__tests__D402_D.py.snap +++ b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D402_D.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pydocstyle/mod.rs expression: checks --- - kind: NoSignature diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D403_D.py.snap b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D403_D.py.snap new file mode 100644 index 0000000000..71bd58e2bb --- /dev/null +++ b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D403_D.py.snap @@ -0,0 +1,6 @@ +--- +source: src/pydocstyle/mod.rs +expression: checks +--- +[] + diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D404_D.py.snap b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D404_D.py.snap new file mode 100644 index 0000000000..71bd58e2bb --- /dev/null +++ b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D404_D.py.snap @@ -0,0 +1,6 @@ +--- +source: src/pydocstyle/mod.rs +expression: checks +--- +[] + diff --git a/src/snapshots/ruff__linter__tests__D405_sections.py.snap b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D405_sections.py.snap similarity index 95% rename from src/snapshots/ruff__linter__tests__D405_sections.py.snap rename to src/pydocstyle/snapshots/ruff__pydocstyle__tests__D405_sections.py.snap index 7165c4e1a3..e7e7f77842 100644 --- a/src/snapshots/ruff__linter__tests__D405_sections.py.snap +++ b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D405_sections.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pydocstyle/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__D406_sections.py.snap b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D406_sections.py.snap similarity index 97% rename from src/snapshots/ruff__linter__tests__D406_sections.py.snap rename to src/pydocstyle/snapshots/ruff__pydocstyle__tests__D406_sections.py.snap index d9718949ca..74f156964c 100644 --- a/src/snapshots/ruff__linter__tests__D406_sections.py.snap +++ b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D406_sections.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pydocstyle/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__D407_sections.py.snap b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D407_sections.py.snap similarity index 99% rename from src/snapshots/ruff__linter__tests__D407_sections.py.snap rename to src/pydocstyle/snapshots/ruff__pydocstyle__tests__D407_sections.py.snap index a676edd231..a366b10bb5 100644 --- a/src/snapshots/ruff__linter__tests__D407_sections.py.snap +++ b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D407_sections.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pydocstyle/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__D408_sections.py.snap b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D408_sections.py.snap similarity index 90% rename from src/snapshots/ruff__linter__tests__D408_sections.py.snap rename to src/pydocstyle/snapshots/ruff__pydocstyle__tests__D408_sections.py.snap index a2e69b17f1..154646a9ed 100644 --- a/src/snapshots/ruff__linter__tests__D408_sections.py.snap +++ b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D408_sections.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pydocstyle/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__D409_sections.py.snap b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D409_sections.py.snap similarity index 95% rename from src/snapshots/ruff__linter__tests__D409_sections.py.snap rename to src/pydocstyle/snapshots/ruff__pydocstyle__tests__D409_sections.py.snap index 7cf22292b0..f2ea8afebd 100644 --- a/src/snapshots/ruff__linter__tests__D409_sections.py.snap +++ b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D409_sections.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pydocstyle/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__D410_sections.py.snap b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D410_sections.py.snap similarity index 94% rename from src/snapshots/ruff__linter__tests__D410_sections.py.snap rename to src/pydocstyle/snapshots/ruff__pydocstyle__tests__D410_sections.py.snap index c63dcb7637..a92cb97895 100644 --- a/src/snapshots/ruff__linter__tests__D410_sections.py.snap +++ b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D410_sections.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pydocstyle/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__D411_sections.py.snap b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D411_sections.py.snap similarity index 96% rename from src/snapshots/ruff__linter__tests__D411_sections.py.snap rename to src/pydocstyle/snapshots/ruff__pydocstyle__tests__D411_sections.py.snap index 766a12cf70..7ac0cc147b 100644 --- a/src/snapshots/ruff__linter__tests__D411_sections.py.snap +++ b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D411_sections.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pydocstyle/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__D412_sections.py.snap b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D412_sections.py.snap similarity index 91% rename from src/snapshots/ruff__linter__tests__D412_sections.py.snap rename to src/pydocstyle/snapshots/ruff__pydocstyle__tests__D412_sections.py.snap index 8f60dc7f98..0e77daf539 100644 --- a/src/snapshots/ruff__linter__tests__D412_sections.py.snap +++ b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D412_sections.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pydocstyle/mod.rs expression: checks --- - kind: diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D413_sections.py.snap b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D413_sections.py.snap new file mode 100644 index 0000000000..71bd58e2bb --- /dev/null +++ b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D413_sections.py.snap @@ -0,0 +1,6 @@ +--- +source: src/pydocstyle/mod.rs +expression: checks +--- +[] + diff --git a/src/snapshots/ruff__linter__tests__D414_sections.py.snap b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D414_sections.py.snap similarity index 95% rename from src/snapshots/ruff__linter__tests__D414_sections.py.snap rename to src/pydocstyle/snapshots/ruff__pydocstyle__tests__D414_sections.py.snap index abcae53870..80fdd52fed 100644 --- a/src/snapshots/ruff__linter__tests__D414_sections.py.snap +++ b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D414_sections.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pydocstyle/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__D415_D.py.snap b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D415_D.py.snap similarity index 97% rename from src/snapshots/ruff__linter__tests__D415_D.py.snap rename to src/pydocstyle/snapshots/ruff__pydocstyle__tests__D415_D.py.snap index 4d6560c6b2..c8c3d95e90 100644 --- a/src/snapshots/ruff__linter__tests__D415_D.py.snap +++ b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D415_D.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pydocstyle/mod.rs expression: checks --- - kind: EndsInPunctuation diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D416_D.py.snap b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D416_D.py.snap new file mode 100644 index 0000000000..71bd58e2bb --- /dev/null +++ b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D416_D.py.snap @@ -0,0 +1,6 @@ +--- +source: src/pydocstyle/mod.rs +expression: checks +--- +[] + diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D417_canonical_google_examples.py.snap b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D417_canonical_google_examples.py.snap new file mode 100644 index 0000000000..71bd58e2bb --- /dev/null +++ b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D417_canonical_google_examples.py.snap @@ -0,0 +1,6 @@ +--- +source: src/pydocstyle/mod.rs +expression: checks +--- +[] + diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D417_canonical_numpy_examples.py.snap b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D417_canonical_numpy_examples.py.snap new file mode 100644 index 0000000000..71bd58e2bb --- /dev/null +++ b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D417_canonical_numpy_examples.py.snap @@ -0,0 +1,6 @@ +--- +source: src/pydocstyle/mod.rs +expression: checks +--- +[] + diff --git a/src/snapshots/ruff__linter__tests__D417_sections.py.snap b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D417_sections.py.snap similarity index 98% rename from src/snapshots/ruff__linter__tests__D417_sections.py.snap rename to src/pydocstyle/snapshots/ruff__pydocstyle__tests__D417_sections.py.snap index 7f7488c618..fb82fdc38c 100644 --- a/src/snapshots/ruff__linter__tests__D417_sections.py.snap +++ b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D417_sections.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pydocstyle/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__D418_D.py.snap b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D418_D.py.snap similarity index 92% rename from src/snapshots/ruff__linter__tests__D418_D.py.snap rename to src/pydocstyle/snapshots/ruff__pydocstyle__tests__D418_D.py.snap index c868f43ff3..722e5e6436 100644 --- a/src/snapshots/ruff__linter__tests__D418_D.py.snap +++ b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D418_D.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pydocstyle/mod.rs expression: checks --- - kind: SkipDocstring diff --git a/src/snapshots/ruff__linter__tests__D419_D.py.snap b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D419_D.py.snap similarity index 92% rename from src/snapshots/ruff__linter__tests__D419_D.py.snap rename to src/pydocstyle/snapshots/ruff__pydocstyle__tests__D419_D.py.snap index 1707326433..8fadf6f070 100644 --- a/src/snapshots/ruff__linter__tests__D419_D.py.snap +++ b/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D419_D.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pydocstyle/mod.rs expression: checks --- - kind: NonEmpty diff --git a/src/pyflakes/mod.rs b/src/pyflakes/mod.rs index cc666fbd1f..115f9729bc 100644 --- a/src/pyflakes/mod.rs +++ b/src/pyflakes/mod.rs @@ -3,3 +3,126 @@ pub mod checks; pub mod fixes; pub mod format; pub mod plugins; + +#[cfg(test)] +mod tests { + use std::convert::AsRef; + use std::path::Path; + + use anyhow::Result; + use regex::Regex; + use test_case::test_case; + + use crate::checks::CheckCode; + use crate::linter::test_path; + use crate::settings; + + #[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::F401, Path::new("F401_5.py"); "F401_5")] + #[test_case(CheckCode::F401, Path::new("F401_6.py"); "F401_6")] + #[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::F501, Path::new("F50x.py"); "F501")] + #[test_case(CheckCode::F502, Path::new("F502.py"); "F502_1")] + #[test_case(CheckCode::F502, Path::new("F50x.py"); "F502_0")] + #[test_case(CheckCode::F503, Path::new("F503.py"); "F503_1")] + #[test_case(CheckCode::F503, Path::new("F50x.py"); "F503_0")] + #[test_case(CheckCode::F504, Path::new("F504.py"); "F504_1")] + #[test_case(CheckCode::F504, Path::new("F50x.py"); "F504_0")] + #[test_case(CheckCode::F505, Path::new("F504.py"); "F505_1")] + #[test_case(CheckCode::F505, Path::new("F50x.py"); "F505_0")] + #[test_case(CheckCode::F506, Path::new("F50x.py"); "F506")] + #[test_case(CheckCode::F507, Path::new("F50x.py"); "F507")] + #[test_case(CheckCode::F508, Path::new("F50x.py"); "F508")] + #[test_case(CheckCode::F509, Path::new("F50x.py"); "F509")] + #[test_case(CheckCode::F521, Path::new("F521.py"); "F521")] + #[test_case(CheckCode::F522, Path::new("F522.py"); "F522")] + #[test_case(CheckCode::F523, Path::new("F523.py"); "F523")] + #[test_case(CheckCode::F524, Path::new("F524.py"); "F524")] + #[test_case(CheckCode::F525, Path::new("F525.py"); "F525")] + #[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_0.py"); "F821_0")] + #[test_case(CheckCode::F821, Path::new("F821_1.py"); "F821_1")] + #[test_case(CheckCode::F821, Path::new("F821_2.py"); "F821_2")] + #[test_case(CheckCode::F821, Path::new("F821_3.py"); "F821_3")] + #[test_case(CheckCode::F821, Path::new("F821_4.py"); "F821_4")] + #[test_case(CheckCode::F821, Path::new("F821_5.py"); "F821_5")] + #[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")] + fn checks(check_code: CheckCode, path: &Path) -> Result<()> { + let snapshot = format!("{}_{}", check_code.as_ref(), path.to_string_lossy()); + let mut checks = test_path( + Path::new("./resources/test/fixtures/pyflakes") + .join(path) + .as_path(), + &settings::Settings::for_rule(check_code), + true, + )?; + checks.sort_by_key(|check| check.location); + insta::assert_yaml_snapshot!(snapshot, checks); + Ok(()) + } + + #[test] + fn f841_dummy_variable_rgx() -> Result<()> { + let mut checks = test_path( + Path::new("./resources/test/fixtures/pyflakes/F841.py"), + &settings::Settings { + dummy_variable_rgx: Regex::new(r"^z$").unwrap(), + ..settings::Settings::for_rule(CheckCode::F841) + }, + true, + )?; + checks.sort_by_key(|check| check.location); + insta::assert_yaml_snapshot!(checks); + Ok(()) + } + + #[test] + fn init() -> Result<()> { + let mut checks = test_path( + Path::new("./resources/test/fixtures/pyflakes/__init__.py"), + &settings::Settings::for_rules(vec![CheckCode::F821, CheckCode::F822]), + true, + )?; + checks.sort_by_key(|check| check.location); + insta::assert_yaml_snapshot!(checks); + Ok(()) + } + + #[test] + fn future_annotations() -> Result<()> { + let mut checks = test_path( + Path::new("./resources/test/fixtures/pyflakes/future_annotations.py"), + &settings::Settings::for_rules(vec![CheckCode::F401, CheckCode::F821]), + true, + )?; + checks.sort_by_key(|check| check.location); + insta::assert_yaml_snapshot!(checks); + Ok(()) + } +} diff --git a/src/snapshots/ruff__linter__tests__F401_F401_0.py.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_0.py.snap similarity index 98% rename from src/snapshots/ruff__linter__tests__F401_F401_0.py.snap rename to src/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_0.py.snap index 97d5410773..43a307755e 100644 --- a/src/snapshots/ruff__linter__tests__F401_F401_0.py.snap +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_0.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyflakes/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__D206_D.py.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_1.py.snap similarity index 52% rename from src/snapshots/ruff__linter__tests__D206_D.py.snap rename to src/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_1.py.snap index 60c615f917..43ccad66f9 100644 --- a/src/snapshots/ruff__linter__tests__D206_D.py.snap +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_1.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyflakes/mod.rs expression: checks --- [] diff --git a/src/snapshots/ruff__linter__tests__D403_D.py.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_2.py.snap similarity index 52% rename from src/snapshots/ruff__linter__tests__D403_D.py.snap rename to src/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_2.py.snap index 60c615f917..43ccad66f9 100644 --- a/src/snapshots/ruff__linter__tests__D403_D.py.snap +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_2.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyflakes/mod.rs expression: checks --- [] diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_3.py.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_3.py.snap new file mode 100644 index 0000000000..43ccad66f9 --- /dev/null +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_3.py.snap @@ -0,0 +1,6 @@ +--- +source: src/pyflakes/mod.rs +expression: checks +--- +[] + diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_4.py.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_4.py.snap new file mode 100644 index 0000000000..43ccad66f9 --- /dev/null +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_4.py.snap @@ -0,0 +1,6 @@ +--- +source: src/pyflakes/mod.rs +expression: checks +--- +[] + diff --git a/src/snapshots/ruff__linter__tests__F401_F401_5.py.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_5.py.snap similarity index 97% rename from src/snapshots/ruff__linter__tests__F401_F401_5.py.snap rename to src/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_5.py.snap index 2f79eabc54..b9215e7374 100644 --- a/src/snapshots/ruff__linter__tests__F401_F401_5.py.snap +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_5.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyflakes/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__F401_F401_6.py.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_6.py.snap similarity index 97% rename from src/snapshots/ruff__linter__tests__F401_F401_6.py.snap rename to src/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_6.py.snap index a6f7e4c534..8bdb70a136 100644 --- a/src/snapshots/ruff__linter__tests__F401_F401_6.py.snap +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_6.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyflakes/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__F402_F402.py.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__F402_F402.py.snap similarity index 91% rename from src/snapshots/ruff__linter__tests__F402_F402.py.snap rename to src/pyflakes/snapshots/ruff__pyflakes__tests__F402_F402.py.snap index 2482755d4c..5b2189178e 100644 --- a/src/snapshots/ruff__linter__tests__F402_F402.py.snap +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__F402_F402.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyflakes/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__F403_F403.py.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__F403_F403.py.snap similarity index 90% rename from src/snapshots/ruff__linter__tests__F403_F403.py.snap rename to src/pyflakes/snapshots/ruff__pyflakes__tests__F403_F403.py.snap index 4e42b4365d..33ceb43210 100644 --- a/src/snapshots/ruff__linter__tests__F403_F403.py.snap +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__F403_F403.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyflakes/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__F404_F404.py.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__F404_F404.py.snap similarity index 83% rename from src/snapshots/ruff__linter__tests__F404_F404.py.snap rename to src/pyflakes/snapshots/ruff__pyflakes__tests__F404_F404.py.snap index 4fa5edc171..ab9b67c64b 100644 --- a/src/snapshots/ruff__linter__tests__F404_F404.py.snap +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__F404_F404.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyflakes/mod.rs expression: checks --- - kind: LateFutureImport diff --git a/src/snapshots/ruff__linter__tests__F405_F405.py.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__F405_F405.py.snap similarity index 92% rename from src/snapshots/ruff__linter__tests__F405_F405.py.snap rename to src/pyflakes/snapshots/ruff__pyflakes__tests__F405_F405.py.snap index e093ba7041..a51c8973c8 100644 --- a/src/snapshots/ruff__linter__tests__F405_F405.py.snap +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__F405_F405.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyflakes/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__F406_F406.py.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__F406_F406.py.snap similarity index 91% rename from src/snapshots/ruff__linter__tests__F406_F406.py.snap rename to src/pyflakes/snapshots/ruff__pyflakes__tests__F406_F406.py.snap index 3a29e71316..935f8115d2 100644 --- a/src/snapshots/ruff__linter__tests__F406_F406.py.snap +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__F406_F406.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyflakes/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__F407_F407.py.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__F407_F407.py.snap similarity index 86% rename from src/snapshots/ruff__linter__tests__F407_F407.py.snap rename to src/pyflakes/snapshots/ruff__pyflakes__tests__F407_F407.py.snap index 77269d3d51..aa25462b9a 100644 --- a/src/snapshots/ruff__linter__tests__F407_F407.py.snap +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__F407_F407.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyflakes/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__F501_F50x.py.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__F501_F50x.py.snap similarity index 86% rename from src/snapshots/ruff__linter__tests__F501_F50x.py.snap rename to src/pyflakes/snapshots/ruff__pyflakes__tests__F501_F50x.py.snap index f04fb99178..fe5f6ebd2f 100644 --- a/src/snapshots/ruff__linter__tests__F501_F50x.py.snap +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__F501_F50x.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyflakes/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__F502_F502.py.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__F502_F502.py.snap similarity index 97% rename from src/snapshots/ruff__linter__tests__F502_F502.py.snap rename to src/pyflakes/snapshots/ruff__pyflakes__tests__F502_F502.py.snap index e6476e5155..85949da74f 100644 --- a/src/snapshots/ruff__linter__tests__F502_F502.py.snap +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__F502_F502.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyflakes/mod.rs expression: checks --- - kind: PercentFormatExpectedMapping diff --git a/src/snapshots/ruff__linter__tests__F502_F50x.py.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__F502_F50x.py.snap similarity index 84% rename from src/snapshots/ruff__linter__tests__F502_F50x.py.snap rename to src/pyflakes/snapshots/ruff__pyflakes__tests__F502_F50x.py.snap index 0a64d95ab4..56d56e404a 100644 --- a/src/snapshots/ruff__linter__tests__F502_F50x.py.snap +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__F502_F50x.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyflakes/mod.rs expression: checks --- - kind: PercentFormatExpectedMapping diff --git a/src/snapshots/ruff__linter__tests__F503_F503.py.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__F503_F503.py.snap similarity index 93% rename from src/snapshots/ruff__linter__tests__F503_F503.py.snap rename to src/pyflakes/snapshots/ruff__pyflakes__tests__F503_F503.py.snap index 69e2d6ae7c..48339ad6c4 100644 --- a/src/snapshots/ruff__linter__tests__F503_F503.py.snap +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__F503_F503.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyflakes/mod.rs expression: checks --- - kind: PercentFormatExpectedSequence diff --git a/src/snapshots/ruff__linter__tests__F503_F50x.py.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__F503_F50x.py.snap similarity index 84% rename from src/snapshots/ruff__linter__tests__F503_F50x.py.snap rename to src/pyflakes/snapshots/ruff__pyflakes__tests__F503_F50x.py.snap index 93968034c9..9f091381fd 100644 --- a/src/snapshots/ruff__linter__tests__F503_F50x.py.snap +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__F503_F50x.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyflakes/mod.rs expression: checks --- - kind: PercentFormatExpectedSequence diff --git a/src/snapshots/ruff__linter__tests__F504_F504.py.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__F504_F504.py.snap similarity index 86% rename from src/snapshots/ruff__linter__tests__F504_F504.py.snap rename to src/pyflakes/snapshots/ruff__pyflakes__tests__F504_F504.py.snap index 0312fcc231..63f3aec3e1 100644 --- a/src/snapshots/ruff__linter__tests__F504_F504.py.snap +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__F504_F504.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyflakes/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__F504_F50x.py.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__F504_F50x.py.snap similarity index 86% rename from src/snapshots/ruff__linter__tests__F504_F50x.py.snap rename to src/pyflakes/snapshots/ruff__pyflakes__tests__F504_F50x.py.snap index adad350ac8..f73adfafde 100644 --- a/src/snapshots/ruff__linter__tests__F504_F50x.py.snap +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__F504_F50x.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyflakes/mod.rs expression: checks --- - kind: diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F505_F504.py.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__F505_F504.py.snap new file mode 100644 index 0000000000..43ccad66f9 --- /dev/null +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__F505_F504.py.snap @@ -0,0 +1,6 @@ +--- +source: src/pyflakes/mod.rs +expression: checks +--- +[] + diff --git a/src/snapshots/ruff__linter__tests__F505_F50x.py.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__F505_F50x.py.snap similarity index 85% rename from src/snapshots/ruff__linter__tests__F505_F50x.py.snap rename to src/pyflakes/snapshots/ruff__pyflakes__tests__F505_F50x.py.snap index 028076284c..55f1098fdb 100644 --- a/src/snapshots/ruff__linter__tests__F505_F50x.py.snap +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__F505_F50x.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyflakes/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__F506_F50x.py.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__F506_F50x.py.snap similarity index 93% rename from src/snapshots/ruff__linter__tests__F506_F50x.py.snap rename to src/pyflakes/snapshots/ruff__pyflakes__tests__F506_F50x.py.snap index d823703ea7..e2dac39dcc 100644 --- a/src/snapshots/ruff__linter__tests__F506_F50x.py.snap +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__F506_F50x.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyflakes/mod.rs expression: checks --- - kind: PercentFormatMixedPositionalAndNamed diff --git a/src/snapshots/ruff__linter__tests__F507_F50x.py.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__F507_F50x.py.snap similarity index 92% rename from src/snapshots/ruff__linter__tests__F507_F50x.py.snap rename to src/pyflakes/snapshots/ruff__pyflakes__tests__F507_F50x.py.snap index 678a15c184..4de365980d 100644 --- a/src/snapshots/ruff__linter__tests__F507_F50x.py.snap +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__F507_F50x.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyflakes/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__F508_F50x.py.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__F508_F50x.py.snap similarity index 85% rename from src/snapshots/ruff__linter__tests__F508_F50x.py.snap rename to src/pyflakes/snapshots/ruff__pyflakes__tests__F508_F50x.py.snap index 7ab3921e2f..bae404e3b4 100644 --- a/src/snapshots/ruff__linter__tests__F508_F50x.py.snap +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__F508_F50x.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyflakes/mod.rs expression: checks --- - kind: PercentFormatStarRequiresSequence diff --git a/src/snapshots/ruff__linter__tests__F509_F50x.py.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__F509_F50x.py.snap similarity index 85% rename from src/snapshots/ruff__linter__tests__F509_F50x.py.snap rename to src/pyflakes/snapshots/ruff__pyflakes__tests__F509_F50x.py.snap index b742d0e91f..082b13c54a 100644 --- a/src/snapshots/ruff__linter__tests__F509_F50x.py.snap +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__F509_F50x.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyflakes/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__F521_F521.py.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__F521_F521.py.snap similarity index 97% rename from src/snapshots/ruff__linter__tests__F521_F521.py.snap rename to src/pyflakes/snapshots/ruff__pyflakes__tests__F521_F521.py.snap index c17f553e36..6c20015417 100644 --- a/src/snapshots/ruff__linter__tests__F521_F521.py.snap +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__F521_F521.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyflakes/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__F522_F522.py.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__F522_F522.py.snap similarity index 94% rename from src/snapshots/ruff__linter__tests__F522_F522.py.snap rename to src/pyflakes/snapshots/ruff__pyflakes__tests__F522_F522.py.snap index 52a84b34e0..efc9f38b1f 100644 --- a/src/snapshots/ruff__linter__tests__F522_F522.py.snap +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__F522_F522.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyflakes/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__F523_F523.py.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__F523_F523.py.snap similarity index 97% rename from src/snapshots/ruff__linter__tests__F523_F523.py.snap rename to src/pyflakes/snapshots/ruff__pyflakes__tests__F523_F523.py.snap index fc6cd6f29e..6bc5685582 100644 --- a/src/snapshots/ruff__linter__tests__F523_F523.py.snap +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__F523_F523.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyflakes/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__F524_F524.py.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__F524_F524.py.snap similarity index 97% rename from src/snapshots/ruff__linter__tests__F524_F524.py.snap rename to src/pyflakes/snapshots/ruff__pyflakes__tests__F524_F524.py.snap index 089fcef23b..663c26a8a2 100644 --- a/src/snapshots/ruff__linter__tests__F524_F524.py.snap +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__F524_F524.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyflakes/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__F525_F525.py.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__F525_F525.py.snap similarity index 90% rename from src/snapshots/ruff__linter__tests__F525_F525.py.snap rename to src/pyflakes/snapshots/ruff__pyflakes__tests__F525_F525.py.snap index 2fcb5bac96..d1fdd12cff 100644 --- a/src/snapshots/ruff__linter__tests__F525_F525.py.snap +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__F525_F525.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyflakes/mod.rs expression: checks --- - kind: StringDotFormatMixingAutomatic diff --git a/src/snapshots/ruff__linter__tests__F541_F541.py.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__F541_F541.py.snap similarity index 93% rename from src/snapshots/ruff__linter__tests__F541_F541.py.snap rename to src/pyflakes/snapshots/ruff__pyflakes__tests__F541_F541.py.snap index 62c22155b2..773f0d0525 100644 --- a/src/snapshots/ruff__linter__tests__F541_F541.py.snap +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__F541_F541.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyflakes/mod.rs expression: checks --- - kind: FStringMissingPlaceholders diff --git a/src/snapshots/ruff__linter__tests__F601_F601.py.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__F601_F601.py.snap similarity index 93% rename from src/snapshots/ruff__linter__tests__F601_F601.py.snap rename to src/pyflakes/snapshots/ruff__pyflakes__tests__F601_F601.py.snap index 4f4f9478de..6a17ebc15a 100644 --- a/src/snapshots/ruff__linter__tests__F601_F601.py.snap +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__F601_F601.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyflakes/mod.rs expression: checks --- - kind: MultiValueRepeatedKeyLiteral diff --git a/src/snapshots/ruff__linter__tests__F602_F602.py.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__F602_F602.py.snap similarity index 85% rename from src/snapshots/ruff__linter__tests__F602_F602.py.snap rename to src/pyflakes/snapshots/ruff__pyflakes__tests__F602_F602.py.snap index 68c8b5bcc6..cca9d90964 100644 --- a/src/snapshots/ruff__linter__tests__F602_F602.py.snap +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__F602_F602.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyflakes/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__F622_F622.py.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__F622_F622.py.snap similarity index 83% rename from src/snapshots/ruff__linter__tests__F622_F622.py.snap rename to src/pyflakes/snapshots/ruff__pyflakes__tests__F622_F622.py.snap index a27d9ee88d..87d561cea7 100644 --- a/src/snapshots/ruff__linter__tests__F622_F622.py.snap +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__F622_F622.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyflakes/mod.rs expression: checks --- - kind: TwoStarredExpressions diff --git a/src/snapshots/ruff__linter__tests__F631_F631.py.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__F631_F631.py.snap similarity index 89% rename from src/snapshots/ruff__linter__tests__F631_F631.py.snap rename to src/pyflakes/snapshots/ruff__pyflakes__tests__F631_F631.py.snap index c3ed725ccf..dea3713d11 100644 --- a/src/snapshots/ruff__linter__tests__F631_F631.py.snap +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__F631_F631.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyflakes/mod.rs expression: checks --- - kind: AssertTuple diff --git a/src/snapshots/ruff__linter__tests__F632_F632.py.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__F632_F632.py.snap similarity index 96% rename from src/snapshots/ruff__linter__tests__F632_F632.py.snap rename to src/pyflakes/snapshots/ruff__pyflakes__tests__F632_F632.py.snap index 736914299b..327b776e1a 100644 --- a/src/snapshots/ruff__linter__tests__F632_F632.py.snap +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__F632_F632.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyflakes/mod.rs expression: checks --- - kind: IsLiteral diff --git a/src/snapshots/ruff__linter__tests__F633_F633.py.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__F633_F633.py.snap similarity index 83% rename from src/snapshots/ruff__linter__tests__F633_F633.py.snap rename to src/pyflakes/snapshots/ruff__pyflakes__tests__F633_F633.py.snap index 04b145bc05..b2894cb642 100644 --- a/src/snapshots/ruff__linter__tests__F633_F633.py.snap +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__F633_F633.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyflakes/mod.rs expression: checks --- - kind: InvalidPrintSyntax diff --git a/src/snapshots/ruff__linter__tests__F634_F634.py.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__F634_F634.py.snap similarity index 89% rename from src/snapshots/ruff__linter__tests__F634_F634.py.snap rename to src/pyflakes/snapshots/ruff__pyflakes__tests__F634_F634.py.snap index 21ad89704c..ef608e9b87 100644 --- a/src/snapshots/ruff__linter__tests__F634_F634.py.snap +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__F634_F634.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyflakes/mod.rs expression: checks --- - kind: IfTuple diff --git a/src/snapshots/ruff__linter__tests__F701_F701.py.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__F701_F701.py.snap similarity index 94% rename from src/snapshots/ruff__linter__tests__F701_F701.py.snap rename to src/pyflakes/snapshots/ruff__pyflakes__tests__F701_F701.py.snap index 2cc1ca9569..2e4e090493 100644 --- a/src/snapshots/ruff__linter__tests__F701_F701.py.snap +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__F701_F701.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyflakes/mod.rs expression: checks --- - kind: BreakOutsideLoop diff --git a/src/snapshots/ruff__linter__tests__F702_F702.py.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__F702_F702.py.snap similarity index 94% rename from src/snapshots/ruff__linter__tests__F702_F702.py.snap rename to src/pyflakes/snapshots/ruff__pyflakes__tests__F702_F702.py.snap index 9a6310adbd..9dfe849428 100644 --- a/src/snapshots/ruff__linter__tests__F702_F702.py.snap +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__F702_F702.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyflakes/mod.rs expression: checks --- - kind: ContinueOutsideLoop diff --git a/src/snapshots/ruff__linter__tests__F704_F704.py.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__F704_F704.py.snap similarity index 95% rename from src/snapshots/ruff__linter__tests__F704_F704.py.snap rename to src/pyflakes/snapshots/ruff__pyflakes__tests__F704_F704.py.snap index 9d5c6673c2..4b4a717e3b 100644 --- a/src/snapshots/ruff__linter__tests__F704_F704.py.snap +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__F704_F704.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyflakes/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__F706_F706.py.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__F706_F706.py.snap similarity index 90% rename from src/snapshots/ruff__linter__tests__F706_F706.py.snap rename to src/pyflakes/snapshots/ruff__pyflakes__tests__F706_F706.py.snap index 3b942592ba..47ab0dd57e 100644 --- a/src/snapshots/ruff__linter__tests__F706_F706.py.snap +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__F706_F706.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyflakes/mod.rs expression: checks --- - kind: ReturnOutsideFunction diff --git a/src/snapshots/ruff__linter__tests__F707_F707.py.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__F707_F707.py.snap similarity index 93% rename from src/snapshots/ruff__linter__tests__F707_F707.py.snap rename to src/pyflakes/snapshots/ruff__pyflakes__tests__F707_F707.py.snap index 44341977b3..d43decaffa 100644 --- a/src/snapshots/ruff__linter__tests__F707_F707.py.snap +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__F707_F707.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyflakes/mod.rs expression: checks --- - kind: DefaultExceptNotLast diff --git a/src/snapshots/ruff__linter__tests__F722_F722.py.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__F722_F722.py.snap similarity index 85% rename from src/snapshots/ruff__linter__tests__F722_F722.py.snap rename to src/pyflakes/snapshots/ruff__pyflakes__tests__F722_F722.py.snap index 08f67a1f78..17e6fd4c4a 100644 --- a/src/snapshots/ruff__linter__tests__F722_F722.py.snap +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__F722_F722.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyflakes/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__F821_F821_0.py.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_0.py.snap similarity index 98% rename from src/snapshots/ruff__linter__tests__F821_F821_0.py.snap rename to src/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_0.py.snap index 0415bc8b43..db14f74cc2 100644 --- a/src/snapshots/ruff__linter__tests__F821_F821_0.py.snap +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_0.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyflakes/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__F821_F821_1.py.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_1.py.snap similarity index 94% rename from src/snapshots/ruff__linter__tests__F821_F821_1.py.snap rename to src/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_1.py.snap index 53a4ffc5d1..ddb8802237 100644 --- a/src/snapshots/ruff__linter__tests__F821_F821_1.py.snap +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_1.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyflakes/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__F821_F821_2.py.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_2.py.snap similarity index 84% rename from src/snapshots/ruff__linter__tests__F821_F821_2.py.snap rename to src/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_2.py.snap index 254d071924..446dd904a4 100644 --- a/src/snapshots/ruff__linter__tests__F821_F821_2.py.snap +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_2.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyflakes/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__F821_F821_3.py.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_3.py.snap similarity index 90% rename from src/snapshots/ruff__linter__tests__F821_F821_3.py.snap rename to src/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_3.py.snap index e31255e787..b620abd713 100644 --- a/src/snapshots/ruff__linter__tests__F821_F821_3.py.snap +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_3.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyflakes/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__F821_F821_4.py.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_4.py.snap similarity index 95% rename from src/snapshots/ruff__linter__tests__F821_F821_4.py.snap rename to src/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_4.py.snap index f086a070a4..f43643067e 100644 --- a/src/snapshots/ruff__linter__tests__F821_F821_4.py.snap +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_4.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyflakes/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__F821_F821_5.py.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_5.py.snap similarity index 84% rename from src/snapshots/ruff__linter__tests__F821_F821_5.py.snap rename to src/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_5.py.snap index f0546ccece..901ee75adb 100644 --- a/src/snapshots/ruff__linter__tests__F821_F821_5.py.snap +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_5.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyflakes/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__F822_F822.py.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__F822_F822.py.snap similarity index 83% rename from src/snapshots/ruff__linter__tests__F822_F822.py.snap rename to src/pyflakes/snapshots/ruff__pyflakes__tests__F822_F822.py.snap index f0442c5c4b..96d87c96b2 100644 --- a/src/snapshots/ruff__linter__tests__F822_F822.py.snap +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__F822_F822.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyflakes/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__F823_F823.py.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__F823_F823.py.snap similarity index 84% rename from src/snapshots/ruff__linter__tests__F823_F823.py.snap rename to src/pyflakes/snapshots/ruff__pyflakes__tests__F823_F823.py.snap index 560948c1a8..b7728b200e 100644 --- a/src/snapshots/ruff__linter__tests__F823_F823.py.snap +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__F823_F823.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyflakes/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__F831_F831.py.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__F831_F831.py.snap similarity index 93% rename from src/snapshots/ruff__linter__tests__F831_F831.py.snap rename to src/pyflakes/snapshots/ruff__pyflakes__tests__F831_F831.py.snap index b0427973da..372928e557 100644 --- a/src/snapshots/ruff__linter__tests__F831_F831.py.snap +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__F831_F831.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyflakes/mod.rs expression: checks --- - kind: DuplicateArgumentName diff --git a/src/snapshots/ruff__linter__tests__F841_F841.py.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__F841_F841.py.snap similarity index 96% rename from src/snapshots/ruff__linter__tests__F841_F841.py.snap rename to src/pyflakes/snapshots/ruff__pyflakes__tests__F841_F841.py.snap index be311cf71d..a425c5b896 100644 --- a/src/snapshots/ruff__linter__tests__F841_F841.py.snap +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__F841_F841.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyflakes/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__F901_F901.py.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__F901_F901.py.snap similarity index 95% rename from src/snapshots/ruff__linter__tests__F901_F901.py.snap rename to src/pyflakes/snapshots/ruff__pyflakes__tests__F901_F901.py.snap index a628077fb9..2ec56318c1 100644 --- a/src/snapshots/ruff__linter__tests__F901_F901.py.snap +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__F901_F901.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyflakes/mod.rs expression: checks --- - kind: RaiseNotImplemented diff --git a/src/snapshots/ruff__linter__tests__f841_dummy_variable_rgx.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__f841_dummy_variable_rgx.snap similarity index 97% rename from src/snapshots/ruff__linter__tests__f841_dummy_variable_rgx.snap rename to src/pyflakes/snapshots/ruff__pyflakes__tests__f841_dummy_variable_rgx.snap index e7582f7fb9..c4db961d75 100644 --- a/src/snapshots/ruff__linter__tests__f841_dummy_variable_rgx.snap +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__f841_dummy_variable_rgx.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyflakes/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__future_annotations.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__future_annotations.snap similarity index 94% rename from src/snapshots/ruff__linter__tests__future_annotations.snap rename to src/pyflakes/snapshots/ruff__pyflakes__tests__future_annotations.snap index ae3e62af29..62afcb2bc8 100644 --- a/src/snapshots/ruff__linter__tests__future_annotations.snap +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__future_annotations.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyflakes/mod.rs expression: checks --- - kind: diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__init.snap b/src/pyflakes/snapshots/ruff__pyflakes__tests__init.snap new file mode 100644 index 0000000000..43ccad66f9 --- /dev/null +++ b/src/pyflakes/snapshots/ruff__pyflakes__tests__init.snap @@ -0,0 +1,6 @@ +--- +source: src/pyflakes/mod.rs +expression: checks +--- +[] + diff --git a/src/pyupgrade/mod.rs b/src/pyupgrade/mod.rs index 29b7271728..dd3eccd1c8 100644 --- a/src/pyupgrade/mod.rs +++ b/src/pyupgrade/mod.rs @@ -3,3 +3,110 @@ pub mod fixes; pub mod plugins; pub mod settings; pub mod types; + +#[cfg(test)] +mod tests { + use std::convert::AsRef; + use std::path::Path; + + use anyhow::Result; + use test_case::test_case; + + use crate::checks::CheckCode; + use crate::linter::test_path; + use crate::settings; + use crate::settings::types::PythonVersion; + + #[test_case(CheckCode::U001, Path::new("U001.py"); "U001")] + #[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::U009, Path::new("U009_0.py"); "U009_0")] + #[test_case(CheckCode::U009, Path::new("U009_1.py"); "U009_1")] + #[test_case(CheckCode::U009, Path::new("U009_2.py"); "U009_2")] + #[test_case(CheckCode::U009, Path::new("U009_3.py"); "U009_3")] + #[test_case(CheckCode::U009, Path::new("U009_4.py"); "U009_4")] + #[test_case(CheckCode::U010, Path::new("U010.py"); "U010")] + #[test_case(CheckCode::U011, Path::new("U011_0.py"); "U011_0")] + #[test_case(CheckCode::U011, Path::new("U011_1.py"); "U011_1")] + #[test_case(CheckCode::U012, Path::new("U012.py"); "U012")] + #[test_case(CheckCode::U013, Path::new("U013.py"); "U013")] + #[test_case(CheckCode::U014, Path::new("U014.py"); "U014")] + #[test_case(CheckCode::U015, Path::new("U015.py"); "U015")] + fn checks(check_code: CheckCode, path: &Path) -> Result<()> { + let snapshot = format!("{}_{}", check_code.as_ref(), path.to_string_lossy()); + let mut checks = test_path( + Path::new("./resources/test/fixtures/pyupgrade") + .join(path) + .as_path(), + &settings::Settings::for_rule(check_code), + true, + )?; + checks.sort_by_key(|check| check.location); + insta::assert_yaml_snapshot!(snapshot, checks); + Ok(()) + } + + #[test] + fn future_annotations_pep_585_p37() -> Result<()> { + let mut checks = test_path( + Path::new("./resources/test/fixtures/pyupgrade/future_annotations.py"), + &settings::Settings { + target_version: PythonVersion::Py37, + ..settings::Settings::for_rule(CheckCode::U006) + }, + true, + )?; + checks.sort_by_key(|check| check.location); + insta::assert_yaml_snapshot!(checks); + Ok(()) + } + + #[test] + fn future_annotations_pep_585_py310() -> Result<()> { + let mut checks = test_path( + Path::new("./resources/test/fixtures/pyupgrade/future_annotations.py"), + &settings::Settings { + target_version: PythonVersion::Py310, + ..settings::Settings::for_rule(CheckCode::U006) + }, + true, + )?; + checks.sort_by_key(|check| check.location); + insta::assert_yaml_snapshot!(checks); + Ok(()) + } + + #[test] + fn future_annotations_pep_604_p37() -> Result<()> { + let mut checks = test_path( + Path::new("./resources/test/fixtures/pyupgrade/future_annotations.py"), + &settings::Settings { + target_version: PythonVersion::Py37, + ..settings::Settings::for_rule(CheckCode::U007) + }, + true, + )?; + checks.sort_by_key(|check| check.location); + insta::assert_yaml_snapshot!(checks); + Ok(()) + } + + #[test] + fn future_annotations_pep_604_py310() -> Result<()> { + let mut checks = test_path( + Path::new("./resources/test/fixtures/pyupgrade/future_annotations.py"), + &settings::Settings { + target_version: PythonVersion::Py310, + ..settings::Settings::for_rule(CheckCode::U007) + }, + true, + )?; + checks.sort_by_key(|check| check.location); + insta::assert_yaml_snapshot!(checks); + Ok(()) + } +} diff --git a/src/snapshots/ruff__linter__tests__U001_U001.py.snap b/src/pyupgrade/snapshots/ruff__pyupgrade__tests__U001_U001.py.snap similarity index 94% rename from src/snapshots/ruff__linter__tests__U001_U001.py.snap rename to src/pyupgrade/snapshots/ruff__pyupgrade__tests__U001_U001.py.snap index a619e8474f..17a816aa30 100644 --- a/src/snapshots/ruff__linter__tests__U001_U001.py.snap +++ b/src/pyupgrade/snapshots/ruff__pyupgrade__tests__U001_U001.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyupgrade/mod.rs expression: checks --- - kind: UselessMetaclassType diff --git a/src/snapshots/ruff__linter__tests__U003_U003.py.snap b/src/pyupgrade/snapshots/ruff__pyupgrade__tests__U003_U003.py.snap similarity index 97% rename from src/snapshots/ruff__linter__tests__U003_U003.py.snap rename to src/pyupgrade/snapshots/ruff__pyupgrade__tests__U003_U003.py.snap index 0def5d0245..6139e092d1 100644 --- a/src/snapshots/ruff__linter__tests__U003_U003.py.snap +++ b/src/pyupgrade/snapshots/ruff__pyupgrade__tests__U003_U003.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyupgrade/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__U004_U004.py.snap b/src/pyupgrade/snapshots/ruff__pyupgrade__tests__U004_U004.py.snap similarity index 99% rename from src/snapshots/ruff__linter__tests__U004_U004.py.snap rename to src/pyupgrade/snapshots/ruff__pyupgrade__tests__U004_U004.py.snap index d3fdc97dbc..62f0b4acf2 100644 --- a/src/snapshots/ruff__linter__tests__U004_U004.py.snap +++ b/src/pyupgrade/snapshots/ruff__pyupgrade__tests__U004_U004.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyupgrade/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__U005_U005.py.snap b/src/pyupgrade/snapshots/ruff__pyupgrade__tests__U005_U005.py.snap similarity index 97% rename from src/snapshots/ruff__linter__tests__U005_U005.py.snap rename to src/pyupgrade/snapshots/ruff__pyupgrade__tests__U005_U005.py.snap index 69d50d7c99..f10a2188c1 100644 --- a/src/snapshots/ruff__linter__tests__U005_U005.py.snap +++ b/src/pyupgrade/snapshots/ruff__pyupgrade__tests__U005_U005.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyupgrade/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__U006_U006.py.snap b/src/pyupgrade/snapshots/ruff__pyupgrade__tests__U006_U006.py.snap similarity index 97% rename from src/snapshots/ruff__linter__tests__U006_U006.py.snap rename to src/pyupgrade/snapshots/ruff__pyupgrade__tests__U006_U006.py.snap index 34d45c6193..482151a5f3 100644 --- a/src/snapshots/ruff__linter__tests__U006_U006.py.snap +++ b/src/pyupgrade/snapshots/ruff__pyupgrade__tests__U006_U006.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyupgrade/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__U007_U007.py.snap b/src/pyupgrade/snapshots/ruff__pyupgrade__tests__U007_U007.py.snap similarity index 98% rename from src/snapshots/ruff__linter__tests__U007_U007.py.snap rename to src/pyupgrade/snapshots/ruff__pyupgrade__tests__U007_U007.py.snap index 3d6cd84e64..7d901d0231 100644 --- a/src/snapshots/ruff__linter__tests__U007_U007.py.snap +++ b/src/pyupgrade/snapshots/ruff__pyupgrade__tests__U007_U007.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyupgrade/mod.rs expression: checks --- - kind: UsePEP604Annotation diff --git a/src/snapshots/ruff__linter__tests__U008_U008.py.snap b/src/pyupgrade/snapshots/ruff__pyupgrade__tests__U008_U008.py.snap similarity index 97% rename from src/snapshots/ruff__linter__tests__U008_U008.py.snap rename to src/pyupgrade/snapshots/ruff__pyupgrade__tests__U008_U008.py.snap index 4dd11f9821..33e398617c 100644 --- a/src/snapshots/ruff__linter__tests__U008_U008.py.snap +++ b/src/pyupgrade/snapshots/ruff__pyupgrade__tests__U008_U008.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyupgrade/mod.rs expression: checks --- - kind: SuperCallWithParameters diff --git a/src/snapshots/ruff__linter__tests__U009_U009_0.py.snap b/src/pyupgrade/snapshots/ruff__pyupgrade__tests__U009_U009_0.py.snap similarity index 90% rename from src/snapshots/ruff__linter__tests__U009_U009_0.py.snap rename to src/pyupgrade/snapshots/ruff__pyupgrade__tests__U009_U009_0.py.snap index 251dc3c970..57ec222a86 100644 --- a/src/snapshots/ruff__linter__tests__U009_U009_0.py.snap +++ b/src/pyupgrade/snapshots/ruff__pyupgrade__tests__U009_U009_0.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyupgrade/mod.rs expression: checks --- - kind: PEP3120UnnecessaryCodingComment diff --git a/src/snapshots/ruff__linter__tests__U009_U009_1.py.snap b/src/pyupgrade/snapshots/ruff__pyupgrade__tests__U009_U009_1.py.snap similarity index 90% rename from src/snapshots/ruff__linter__tests__U009_U009_1.py.snap rename to src/pyupgrade/snapshots/ruff__pyupgrade__tests__U009_U009_1.py.snap index c7dd7bb3f2..38da9578b2 100644 --- a/src/snapshots/ruff__linter__tests__U009_U009_1.py.snap +++ b/src/pyupgrade/snapshots/ruff__pyupgrade__tests__U009_U009_1.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyupgrade/mod.rs expression: checks --- - kind: PEP3120UnnecessaryCodingComment diff --git a/src/pyupgrade/snapshots/ruff__pyupgrade__tests__U009_U009_2.py.snap b/src/pyupgrade/snapshots/ruff__pyupgrade__tests__U009_U009_2.py.snap new file mode 100644 index 0000000000..3d7dd185e1 --- /dev/null +++ b/src/pyupgrade/snapshots/ruff__pyupgrade__tests__U009_U009_2.py.snap @@ -0,0 +1,6 @@ +--- +source: src/pyupgrade/mod.rs +expression: checks +--- +[] + diff --git a/src/pyupgrade/snapshots/ruff__pyupgrade__tests__U009_U009_3.py.snap b/src/pyupgrade/snapshots/ruff__pyupgrade__tests__U009_U009_3.py.snap new file mode 100644 index 0000000000..3d7dd185e1 --- /dev/null +++ b/src/pyupgrade/snapshots/ruff__pyupgrade__tests__U009_U009_3.py.snap @@ -0,0 +1,6 @@ +--- +source: src/pyupgrade/mod.rs +expression: checks +--- +[] + diff --git a/src/pyupgrade/snapshots/ruff__pyupgrade__tests__U009_U009_4.py.snap b/src/pyupgrade/snapshots/ruff__pyupgrade__tests__U009_U009_4.py.snap new file mode 100644 index 0000000000..3d7dd185e1 --- /dev/null +++ b/src/pyupgrade/snapshots/ruff__pyupgrade__tests__U009_U009_4.py.snap @@ -0,0 +1,6 @@ +--- +source: src/pyupgrade/mod.rs +expression: checks +--- +[] + diff --git a/src/snapshots/ruff__linter__tests__U010_U010.py.snap b/src/pyupgrade/snapshots/ruff__pyupgrade__tests__U010_U010.py.snap similarity index 99% rename from src/snapshots/ruff__linter__tests__U010_U010.py.snap rename to src/pyupgrade/snapshots/ruff__pyupgrade__tests__U010_U010.py.snap index 99c0d0efb8..389e393fcd 100644 --- a/src/snapshots/ruff__linter__tests__U010_U010.py.snap +++ b/src/pyupgrade/snapshots/ruff__pyupgrade__tests__U010_U010.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyupgrade/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__U011_U011_0.py.snap b/src/pyupgrade/snapshots/ruff__pyupgrade__tests__U011_U011_0.py.snap similarity index 98% rename from src/snapshots/ruff__linter__tests__U011_U011_0.py.snap rename to src/pyupgrade/snapshots/ruff__pyupgrade__tests__U011_U011_0.py.snap index c723449add..091da0df25 100644 --- a/src/snapshots/ruff__linter__tests__U011_U011_0.py.snap +++ b/src/pyupgrade/snapshots/ruff__pyupgrade__tests__U011_U011_0.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyupgrade/mod.rs expression: checks --- - kind: UnnecessaryLRUCacheParams diff --git a/src/pyupgrade/snapshots/ruff__pyupgrade__tests__U011_U011_1.py.snap b/src/pyupgrade/snapshots/ruff__pyupgrade__tests__U011_U011_1.py.snap new file mode 100644 index 0000000000..3d7dd185e1 --- /dev/null +++ b/src/pyupgrade/snapshots/ruff__pyupgrade__tests__U011_U011_1.py.snap @@ -0,0 +1,6 @@ +--- +source: src/pyupgrade/mod.rs +expression: checks +--- +[] + diff --git a/src/snapshots/ruff__linter__tests__U012_U012.py.snap b/src/pyupgrade/snapshots/ruff__pyupgrade__tests__U012_U012.py.snap similarity index 99% rename from src/snapshots/ruff__linter__tests__U012_U012.py.snap rename to src/pyupgrade/snapshots/ruff__pyupgrade__tests__U012_U012.py.snap index d9d4096c1c..8cdeb6106b 100644 --- a/src/snapshots/ruff__linter__tests__U012_U012.py.snap +++ b/src/pyupgrade/snapshots/ruff__pyupgrade__tests__U012_U012.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyupgrade/mod.rs expression: checks --- - kind: UnnecessaryEncodeUTF8 diff --git a/src/snapshots/ruff__linter__tests__U013_U013.py.snap b/src/pyupgrade/snapshots/ruff__pyupgrade__tests__U013_U013.py.snap similarity index 99% rename from src/snapshots/ruff__linter__tests__U013_U013.py.snap rename to src/pyupgrade/snapshots/ruff__pyupgrade__tests__U013_U013.py.snap index 7e964385d2..76405cb9cd 100644 --- a/src/snapshots/ruff__linter__tests__U013_U013.py.snap +++ b/src/pyupgrade/snapshots/ruff__pyupgrade__tests__U013_U013.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyupgrade/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__U014_U014.py.snap b/src/pyupgrade/snapshots/ruff__pyupgrade__tests__U014_U014.py.snap similarity index 97% rename from src/snapshots/ruff__linter__tests__U014_U014.py.snap rename to src/pyupgrade/snapshots/ruff__pyupgrade__tests__U014_U014.py.snap index c1dd906d65..4d6b9e7ac6 100644 --- a/src/snapshots/ruff__linter__tests__U014_U014.py.snap +++ b/src/pyupgrade/snapshots/ruff__pyupgrade__tests__U014_U014.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyupgrade/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__U015_U015.py.snap b/src/pyupgrade/snapshots/ruff__pyupgrade__tests__U015_U015.py.snap similarity index 99% rename from src/snapshots/ruff__linter__tests__U015_U015.py.snap rename to src/pyupgrade/snapshots/ruff__pyupgrade__tests__U015_U015.py.snap index dca5bdb087..03ab605147 100644 --- a/src/snapshots/ruff__linter__tests__U015_U015.py.snap +++ b/src/pyupgrade/snapshots/ruff__pyupgrade__tests__U015_U015.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyupgrade/mod.rs expression: checks --- - kind: RedundantOpenModes diff --git a/src/snapshots/ruff__linter__tests__future_annotations_pep_585_p37.snap b/src/pyupgrade/snapshots/ruff__pyupgrade__tests__future_annotations_pep_585_p37.snap similarity index 90% rename from src/snapshots/ruff__linter__tests__future_annotations_pep_585_p37.snap rename to src/pyupgrade/snapshots/ruff__pyupgrade__tests__future_annotations_pep_585_p37.snap index da928286b6..b31f7b9656 100644 --- a/src/snapshots/ruff__linter__tests__future_annotations_pep_585_p37.snap +++ b/src/pyupgrade/snapshots/ruff__pyupgrade__tests__future_annotations_pep_585_p37.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyupgrade/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__future_annotations_pep_585_py310.snap b/src/pyupgrade/snapshots/ruff__pyupgrade__tests__future_annotations_pep_585_py310.snap similarity index 95% rename from src/snapshots/ruff__linter__tests__future_annotations_pep_585_py310.snap rename to src/pyupgrade/snapshots/ruff__pyupgrade__tests__future_annotations_pep_585_py310.snap index 536b9eb093..37319d2e07 100644 --- a/src/snapshots/ruff__linter__tests__future_annotations_pep_585_py310.snap +++ b/src/pyupgrade/snapshots/ruff__pyupgrade__tests__future_annotations_pep_585_py310.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyupgrade/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__future_annotations_pep_604_p37.snap b/src/pyupgrade/snapshots/ruff__pyupgrade__tests__future_annotations_pep_604_p37.snap similarity index 90% rename from src/snapshots/ruff__linter__tests__future_annotations_pep_604_p37.snap rename to src/pyupgrade/snapshots/ruff__pyupgrade__tests__future_annotations_pep_604_p37.snap index 490bf1a637..34b8d8633d 100644 --- a/src/snapshots/ruff__linter__tests__future_annotations_pep_604_p37.snap +++ b/src/pyupgrade/snapshots/ruff__pyupgrade__tests__future_annotations_pep_604_p37.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyupgrade/mod.rs expression: checks --- - kind: UsePEP604Annotation diff --git a/src/snapshots/ruff__linter__tests__future_annotations_pep_604_py310.snap b/src/pyupgrade/snapshots/ruff__pyupgrade__tests__future_annotations_pep_604_py310.snap similarity index 90% rename from src/snapshots/ruff__linter__tests__future_annotations_pep_604_py310.snap rename to src/pyupgrade/snapshots/ruff__pyupgrade__tests__future_annotations_pep_604_py310.snap index 490bf1a637..34b8d8633d 100644 --- a/src/snapshots/ruff__linter__tests__future_annotations_pep_604_py310.snap +++ b/src/pyupgrade/snapshots/ruff__pyupgrade__tests__future_annotations_pep_604_py310.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/pyupgrade/mod.rs expression: checks --- - kind: UsePEP604Annotation diff --git a/src/rules/mod.rs b/src/rules/mod.rs index 8a4c0e9efc..02a17acb80 100644 --- a/src/rules/mod.rs +++ b/src/rules/mod.rs @@ -2,3 +2,52 @@ pub mod checks; pub mod plugins; + +#[cfg(test)] +mod tests { + use std::convert::AsRef; + use std::path::Path; + + use anyhow::Result; + use test_case::test_case; + + use crate::checks::CheckCode; + use crate::linter::test_path; + use crate::settings; + + #[test_case(CheckCode::RUF001, Path::new("RUF001.py"); "RUF001")] + #[test_case(CheckCode::RUF002, Path::new("RUF002.py"); "RUF002")] + #[test_case(CheckCode::RUF003, Path::new("RUF003.py"); "RUF003")] + #[test_case(CheckCode::RUF101, Path::new("RUF101_0.py"); "RUF101_0")] + #[test_case(CheckCode::RUF101, Path::new("RUF101_1.py"); "RUF101_1")] + #[test_case(CheckCode::RUF101, Path::new("RUF101_2.py"); "RUF101_2")] + #[test_case(CheckCode::RUF101, Path::new("RUF101_3.py"); "RUF101_3")] + #[test_case(CheckCode::RUF101, Path::new("RUF101_4.py"); "RUF101_4")] + #[test_case(CheckCode::RUF101, Path::new("RUF101_5.py"); "RUF101_5")] + #[test_case(CheckCode::RUF101, Path::new("RUF101_6.py"); "RUF101_6")] + fn checks(check_code: CheckCode, path: &Path) -> Result<()> { + let snapshot = format!("{}_{}", check_code.as_ref(), path.to_string_lossy()); + let mut checks = test_path( + Path::new("./resources/test/fixtures/ruff") + .join(path) + .as_path(), + &settings::Settings::for_rule(check_code), + true, + )?; + checks.sort_by_key(|check| check.location); + insta::assert_yaml_snapshot!(snapshot, checks); + Ok(()) + } + + #[test] + fn m001() -> Result<()> { + let mut checks = test_path( + Path::new("./resources/test/fixtures/ruff/M001.py"), + &settings::Settings::for_rules(vec![CheckCode::M001, CheckCode::E501, CheckCode::F841]), + true, + )?; + checks.sort_by_key(|check| check.location); + insta::assert_yaml_snapshot!(checks); + Ok(()) + } +} diff --git a/src/snapshots/ruff__linter__tests__RUF001_RUF001.py.snap b/src/rules/snapshots/ruff__rules__tests__RUF001_RUF001.py.snap similarity index 92% rename from src/snapshots/ruff__linter__tests__RUF001_RUF001.py.snap rename to src/rules/snapshots/ruff__rules__tests__RUF001_RUF001.py.snap index f1fe04f865..03d283e884 100644 --- a/src/snapshots/ruff__linter__tests__RUF001_RUF001.py.snap +++ b/src/rules/snapshots/ruff__rules__tests__RUF001_RUF001.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/rules/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__RUF002_RUF002.py.snap b/src/rules/snapshots/ruff__rules__tests__RUF002_RUF002.py.snap similarity index 92% rename from src/snapshots/ruff__linter__tests__RUF002_RUF002.py.snap rename to src/rules/snapshots/ruff__rules__tests__RUF002_RUF002.py.snap index 4301ec2584..dd63775bb4 100644 --- a/src/snapshots/ruff__linter__tests__RUF002_RUF002.py.snap +++ b/src/rules/snapshots/ruff__rules__tests__RUF002_RUF002.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/rules/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__RUF003_RUF003.py.snap b/src/rules/snapshots/ruff__rules__tests__RUF003_RUF003.py.snap similarity index 92% rename from src/snapshots/ruff__linter__tests__RUF003_RUF003.py.snap rename to src/rules/snapshots/ruff__rules__tests__RUF003_RUF003.py.snap index 4bdb81788c..6c588fb055 100644 --- a/src/snapshots/ruff__linter__tests__RUF003_RUF003.py.snap +++ b/src/rules/snapshots/ruff__rules__tests__RUF003_RUF003.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/rules/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__RUF101_RUF101_0.py.snap b/src/rules/snapshots/ruff__rules__tests__RUF101_RUF101_0.py.snap similarity index 91% rename from src/snapshots/ruff__linter__tests__RUF101_RUF101_0.py.snap rename to src/rules/snapshots/ruff__rules__tests__RUF101_RUF101_0.py.snap index 06b6376280..fc4d7df0a7 100644 --- a/src/snapshots/ruff__linter__tests__RUF101_RUF101_0.py.snap +++ b/src/rules/snapshots/ruff__rules__tests__RUF101_RUF101_0.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/rules/mod.rs expression: checks --- - kind: ConvertExitToSysExit diff --git a/src/snapshots/ruff__linter__tests__RUF101_RUF101_1.py.snap b/src/rules/snapshots/ruff__rules__tests__RUF101_RUF101_1.py.snap similarity index 95% rename from src/snapshots/ruff__linter__tests__RUF101_RUF101_1.py.snap rename to src/rules/snapshots/ruff__rules__tests__RUF101_RUF101_1.py.snap index a83f90051e..1d5659ecff 100644 --- a/src/snapshots/ruff__linter__tests__RUF101_RUF101_1.py.snap +++ b/src/rules/snapshots/ruff__rules__tests__RUF101_RUF101_1.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/rules/mod.rs expression: checks --- - kind: ConvertExitToSysExit diff --git a/src/snapshots/ruff__linter__tests__RUF101_RUF101_2.py.snap b/src/rules/snapshots/ruff__rules__tests__RUF101_RUF101_2.py.snap similarity index 95% rename from src/snapshots/ruff__linter__tests__RUF101_RUF101_2.py.snap rename to src/rules/snapshots/ruff__rules__tests__RUF101_RUF101_2.py.snap index 52fe6856c6..4acec7d793 100644 --- a/src/snapshots/ruff__linter__tests__RUF101_RUF101_2.py.snap +++ b/src/rules/snapshots/ruff__rules__tests__RUF101_RUF101_2.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/rules/mod.rs expression: checks --- - kind: ConvertExitToSysExit diff --git a/src/snapshots/ruff__linter__tests__D104_D.py.snap b/src/rules/snapshots/ruff__rules__tests__RUF101_RUF101_3.py.snap similarity index 55% rename from src/snapshots/ruff__linter__tests__D104_D.py.snap rename to src/rules/snapshots/ruff__rules__tests__RUF101_RUF101_3.py.snap index 60c615f917..2d70f06548 100644 --- a/src/snapshots/ruff__linter__tests__D104_D.py.snap +++ b/src/rules/snapshots/ruff__rules__tests__RUF101_RUF101_3.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/rules/mod.rs expression: checks --- [] diff --git a/src/snapshots/ruff__linter__tests__RUF101_RUF101_4.py.snap b/src/rules/snapshots/ruff__rules__tests__RUF101_RUF101_4.py.snap similarity index 95% rename from src/snapshots/ruff__linter__tests__RUF101_RUF101_4.py.snap rename to src/rules/snapshots/ruff__rules__tests__RUF101_RUF101_4.py.snap index d917d76acb..6d22eaf9b7 100644 --- a/src/snapshots/ruff__linter__tests__RUF101_RUF101_4.py.snap +++ b/src/rules/snapshots/ruff__rules__tests__RUF101_RUF101_4.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/rules/mod.rs expression: checks --- - kind: ConvertExitToSysExit diff --git a/src/snapshots/ruff__linter__tests__D106_D.py.snap b/src/rules/snapshots/ruff__rules__tests__RUF101_RUF101_5.py.snap similarity index 55% rename from src/snapshots/ruff__linter__tests__D106_D.py.snap rename to src/rules/snapshots/ruff__rules__tests__RUF101_RUF101_5.py.snap index 60c615f917..2d70f06548 100644 --- a/src/snapshots/ruff__linter__tests__D106_D.py.snap +++ b/src/rules/snapshots/ruff__rules__tests__RUF101_RUF101_5.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/rules/mod.rs expression: checks --- [] diff --git a/src/snapshots/ruff__linter__tests__RUF101_RUF101_6.py.snap b/src/rules/snapshots/ruff__rules__tests__RUF101_RUF101_6.py.snap similarity index 85% rename from src/snapshots/ruff__linter__tests__RUF101_RUF101_6.py.snap rename to src/rules/snapshots/ruff__rules__tests__RUF101_RUF101_6.py.snap index fa0b1c7c21..a6a8f9a07b 100644 --- a/src/snapshots/ruff__linter__tests__RUF101_RUF101_6.py.snap +++ b/src/rules/snapshots/ruff__rules__tests__RUF101_RUF101_6.py.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/rules/mod.rs expression: checks --- - kind: ConvertExitToSysExit diff --git a/src/snapshots/ruff__linter__tests__m001.snap b/src/rules/snapshots/ruff__rules__tests__m001.snap similarity index 99% rename from src/snapshots/ruff__linter__tests__m001.snap rename to src/rules/snapshots/ruff__rules__tests__m001.snap index 86b399e336..06a8524131 100644 --- a/src/snapshots/ruff__linter__tests__m001.snap +++ b/src/rules/snapshots/ruff__rules__tests__m001.snap @@ -1,5 +1,5 @@ --- -source: src/linter.rs +source: src/rules/mod.rs expression: checks --- - kind: diff --git a/src/snapshots/ruff__linter__tests__D404_D.py.snap b/src/snapshots/ruff__linter__tests__D404_D.py.snap deleted file mode 100644 index 60c615f917..0000000000 --- a/src/snapshots/ruff__linter__tests__D404_D.py.snap +++ /dev/null @@ -1,6 +0,0 @@ ---- -source: src/linter.rs -expression: checks ---- -[] - diff --git a/src/snapshots/ruff__linter__tests__D413_sections.py.snap b/src/snapshots/ruff__linter__tests__D413_sections.py.snap deleted file mode 100644 index 60c615f917..0000000000 --- a/src/snapshots/ruff__linter__tests__D413_sections.py.snap +++ /dev/null @@ -1,6 +0,0 @@ ---- -source: src/linter.rs -expression: checks ---- -[] - diff --git a/src/snapshots/ruff__linter__tests__D416_D.py.snap b/src/snapshots/ruff__linter__tests__D416_D.py.snap deleted file mode 100644 index 60c615f917..0000000000 --- a/src/snapshots/ruff__linter__tests__D416_D.py.snap +++ /dev/null @@ -1,6 +0,0 @@ ---- -source: src/linter.rs -expression: checks ---- -[] - diff --git a/src/snapshots/ruff__linter__tests__D417_canonical_google_examples.py.snap b/src/snapshots/ruff__linter__tests__D417_canonical_google_examples.py.snap deleted file mode 100644 index 60c615f917..0000000000 --- a/src/snapshots/ruff__linter__tests__D417_canonical_google_examples.py.snap +++ /dev/null @@ -1,6 +0,0 @@ ---- -source: src/linter.rs -expression: checks ---- -[] - diff --git a/src/snapshots/ruff__linter__tests__D417_canonical_numpy_examples.py.snap b/src/snapshots/ruff__linter__tests__D417_canonical_numpy_examples.py.snap deleted file mode 100644 index 60c615f917..0000000000 --- a/src/snapshots/ruff__linter__tests__D417_canonical_numpy_examples.py.snap +++ /dev/null @@ -1,6 +0,0 @@ ---- -source: src/linter.rs -expression: checks ---- -[] - diff --git a/src/snapshots/ruff__linter__tests__F401_F401_1.py.snap b/src/snapshots/ruff__linter__tests__F401_F401_1.py.snap deleted file mode 100644 index 60c615f917..0000000000 --- a/src/snapshots/ruff__linter__tests__F401_F401_1.py.snap +++ /dev/null @@ -1,6 +0,0 @@ ---- -source: src/linter.rs -expression: checks ---- -[] - diff --git a/src/snapshots/ruff__linter__tests__F401_F401_2.py.snap b/src/snapshots/ruff__linter__tests__F401_F401_2.py.snap deleted file mode 100644 index 60c615f917..0000000000 --- a/src/snapshots/ruff__linter__tests__F401_F401_2.py.snap +++ /dev/null @@ -1,6 +0,0 @@ ---- -source: src/linter.rs -expression: checks ---- -[] - diff --git a/src/snapshots/ruff__linter__tests__F401_F401_3.py.snap b/src/snapshots/ruff__linter__tests__F401_F401_3.py.snap deleted file mode 100644 index 60c615f917..0000000000 --- a/src/snapshots/ruff__linter__tests__F401_F401_3.py.snap +++ /dev/null @@ -1,6 +0,0 @@ ---- -source: src/linter.rs -expression: checks ---- -[] - diff --git a/src/snapshots/ruff__linter__tests__F401_F401_4.py.snap b/src/snapshots/ruff__linter__tests__F401_F401_4.py.snap deleted file mode 100644 index 60c615f917..0000000000 --- a/src/snapshots/ruff__linter__tests__F401_F401_4.py.snap +++ /dev/null @@ -1,6 +0,0 @@ ---- -source: src/linter.rs -expression: checks ---- -[] - diff --git a/src/snapshots/ruff__linter__tests__F505_F504.py.snap b/src/snapshots/ruff__linter__tests__F505_F504.py.snap deleted file mode 100644 index 60c615f917..0000000000 --- a/src/snapshots/ruff__linter__tests__F505_F504.py.snap +++ /dev/null @@ -1,6 +0,0 @@ ---- -source: src/linter.rs -expression: checks ---- -[] - diff --git a/src/snapshots/ruff__linter__tests__RUF101_RUF101_3.py.snap b/src/snapshots/ruff__linter__tests__RUF101_RUF101_3.py.snap deleted file mode 100644 index 60c615f917..0000000000 --- a/src/snapshots/ruff__linter__tests__RUF101_RUF101_3.py.snap +++ /dev/null @@ -1,6 +0,0 @@ ---- -source: src/linter.rs -expression: checks ---- -[] - diff --git a/src/snapshots/ruff__linter__tests__RUF101_RUF101_5.py.snap b/src/snapshots/ruff__linter__tests__RUF101_RUF101_5.py.snap deleted file mode 100644 index 60c615f917..0000000000 --- a/src/snapshots/ruff__linter__tests__RUF101_RUF101_5.py.snap +++ /dev/null @@ -1,6 +0,0 @@ ---- -source: src/linter.rs -expression: checks ---- -[] - diff --git a/src/snapshots/ruff__linter__tests__U009_U009_2.py.snap b/src/snapshots/ruff__linter__tests__U009_U009_2.py.snap deleted file mode 100644 index 60c615f917..0000000000 --- a/src/snapshots/ruff__linter__tests__U009_U009_2.py.snap +++ /dev/null @@ -1,6 +0,0 @@ ---- -source: src/linter.rs -expression: checks ---- -[] - diff --git a/src/snapshots/ruff__linter__tests__U009_U009_3.py.snap b/src/snapshots/ruff__linter__tests__U009_U009_3.py.snap deleted file mode 100644 index 60c615f917..0000000000 --- a/src/snapshots/ruff__linter__tests__U009_U009_3.py.snap +++ /dev/null @@ -1,6 +0,0 @@ ---- -source: src/linter.rs -expression: checks ---- -[] - diff --git a/src/snapshots/ruff__linter__tests__U009_U009_4.py.snap b/src/snapshots/ruff__linter__tests__U009_U009_4.py.snap deleted file mode 100644 index 60c615f917..0000000000 --- a/src/snapshots/ruff__linter__tests__U009_U009_4.py.snap +++ /dev/null @@ -1,6 +0,0 @@ ---- -source: src/linter.rs -expression: checks ---- -[] - diff --git a/src/snapshots/ruff__linter__tests__U011_U011_1.py.snap b/src/snapshots/ruff__linter__tests__U011_U011_1.py.snap deleted file mode 100644 index 60c615f917..0000000000 --- a/src/snapshots/ruff__linter__tests__U011_U011_1.py.snap +++ /dev/null @@ -1,6 +0,0 @@ ---- -source: src/linter.rs -expression: checks ---- -[] - diff --git a/src/snapshots/ruff__linter__tests__W292_W292_1.py.snap b/src/snapshots/ruff__linter__tests__W292_W292_1.py.snap deleted file mode 100644 index 60c615f917..0000000000 --- a/src/snapshots/ruff__linter__tests__W292_W292_1.py.snap +++ /dev/null @@ -1,6 +0,0 @@ ---- -source: src/linter.rs -expression: checks ---- -[] - diff --git a/src/snapshots/ruff__linter__tests__W292_W292_2.py.snap b/src/snapshots/ruff__linter__tests__W292_W292_2.py.snap deleted file mode 100644 index 60c615f917..0000000000 --- a/src/snapshots/ruff__linter__tests__W292_W292_2.py.snap +++ /dev/null @@ -1,6 +0,0 @@ ---- -source: src/linter.rs -expression: checks ---- -[] - diff --git a/src/snapshots/ruff__linter__tests__init.snap b/src/snapshots/ruff__linter__tests__init.snap deleted file mode 100644 index 60c615f917..0000000000 --- a/src/snapshots/ruff__linter__tests__init.snap +++ /dev/null @@ -1,6 +0,0 @@ ---- -source: src/linter.rs -expression: checks ---- -[] -