From 3b3603046149b64d35a85ac7a715e86b037ed42e Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Sat, 14 Jan 2023 06:32:43 +0100 Subject: [PATCH] Introduce ruff::rules module Resolves #1547. --- flake8_to_ruff/src/converter.rs | 23 ++++--- ruff_cli/src/cli.rs | 3 +- src/checkers/ast.rs | 18 ++--- src/checkers/imports.rs | 4 +- src/checkers/lines.rs | 8 ++- src/checkers/tokens.rs | 4 +- src/lib.rs | 34 +-------- src/lib_wasm.rs | 11 +-- src/{ => rules}/eradicate/detection.rs | 2 +- src/{ => rules}/eradicate/mod.rs | 0 src/{ => rules}/eradicate/rules.rs | 2 +- ...f__eradicate__tests__ERA001_ERA001.py.snap | 0 src/{ => rules}/flake8_2020/mod.rs | 0 src/{ => rules}/flake8_2020/rules.rs | 0 ..._flake8_2020__tests__YTT101_YTT101.py.snap | 0 ..._flake8_2020__tests__YTT102_YTT102.py.snap | 0 ..._flake8_2020__tests__YTT103_YTT103.py.snap | 0 ..._flake8_2020__tests__YTT201_YTT201.py.snap | 0 ..._flake8_2020__tests__YTT202_YTT202.py.snap | 0 ..._flake8_2020__tests__YTT203_YTT203.py.snap | 0 ..._flake8_2020__tests__YTT204_YTT204.py.snap | 0 ..._flake8_2020__tests__YTT301_YTT301.py.snap | 0 ..._flake8_2020__tests__YTT302_YTT302.py.snap | 0 ..._flake8_2020__tests__YTT303_YTT303.py.snap | 0 src/{ => rules}/flake8_annotations/fixes.rs | 0 src/{ => rules}/flake8_annotations/helpers.rs | 0 src/{ => rules}/flake8_annotations/mod.rs | 9 ++- src/{ => rules}/flake8_annotations/rules.rs | 4 +- .../flake8_annotations/settings.rs | 0 ...tations__tests__allow_nested_overload.snap | 0 ...e8_annotations__tests__allow_overload.snap | 0 ...nnotations__tests__allow_star_arg_any.snap | 0 ...__flake8_annotations__tests__defaults.snap | 0 ..._annotations__tests__mypy_init_return.snap | 0 ...notations__tests__suppress_dummy_args.snap | 0 ...tions__tests__suppress_none_returning.snap | 0 src/{ => rules}/flake8_bandit/helpers.rs | 0 src/{ => rules}/flake8_bandit/mod.rs | 3 +- .../flake8_bandit/rules/assert_used.rs | 0 .../rules/bad_file_permissions.rs | 0 .../flake8_bandit/rules/exec_used.rs | 0 .../rules/hardcoded_bind_all_interfaces.rs | 0 .../rules/hardcoded_password_default.rs | 2 +- .../rules/hardcoded_password_func_arg.rs | 2 +- .../rules/hardcoded_password_string.rs | 2 +- .../rules/hardcoded_tmp_directory.rs | 0 .../rules/hashlib_insecure_hash_functions.rs | 2 +- .../rules/jinja2_autoescape_false.rs | 0 src/{ => rules}/flake8_bandit/rules/mod.rs | 0 .../rules/request_with_no_cert_validation.rs | 0 .../rules/request_without_timeout.rs | 0 .../rules/snmp_insecure_version.rs | 0 .../rules/snmp_weak_cryptography.rs | 0 .../flake8_bandit/rules/unsafe_yaml_load.rs | 0 src/{ => rules}/flake8_bandit/settings.rs | 0 ...f__flake8_bandit__tests__S101_S101.py.snap | 0 ...f__flake8_bandit__tests__S102_S102.py.snap | 0 ...f__flake8_bandit__tests__S103_S103.py.snap | 0 ...f__flake8_bandit__tests__S104_S104.py.snap | 0 ...f__flake8_bandit__tests__S105_S105.py.snap | 0 ...f__flake8_bandit__tests__S106_S106.py.snap | 0 ...f__flake8_bandit__tests__S107_S107.py.snap | 0 ...f__flake8_bandit__tests__S108_S108.py.snap | 0 ...ff__flake8_bandit__tests__S108_extend.snap | 0 ...f__flake8_bandit__tests__S113_S113.py.snap | 0 ...f__flake8_bandit__tests__S324_S324.py.snap | 0 ...f__flake8_bandit__tests__S501_S501.py.snap | 0 ...f__flake8_bandit__tests__S506_S506.py.snap | 0 ...f__flake8_bandit__tests__S508_S508.py.snap | 0 ...f__flake8_bandit__tests__S509_S509.py.snap | 0 ...f__flake8_bandit__tests__S701_S701.py.snap | 0 src/{ => rules}/flake8_blind_except/mod.rs | 0 src/{ => rules}/flake8_blind_except/rules.rs | 0 ...e8_blind_except__tests__BLE001_BLE.py.snap | 0 src/{ => rules}/flake8_boolean_trap/mod.rs | 0 src/{ => rules}/flake8_boolean_trap/rules.rs | 0 ...e8_boolean_trap__tests__FBT001_FBT.py.snap | 0 ...e8_boolean_trap__tests__FBT002_FBT.py.snap | 0 ...e8_boolean_trap__tests__FBT003_FBT.py.snap | 0 src/{ => rules}/flake8_bugbear/mod.rs | 3 +- .../rules/abstract_base_class.rs | 0 .../flake8_bugbear/rules/assert_false.rs | 0 .../rules/assert_raises_exception.rs | 0 .../rules/assignment_to_os_environ.rs | 0 .../rules/cached_instance_method.rs | 0 .../rules/cannot_raise_literal.rs | 0 .../rules/duplicate_exceptions.rs | 0 .../rules/f_string_docstring.rs | 0 .../rules/function_call_argument_default.rs | 2 +- .../rules/function_uses_loop_variable.rs | 0 .../rules/getattr_with_constant.rs | 0 .../rules/jump_statement_in_finally.rs | 0 .../rules/loop_variable_overrides_iterator.rs | 0 src/{ => rules}/flake8_bugbear/rules/mod.rs | 0 .../rules/mutable_argument_default.rs | 0 .../rules/raise_without_from_inside_except.rs | 0 .../redundant_tuple_in_exception_handler.rs | 0 .../rules/setattr_with_constant.rs | 0 .../star_arg_unpacking_after_keyword_arg.rs | 0 .../rules/strip_with_multi_characters.rs | 0 .../rules/unary_prefix_increment.rs | 0 .../rules/unreliable_callable_check.rs | 0 .../rules/unused_loop_control_variable.rs | 0 .../rules/useless_comparison.rs | 0 .../rules/useless_contextlib_suppress.rs | 0 .../rules/useless_expression.rs | 0 .../rules/zip_without_explicit_strict.rs | 0 src/{ => rules}/flake8_bugbear/settings.rs | 0 ...__flake8_bugbear__tests__B002_B002.py.snap | 0 ...__flake8_bugbear__tests__B003_B003.py.snap | 0 ...__flake8_bugbear__tests__B004_B004.py.snap | 0 ...__flake8_bugbear__tests__B005_B005.py.snap | 0 ...ke8_bugbear__tests__B006_B006_B008.py.snap | 0 ...__flake8_bugbear__tests__B007_B007.py.snap | 0 ...ke8_bugbear__tests__B008_B006_B008.py.snap | 0 ...ke8_bugbear__tests__B009_B009_B010.py.snap | 0 ...ke8_bugbear__tests__B010_B009_B010.py.snap | 0 ...__flake8_bugbear__tests__B011_B011.py.snap | 0 ...__flake8_bugbear__tests__B012_B012.py.snap | 0 ...__flake8_bugbear__tests__B013_B013.py.snap | 0 ...__flake8_bugbear__tests__B014_B014.py.snap | 0 ...__flake8_bugbear__tests__B015_B015.py.snap | 0 ...__flake8_bugbear__tests__B016_B016.py.snap | 0 ...__flake8_bugbear__tests__B017_B017.py.snap | 0 ...__flake8_bugbear__tests__B018_B018.py.snap | 0 ...__flake8_bugbear__tests__B019_B019.py.snap | 0 ...__flake8_bugbear__tests__B020_B020.py.snap | 0 ...__flake8_bugbear__tests__B021_B021.py.snap | 0 ...__flake8_bugbear__tests__B022_B022.py.snap | 0 ...__flake8_bugbear__tests__B023_B023.py.snap | 0 ...__flake8_bugbear__tests__B024_B024.py.snap | 0 ...__flake8_bugbear__tests__B025_B025.py.snap | 0 ...__flake8_bugbear__tests__B026_B026.py.snap | 0 ...__flake8_bugbear__tests__B027_B027.py.snap | 0 ...__flake8_bugbear__tests__B904_B904.py.snap | 0 ...__flake8_bugbear__tests__B905_B905.py.snap | 0 ...ugbear__tests__extend_immutable_calls.snap | 0 src/{ => rules}/flake8_builtins/mod.rs | 0 src/{ => rules}/flake8_builtins/rules.rs | 2 +- ..._flake8_builtins__tests__A001_A001.py.snap | 0 ..._flake8_builtins__tests__A002_A002.py.snap | 0 ..._flake8_builtins__tests__A003_A003.py.snap | 0 src/{ => rules}/flake8_builtins/types.rs | 0 .../flake8_comprehensions/fixes.rs | 0 src/{ => rules}/flake8_comprehensions/mod.rs | 0 .../flake8_comprehensions/rules.rs | 2 +- ...8_comprehensions__tests__C400_C400.py.snap | 0 ...8_comprehensions__tests__C401_C401.py.snap | 0 ...8_comprehensions__tests__C402_C402.py.snap | 0 ...8_comprehensions__tests__C403_C403.py.snap | 0 ...8_comprehensions__tests__C404_C404.py.snap | 0 ...8_comprehensions__tests__C405_C405.py.snap | 0 ...8_comprehensions__tests__C406_C406.py.snap | 0 ...8_comprehensions__tests__C408_C408.py.snap | 0 ...8_comprehensions__tests__C409_C409.py.snap | 0 ...8_comprehensions__tests__C410_C410.py.snap | 0 ...8_comprehensions__tests__C411_C411.py.snap | 0 ...8_comprehensions__tests__C413_C413.py.snap | 0 ...8_comprehensions__tests__C414_C414.py.snap | 0 ...8_comprehensions__tests__C415_C415.py.snap | 0 ...8_comprehensions__tests__C416_C416.py.snap | 0 ...8_comprehensions__tests__C417_C417.py.snap | 0 src/{ => rules}/flake8_datetimez/mod.rs | 0 src/{ => rules}/flake8_datetimez/rules.rs | 0 ...e8_datetimez__tests__DTZ001_DTZ001.py.snap | 0 ...e8_datetimez__tests__DTZ002_DTZ002.py.snap | 0 ...e8_datetimez__tests__DTZ003_DTZ003.py.snap | 0 ...e8_datetimez__tests__DTZ004_DTZ004.py.snap | 0 ...e8_datetimez__tests__DTZ005_DTZ005.py.snap | 0 ...e8_datetimez__tests__DTZ006_DTZ006.py.snap | 0 ...e8_datetimez__tests__DTZ007_DTZ007.py.snap | 0 ...e8_datetimez__tests__DTZ011_DTZ011.py.snap | 0 ...e8_datetimez__tests__DTZ012_DTZ012.py.snap | 0 src/{ => rules}/flake8_debugger/mod.rs | 0 src/{ => rules}/flake8_debugger/rules.rs | 2 +- ..._flake8_debugger__tests__T100_T100.py.snap | 0 src/{ => rules}/flake8_debugger/types.rs | 0 src/{ => rules}/flake8_errmsg/mod.rs | 4 +- src/{ => rules}/flake8_errmsg/rules.rs | 0 src/{ => rules}/flake8_errmsg/settings.rs | 0 .../ruff__flake8_errmsg__tests__custom.snap | 0 .../ruff__flake8_errmsg__tests__defaults.snap | 0 .../flake8_implicit_str_concat/mod.rs | 0 .../flake8_implicit_str_concat/rules.rs | 0 ...icit_str_concat__tests__ISC001_ISC.py.snap | 0 ...icit_str_concat__tests__ISC002_ISC.py.snap | 0 ...icit_str_concat__tests__ISC003_ISC.py.snap | 0 .../flake8_import_conventions/mod.rs | 7 +- .../flake8_import_conventions/rules.rs | 0 .../flake8_import_conventions/settings.rs | 0 ...ke8_import_conventions__tests__custom.snap | 0 ...8_import_conventions__tests__defaults.snap | 0 ..._conventions__tests__override_default.snap | 0 ...rt_conventions__tests__remove_default.snap | 0 src/{ => rules}/flake8_pie/mod.rs | 0 src/{ => rules}/flake8_pie/rules.rs | 0 ...__flake8_pie__tests__PIE790_PIE790.py.snap | 0 ...__flake8_pie__tests__PIE794_PIE794.py.snap | 0 ...__flake8_pie__tests__PIE807_PIE807.py.snap | 0 src/{ => rules}/flake8_print/mod.rs | 0 src/{ => rules}/flake8_print/rules/mod.rs | 0 .../flake8_print/rules/print_call.rs | 0 ...ff__flake8_print__tests__T201_T201.py.snap | 0 ...ff__flake8_print__tests__T203_T203.py.snap | 0 src/{ => rules}/flake8_pytest_style/mod.rs | 4 +- .../flake8_pytest_style/rules/assertion.rs | 0 .../flake8_pytest_style/rules/fail.rs | 0 .../flake8_pytest_style/rules/fixture.rs | 0 .../flake8_pytest_style/rules/helpers.rs | 0 .../flake8_pytest_style/rules/imports.rs | 0 .../flake8_pytest_style/rules/marks.rs | 0 .../flake8_pytest_style/rules/mod.rs | 0 .../flake8_pytest_style/rules/parametrize.rs | 2 +- .../flake8_pytest_style/rules/patch.rs | 0 .../flake8_pytest_style/rules/raises.rs | 0 .../rules/unittest_assert.rs | 0 .../flake8_pytest_style/settings.rs | 0 ...e8_pytest_style__tests__PT001_default.snap | 0 ...st_style__tests__PT001_no_parentheses.snap | 0 ...ff__flake8_pytest_style__tests__PT002.snap | 0 ...ff__flake8_pytest_style__tests__PT003.snap | 0 ...ff__flake8_pytest_style__tests__PT004.snap | 0 ...ff__flake8_pytest_style__tests__PT005.snap | 0 ...flake8_pytest_style__tests__PT006_csv.snap | 0 ...e8_pytest_style__tests__PT006_default.snap | 0 ...lake8_pytest_style__tests__PT006_list.snap | 0 ...est_style__tests__PT007_list_of_lists.snap | 0 ...st_style__tests__PT007_list_of_tuples.snap | 0 ...st_style__tests__PT007_tuple_of_lists.snap | 0 ...t_style__tests__PT007_tuple_of_tuples.snap | 0 ...ff__flake8_pytest_style__tests__PT008.snap | 0 ...ff__flake8_pytest_style__tests__PT009.snap | 0 ...ff__flake8_pytest_style__tests__PT010.snap | 0 ...e8_pytest_style__tests__PT011_default.snap | 0 ..._tests__PT011_extend_broad_exceptions.snap | 0 ...tests__PT011_replace_broad_exceptions.snap | 0 ...ff__flake8_pytest_style__tests__PT012.snap | 0 ...ff__flake8_pytest_style__tests__PT013.snap | 0 ...ff__flake8_pytest_style__tests__PT015.snap | 0 ...ff__flake8_pytest_style__tests__PT016.snap | 0 ...ff__flake8_pytest_style__tests__PT017.snap | 0 ...ff__flake8_pytest_style__tests__PT018.snap | 0 ...ff__flake8_pytest_style__tests__PT019.snap | 0 ...ff__flake8_pytest_style__tests__PT020.snap | 0 ...ff__flake8_pytest_style__tests__PT021.snap | 0 ...ff__flake8_pytest_style__tests__PT022.snap | 0 ...e8_pytest_style__tests__PT023_default.snap | 0 ...st_style__tests__PT023_no_parentheses.snap | 0 ...ff__flake8_pytest_style__tests__PT024.snap | 0 ...ff__flake8_pytest_style__tests__PT025.snap | 0 ...ff__flake8_pytest_style__tests__PT026.snap | 0 src/{ => rules}/flake8_pytest_style/types.rs | 0 src/{ => rules}/flake8_quotes/mod.rs | 11 ++- src/{ => rules}/flake8_quotes/rules.rs | 2 +- src/{ => rules}/flake8_quotes/settings.rs | 0 ...double_docstring_docstring_doubles.py.snap | 0 ..._docstring_docstring_doubles_class.py.snap | 0 ...cstring_docstring_doubles_function.py.snap | 0 ...docstring_doubles_module_multiline.py.snap | 0 ...ocstring_doubles_module_singleline.py.snap | 0 ...double_docstring_docstring_singles.py.snap | 0 ..._docstring_docstring_singles_class.py.snap | 0 ...cstring_docstring_singles_function.py.snap | 0 ...docstring_singles_module_multiline.py.snap | 0 ...ocstring_singles_module_singleline.py.snap | 0 ...ke8_quotes__tests__doubles_doubles.py.snap | 0 ...es__tests__doubles_doubles_escaped.py.snap | 0 ...__doubles_doubles_multiline_string.py.snap | 0 ...uotes__tests__doubles_doubles_noqa.py.snap | 0 ...es__tests__doubles_doubles_wrapped.py.snap | 0 ...single_docstring_docstring_doubles.py.snap | 0 ..._docstring_docstring_doubles_class.py.snap | 0 ...cstring_docstring_doubles_function.py.snap | 0 ...docstring_doubles_module_multiline.py.snap | 0 ...ocstring_doubles_module_singleline.py.snap | 0 ...single_docstring_docstring_singles.py.snap | 0 ..._docstring_docstring_singles_class.py.snap | 0 ...cstring_docstring_singles_function.py.snap | 0 ...docstring_singles_module_multiline.py.snap | 0 ...ocstring_singles_module_singleline.py.snap | 0 ...ke8_quotes__tests__singles_singles.py.snap | 0 ...es__tests__singles_singles_escaped.py.snap | 0 ...__singles_singles_multiline_string.py.snap | 0 ...uotes__tests__singles_singles_noqa.py.snap | 0 ...es__tests__singles_singles_wrapped.py.snap | 0 src/{ => rules}/flake8_return/helpers.rs | 0 src/{ => rules}/flake8_return/mod.rs | 0 src/{ => rules}/flake8_return/rules.rs | 4 +- ...lake8_return__tests__RET501_RET501.py.snap | 0 ...lake8_return__tests__RET502_RET502.py.snap | 0 ...lake8_return__tests__RET503_RET503.py.snap | 0 ...lake8_return__tests__RET504_RET504.py.snap | 0 ...lake8_return__tests__RET505_RET505.py.snap | 0 ...lake8_return__tests__RET506_RET506.py.snap | 0 ...lake8_return__tests__RET507_RET507.py.snap | 0 ...lake8_return__tests__RET508_RET508.py.snap | 0 src/{ => rules}/flake8_return/visitor.rs | 0 src/{ => rules}/flake8_simplify/mod.rs | 0 .../flake8_simplify/rules/ast_bool_op.rs | 0 .../flake8_simplify/rules/ast_expr.rs | 0 .../flake8_simplify/rules/ast_for.rs | 0 .../flake8_simplify/rules/ast_if.rs | 0 .../flake8_simplify/rules/ast_ifexp.rs | 0 .../flake8_simplify/rules/ast_unary_op.rs | 0 .../flake8_simplify/rules/ast_with.rs | 0 .../flake8_simplify/rules/key_in_dict.rs | 0 src/{ => rules}/flake8_simplify/rules/mod.rs | 0 .../rules/open_file_with_context_handler.rs | 0 .../rules/return_in_try_except_finally.rs | 0 .../rules/use_contextlib_suppress.rs | 0 .../flake8_simplify/rules/yoda_conditions.rs | 0 ...ke8_simplify__tests__SIM101_SIM101.py.snap | 0 ...ke8_simplify__tests__SIM102_SIM102.py.snap | 0 ...ke8_simplify__tests__SIM103_SIM103.py.snap | 0 ...ke8_simplify__tests__SIM105_SIM105.py.snap | 0 ...ke8_simplify__tests__SIM107_SIM107.py.snap | 0 ...ke8_simplify__tests__SIM108_SIM108.py.snap | 0 ...ke8_simplify__tests__SIM109_SIM109.py.snap | 0 ...ke8_simplify__tests__SIM110_SIM110.py.snap | 0 ...ke8_simplify__tests__SIM111_SIM111.py.snap | 0 ...ke8_simplify__tests__SIM112_SIM112.py.snap | 0 ...ke8_simplify__tests__SIM115_SIM115.py.snap | 0 ...ke8_simplify__tests__SIM117_SIM117.py.snap | 0 ...ke8_simplify__tests__SIM118_SIM118.py.snap | 0 ...ke8_simplify__tests__SIM201_SIM201.py.snap | 0 ...ke8_simplify__tests__SIM202_SIM202.py.snap | 0 ...ke8_simplify__tests__SIM208_SIM208.py.snap | 0 ...ke8_simplify__tests__SIM210_SIM210.py.snap | 0 ...ke8_simplify__tests__SIM211_SIM211.py.snap | 0 ...ke8_simplify__tests__SIM212_SIM212.py.snap | 0 ...ke8_simplify__tests__SIM220_SIM220.py.snap | 0 ...ke8_simplify__tests__SIM221_SIM221.py.snap | 0 ...ke8_simplify__tests__SIM222_SIM222.py.snap | 0 ...ke8_simplify__tests__SIM223_SIM223.py.snap | 0 ...ke8_simplify__tests__SIM300_SIM300.py.snap | 0 ...ke8_simplify__tests__SIM401_SIM401.py.snap | 0 src/{ => rules}/flake8_tidy_imports/mod.rs | 9 ++- src/{ => rules}/flake8_tidy_imports/rules.rs | 3 +- .../flake8_tidy_imports/settings.rs | 0 ..._tidy_imports__tests__ban_all_imports.snap | 0 ...dy_imports__tests__ban_parent_imports.snap | 0 ...rts__tests__banned_api_true_positives.snap | 0 .../flake8_unused_arguments/helpers.rs | 0 .../flake8_unused_arguments/mod.rs | 6 +- .../flake8_unused_arguments/rules.rs | 4 +- .../flake8_unused_arguments/settings.rs | 0 ...nused_arguments__tests__ARG001_ARG.py.snap | 0 ...nused_arguments__tests__ARG002_ARG.py.snap | 0 ...nused_arguments__tests__ARG003_ARG.py.snap | 0 ...nused_arguments__tests__ARG004_ARG.py.snap | 0 ...nused_arguments__tests__ARG005_ARG.py.snap | 0 ...uments__tests__enforce_variadic_names.snap | 0 ...guments__tests__ignore_variadic_names.snap | 0 .../flake8_unused_arguments/types.rs | 0 src/{ => rules}/isort/categorize.rs | 0 src/{ => rules}/isort/comments.rs | 0 src/{ => rules}/isort/format.rs | 2 +- src/{ => rules}/isort/helpers.rs | 4 +- src/{ => rules}/isort/mod.rs | 69 +++++++++---------- .../isort/rules/add_required_imports.rs | 4 +- src/{ => rules}/isort/rules/mod.rs | 0 .../isort/rules/organize_imports.rs | 4 +- src/{ => rules}/isort/settings.rs | 0 ...tests__add_newline_before_comments.py.snap | 0 ...to_furthest_relative_imports_order.py.snap | 0 ...__isort__tests__combine_as_imports.py.snap | 0 ...bine_as_imports_combine_as_imports.py.snap | 0 ..._isort__tests__combine_import_from.py.snap | 0 ...ombined_required_imports_docstring.py.snap | 0 ...ed_required_imports_docstring_only.py.snap | 0 ...s__combined_required_imports_empty.py.snap | 0 .../ruff__isort__tests__comments.py.snap | 0 ..._isort__tests__deduplicate_imports.py.snap | 0 ...uff__isort__tests__fit_line_length.py.snap | 0 ...rt__tests__fit_line_length_comment.py.snap | 0 ...orce_single_line_force_single_line.py.snap | 0 ..._tests__force_sort_within_sections.py.snap | 0 ...ections_force_sort_within_sections.py.snap | 0 ...__isort__tests__force_wrap_aliases.py.snap | 0 ...ce_wrap_aliases_force_wrap_aliases.py.snap | 0 ...t__tests__import_from_after_import.py.snap | 0 ...uff__isort__tests__inline_comments.py.snap | 0 ...__isort__tests__insert_empty_lines.py.snap | 0 ..._isort__tests__insert_empty_lines.pyi.snap | 0 ...ruff__isort__tests__leading_prefix.py.snap | 0 ...ruff__isort__tests__line_ending_cr.py.snap | 0 ...ff__isort__tests__line_ending_crlf.py.snap | 0 ...ruff__isort__tests__line_ending_lf.py.snap | 0 ...isort__tests__magic_trailing_comma.py.snap | 0 .../ruff__isort__tests__natural_order.py.snap | 0 ...__tests__no_reorder_within_section.py.snap | 0 .../ruff__isort__tests__no_wrap_star.py.snap | 0 .../ruff__isort__tests__order_by_type.py.snap | 0 ..._order_by_type_false_order_by_type.py.snap | 0 ..._order_by_type_with_custom_classes.py.snap | 0 ..._order_by_type_with_custom_classes.py.snap | 0 ...s__order_relative_imports_by_level.py.snap | 0 ...ort__tests__preserve_comment_order.py.snap | 0 ...isort__tests__preserve_import_star.py.snap | 0 ...isort__tests__preserve_indentation.py.snap | 0 ...ort__tests__relative_imports_order.py.snap | 0 ...ort__tests__reorder_within_section.py.snap | 0 ...__tests__required_import_docstring.py.snap | 0 ...ts__required_import_docstring_only.py.snap | 0 ...sort__tests__required_import_empty.py.snap | 0 ..._tests__required_imports_docstring.py.snap | 0 ...s__required_imports_docstring_only.py.snap | 0 ...ort__tests__required_imports_empty.py.snap | 0 ...ests__separate_first_party_imports.py.snap | 0 ...rt__tests__separate_future_imports.py.snap | 0 ...sts__separate_local_folder_imports.py.snap | 0 ...ests__separate_third_party_imports.py.snap | 0 .../ruff__isort__tests__skip.py.snap | 0 .../ruff__isort__tests__skip_file.py.snap | 0 ...isort__tests__sort_similar_imports.py.snap | 0 .../ruff__isort__tests__split.py.snap | 0 ...railing_comma_magic_trailing_comma.py.snap | 0 ...straight_required_import_docstring.py.snap | 0 ...ght_required_import_docstring_only.py.snap | 0 ...ts__straight_required_import_empty.py.snap | 0 ...uff__isort__tests__trailing_suffix.py.snap | 0 .../ruff__isort__tests__type_comments.py.snap | 0 src/{ => rules}/isort/sorting.rs | 6 +- src/{ => rules}/isort/track.rs | 2 +- src/{ => rules}/isort/types.rs | 0 src/{ => rules}/mccabe/mod.rs | 3 +- src/{ => rules}/mccabe/rules.rs | 2 +- src/{ => rules}/mccabe/settings.rs | 0 ...ruff__mccabe__tests__max_complexity_0.snap | 0 ...uff__mccabe__tests__max_complexity_10.snap | 0 ...ruff__mccabe__tests__max_complexity_3.snap | 0 src/rules/mod.rs | 33 +++++++++ src/{ => rules}/pandas_vet/helpers.rs | 0 src/{ => rules}/pandas_vet/mod.rs | 0 src/{ => rules}/pandas_vet/rules.rs | 0 src/{ => rules}/pep8_naming/helpers.rs | 2 +- src/{ => rules}/pep8_naming/mod.rs | 0 src/{ => rules}/pep8_naming/rules.rs | 2 +- src/{ => rules}/pep8_naming/settings.rs | 0 ...uff__pep8_naming__tests__N801_N801.py.snap | 0 ...uff__pep8_naming__tests__N802_N802.py.snap | 0 ...uff__pep8_naming__tests__N803_N803.py.snap | 0 ...uff__pep8_naming__tests__N804_N804.py.snap | 0 ...uff__pep8_naming__tests__N805_N805.py.snap | 0 ...uff__pep8_naming__tests__N806_N806.py.snap | 0 ...uff__pep8_naming__tests__N807_N807.py.snap | 0 ...uff__pep8_naming__tests__N811_N811.py.snap | 0 ...uff__pep8_naming__tests__N812_N812.py.snap | 0 ...uff__pep8_naming__tests__N813_N813.py.snap | 0 ...uff__pep8_naming__tests__N814_N814.py.snap | 0 ...uff__pep8_naming__tests__N815_N815.py.snap | 0 ...uff__pep8_naming__tests__N816_N816.py.snap | 0 ...uff__pep8_naming__tests__N817_N817.py.snap | 0 ...uff__pep8_naming__tests__N818_N818.py.snap | 0 src/{ => rules}/pycodestyle/mod.rs | 0 src/{ => rules}/pycodestyle/rules.rs | 0 src/{ => rules}/pycodestyle/settings.rs | 0 ...ruff__pycodestyle__tests__E401_E40.py.snap | 0 ...ruff__pycodestyle__tests__E402_E40.py.snap | 0 ...uff__pycodestyle__tests__E402_E402.py.snap | 0 ...uff__pycodestyle__tests__E501_E501.py.snap | 0 ...uff__pycodestyle__tests__E711_E711.py.snap | 0 ...uff__pycodestyle__tests__E712_E712.py.snap | 0 ...uff__pycodestyle__tests__E713_E713.py.snap | 0 ...uff__pycodestyle__tests__E714_E714.py.snap | 0 ...uff__pycodestyle__tests__E721_E721.py.snap | 0 ...uff__pycodestyle__tests__E722_E722.py.snap | 0 ...uff__pycodestyle__tests__E731_E731.py.snap | 0 ...uff__pycodestyle__tests__E741_E741.py.snap | 0 ...uff__pycodestyle__tests__E742_E742.py.snap | 0 ...uff__pycodestyle__tests__E743_E743.py.snap | 0 ...uff__pycodestyle__tests__E999_E999.py.snap | 0 ...f__pycodestyle__tests__W292_W292_0.py.snap | 0 ...f__pycodestyle__tests__W292_W292_1.py.snap | 0 ...f__pycodestyle__tests__W292_W292_2.py.snap | 0 ...f__pycodestyle__tests__W292_W292_3.py.snap | 0 ...f__pycodestyle__tests__W292_W292_4.py.snap | 0 ...f__pycodestyle__tests__W605_W605_0.py.snap | 0 ...f__pycodestyle__tests__W605_W605_1.py.snap | 0 ...pycodestyle__tests__constant_literals.snap | 0 ...f__pycodestyle__tests__max_doc_length.snap | 0 ...__pycodestyle__tests__task_tags_false.snap | 0 ...f__pycodestyle__tests__task_tags_true.snap | 0 src/{ => rules}/pydocstyle/helpers.rs | 0 src/{ => rules}/pydocstyle/mod.rs | 2 +- src/{ => rules}/pydocstyle/rules.rs | 4 +- src/{ => rules}/pydocstyle/settings.rs | 0 .../ruff__pydocstyle__tests__D100_D.py.snap | 0 .../ruff__pydocstyle__tests__D101_D.py.snap | 0 .../ruff__pydocstyle__tests__D102_D.py.snap | 0 .../ruff__pydocstyle__tests__D103_D.py.snap | 0 .../ruff__pydocstyle__tests__D104_D.py.snap | 0 ...cstyle__tests__D104_D104____init__.py.snap | 0 .../ruff__pydocstyle__tests__D105_D.py.snap | 0 .../ruff__pydocstyle__tests__D106_D.py.snap | 0 .../ruff__pydocstyle__tests__D107_D.py.snap | 0 .../ruff__pydocstyle__tests__D201_D.py.snap | 0 .../ruff__pydocstyle__tests__D202_D.py.snap | 0 .../ruff__pydocstyle__tests__D203_D.py.snap | 0 .../ruff__pydocstyle__tests__D204_D.py.snap | 0 .../ruff__pydocstyle__tests__D205_D.py.snap | 0 .../ruff__pydocstyle__tests__D206_D.py.snap | 0 .../ruff__pydocstyle__tests__D207_D.py.snap | 0 .../ruff__pydocstyle__tests__D208_D.py.snap | 0 .../ruff__pydocstyle__tests__D209_D.py.snap | 0 .../ruff__pydocstyle__tests__D210_D.py.snap | 0 .../ruff__pydocstyle__tests__D211_D.py.snap | 0 .../ruff__pydocstyle__tests__D212_D.py.snap | 0 .../ruff__pydocstyle__tests__D213_D.py.snap | 0 ...__pydocstyle__tests__D214_sections.py.snap | 0 ...__pydocstyle__tests__D215_sections.py.snap | 0 .../ruff__pydocstyle__tests__D300_D.py.snap | 0 .../ruff__pydocstyle__tests__D301_D.py.snap | 0 .../ruff__pydocstyle__tests__D400_D.py.snap | 0 ...ruff__pydocstyle__tests__D400_D400.py.snap | 0 .../ruff__pydocstyle__tests__D402_D.py.snap | 0 .../ruff__pydocstyle__tests__D403_D.py.snap | 0 .../ruff__pydocstyle__tests__D404_D.py.snap | 0 ...__pydocstyle__tests__D405_sections.py.snap | 0 ...__pydocstyle__tests__D406_sections.py.snap | 0 ...__pydocstyle__tests__D407_sections.py.snap | 0 ...__pydocstyle__tests__D408_sections.py.snap | 0 ...__pydocstyle__tests__D409_sections.py.snap | 0 ...__pydocstyle__tests__D410_sections.py.snap | 0 ...__pydocstyle__tests__D411_sections.py.snap | 0 ...__pydocstyle__tests__D412_sections.py.snap | 0 ...__pydocstyle__tests__D413_sections.py.snap | 0 ...__pydocstyle__tests__D414_sections.py.snap | 0 .../ruff__pydocstyle__tests__D415_D.py.snap | 0 .../ruff__pydocstyle__tests__D416_D.py.snap | 0 ...ts__D417_canonical_google_examples.py.snap | 0 ...sts__D417_canonical_numpy_examples.py.snap | 0 ...__pydocstyle__tests__D417_sections.py.snap | 0 .../ruff__pydocstyle__tests__D418_D.py.snap | 0 .../ruff__pydocstyle__tests__D419_D.py.snap | 0 .../ruff__pydocstyle__tests__d417_google.snap | 0 .../ruff__pydocstyle__tests__d417_numpy.snap | 0 ...__pydocstyle__tests__d417_unspecified.snap | 0 src/{ => rules}/pyflakes/cformat.rs | 0 src/{ => rules}/pyflakes/fixes.rs | 0 src/{ => rules}/pyflakes/format.rs | 0 src/{ => rules}/pyflakes/mod.rs | 0 .../pyflakes/rules/assert_tuple.rs | 0 .../rules/f_string_missing_placeholders.rs | 0 src/{ => rules}/pyflakes/rules/if_tuple.rs | 0 .../rules/invalid_literal_comparisons.rs | 0 .../pyflakes/rules/invalid_print_syntax.rs | 0 src/{ => rules}/pyflakes/rules/mod.rs | 0 .../pyflakes/rules/raise_not_implemented.rs | 0 .../pyflakes/rules/repeated_keys.rs | 0 src/{ => rules}/pyflakes/rules/strings.rs | 10 +-- .../pyflakes/rules/unused_annotation.rs | 0 .../pyflakes/rules/unused_variable.rs | 0 ...ruff__pyflakes__tests__F401_F401_0.py.snap | 0 ...ruff__pyflakes__tests__F401_F401_1.py.snap | 0 ...ruff__pyflakes__tests__F401_F401_2.py.snap | 0 ...ruff__pyflakes__tests__F401_F401_3.py.snap | 0 ...ruff__pyflakes__tests__F401_F401_4.py.snap | 0 ...ruff__pyflakes__tests__F401_F401_5.py.snap | 0 ...ruff__pyflakes__tests__F401_F401_6.py.snap | 0 ...ruff__pyflakes__tests__F401_F401_7.py.snap | 0 .../ruff__pyflakes__tests__F402_F402.py.snap | 0 .../ruff__pyflakes__tests__F403_F403.py.snap | 0 .../ruff__pyflakes__tests__F404_F404.py.snap | 0 .../ruff__pyflakes__tests__F405_F405.py.snap | 0 .../ruff__pyflakes__tests__F406_F406.py.snap | 0 .../ruff__pyflakes__tests__F407_F407.py.snap | 0 .../ruff__pyflakes__tests__F501_F50x.py.snap | 0 .../ruff__pyflakes__tests__F502_F502.py.snap | 0 .../ruff__pyflakes__tests__F502_F50x.py.snap | 0 .../ruff__pyflakes__tests__F503_F503.py.snap | 0 .../ruff__pyflakes__tests__F503_F50x.py.snap | 0 .../ruff__pyflakes__tests__F504_F504.py.snap | 0 .../ruff__pyflakes__tests__F504_F50x.py.snap | 0 .../ruff__pyflakes__tests__F505_F504.py.snap | 0 .../ruff__pyflakes__tests__F505_F50x.py.snap | 0 .../ruff__pyflakes__tests__F506_F50x.py.snap | 0 .../ruff__pyflakes__tests__F507_F50x.py.snap | 0 .../ruff__pyflakes__tests__F508_F50x.py.snap | 0 .../ruff__pyflakes__tests__F509_F50x.py.snap | 0 .../ruff__pyflakes__tests__F521_F521.py.snap | 0 .../ruff__pyflakes__tests__F522_F522.py.snap | 0 .../ruff__pyflakes__tests__F523_F523.py.snap | 0 .../ruff__pyflakes__tests__F524_F524.py.snap | 0 .../ruff__pyflakes__tests__F525_F525.py.snap | 0 .../ruff__pyflakes__tests__F541_F541.py.snap | 0 .../ruff__pyflakes__tests__F601_F601.py.snap | 0 .../ruff__pyflakes__tests__F602_F602.py.snap | 0 .../ruff__pyflakes__tests__F622_F622.py.snap | 0 .../ruff__pyflakes__tests__F631_F631.py.snap | 0 .../ruff__pyflakes__tests__F632_F632.py.snap | 0 .../ruff__pyflakes__tests__F633_F633.py.snap | 0 .../ruff__pyflakes__tests__F634_F634.py.snap | 0 .../ruff__pyflakes__tests__F701_F701.py.snap | 0 .../ruff__pyflakes__tests__F702_F702.py.snap | 0 .../ruff__pyflakes__tests__F704_F704.py.snap | 0 .../ruff__pyflakes__tests__F706_F706.py.snap | 0 .../ruff__pyflakes__tests__F707_F707.py.snap | 0 .../ruff__pyflakes__tests__F722_F722.py.snap | 0 ...ruff__pyflakes__tests__F811_F811_0.py.snap | 0 ...ruff__pyflakes__tests__F811_F811_1.py.snap | 0 ...uff__pyflakes__tests__F811_F811_10.py.snap | 0 ...uff__pyflakes__tests__F811_F811_11.py.snap | 0 ...uff__pyflakes__tests__F811_F811_12.py.snap | 0 ...uff__pyflakes__tests__F811_F811_13.py.snap | 0 ...uff__pyflakes__tests__F811_F811_14.py.snap | 0 ...uff__pyflakes__tests__F811_F811_15.py.snap | 0 ...uff__pyflakes__tests__F811_F811_16.py.snap | 0 ...uff__pyflakes__tests__F811_F811_17.py.snap | 0 ...uff__pyflakes__tests__F811_F811_18.py.snap | 0 ...uff__pyflakes__tests__F811_F811_19.py.snap | 0 ...ruff__pyflakes__tests__F811_F811_2.py.snap | 0 ...uff__pyflakes__tests__F811_F811_20.py.snap | 0 ...ruff__pyflakes__tests__F811_F811_3.py.snap | 0 ...ruff__pyflakes__tests__F811_F811_4.py.snap | 0 ...ruff__pyflakes__tests__F811_F811_5.py.snap | 0 ...ruff__pyflakes__tests__F811_F811_6.py.snap | 0 ...ruff__pyflakes__tests__F811_F811_7.py.snap | 0 ...ruff__pyflakes__tests__F811_F811_8.py.snap | 0 ...ruff__pyflakes__tests__F811_F811_9.py.snap | 0 ...ruff__pyflakes__tests__F821_F821_0.py.snap | 0 ...ruff__pyflakes__tests__F821_F821_1.py.snap | 0 ...ruff__pyflakes__tests__F821_F821_2.py.snap | 0 ...ruff__pyflakes__tests__F821_F821_3.py.snap | 0 ...ruff__pyflakes__tests__F821_F821_4.py.snap | 0 ...ruff__pyflakes__tests__F821_F821_5.py.snap | 0 ...ruff__pyflakes__tests__F821_F821_6.py.snap | 0 ...ruff__pyflakes__tests__F821_F821_7.py.snap | 0 ...uff__pyflakes__tests__F821_F821_8.pyi.snap | 0 .../ruff__pyflakes__tests__F822_F822.py.snap | 0 .../ruff__pyflakes__tests__F823_F823.py.snap | 0 ...ruff__pyflakes__tests__F841_F841_0.py.snap | 0 ...ruff__pyflakes__tests__F841_F841_1.py.snap | 0 ...ruff__pyflakes__tests__F841_F841_2.py.snap | 0 ...ruff__pyflakes__tests__F841_F841_3.py.snap | 0 .../ruff__pyflakes__tests__F842_F842.py.snap | 0 .../ruff__pyflakes__tests__F901_F901.py.snap | 0 ...ff__pyflakes__tests__default_builtins.snap | 0 ...flakes__tests__default_typing_modules.snap | 0 ...ruff__pyflakes__tests__extra_builtins.snap | 0 ...pyflakes__tests__extra_typing_modules.snap | 0 ...lakes__tests__f841_dummy_variable_rgx.snap | 0 ...__pyflakes__tests__future_annotations.snap | 0 .../ruff__pyflakes__tests__init.snap | 0 ...yflakes__tests__multi_statement_lines.snap | 0 src/{ => rules}/pygrep_hooks/mod.rs | 0 .../pygrep_hooks/rules/blanket_noqa.rs | 0 .../pygrep_hooks/rules/blanket_type_ignore.rs | 0 .../pygrep_hooks/rules/deprecated_log_warn.rs | 0 src/{ => rules}/pygrep_hooks/rules/mod.rs | 0 src/{ => rules}/pygrep_hooks/rules/no_eval.rs | 0 ...grep_hooks__tests__PGH001_PGH001_0.py.snap | 0 ...grep_hooks__tests__PGH001_PGH001_1.py.snap | 0 ...grep_hooks__tests__PGH002_PGH002_0.py.snap | 0 ...grep_hooks__tests__PGH002_PGH002_1.py.snap | 0 ...grep_hooks__tests__PGH003_PGH003_0.py.snap | 0 ...grep_hooks__tests__PGH004_PGH004_0.py.snap | 0 src/{ => rules}/pylint/mod.rs | 0 .../pylint/rules/await_outside_async.rs | 0 .../pylint/rules/constant_comparison.rs | 0 .../pylint/rules/magic_value_comparison.rs | 0 .../pylint/rules/merge_isinstance.rs | 0 .../rules/misplaced_comparison_constant.rs | 0 src/{ => rules}/pylint/rules/mod.rs | 0 .../pylint/rules/property_with_parameters.rs | 0 .../rules/unnecessary_direct_lambda_call.rs | 0 .../pylint/rules/use_from_import.rs | 0 src/{ => rules}/pylint/rules/use_sys_exit.rs | 0 .../rules/used_prior_global_declaration.rs | 0 .../pylint/rules/useless_else_on_loop.rs | 0 .../pylint/rules/useless_import_alias.rs | 0 ...nt__tests__PLC0414_import_aliasing.py.snap | 0 ...2201_misplaced_comparison_constant.py.snap | 0 ...002_unnecessary_direct_lambda_call.py.snap | 0 ...__PLE0117_nonlocal_without_binding.py.snap | 0 ...0118_used_prior_global_declaration.py.snap | 0 ...tests__PLE1142_await_outside_async.py.snap | 0 ...tests__PLR0133_constant_comparison.py.snap | 0 ...__PLR0206_property_with_parameters.py.snap | 0 ...nt__tests__PLR0402_import_aliasing.py.snap | 0 ...LR1701_consider_merging_isinstance.py.snap | 0 ..._PLR1722_consider_using_sys_exit_0.py.snap | 0 ..._PLR1722_consider_using_sys_exit_1.py.snap | 0 ..._PLR1722_consider_using_sys_exit_2.py.snap | 0 ..._PLR1722_consider_using_sys_exit_3.py.snap | 0 ..._PLR1722_consider_using_sys_exit_4.py.snap | 0 ..._PLR1722_consider_using_sys_exit_5.py.snap | 0 ..._PLR1722_consider_using_sys_exit_6.py.snap | 0 ...ts__PLR2004_magic_value_comparison.py.snap | 0 ...ests__PLW0120_useless_else_on_loop.py.snap | 0 ...W0602_global_variable_not_assigned.py.snap | 0 src/{ => rules}/pyupgrade/fixes.rs | 0 src/{ => rules}/pyupgrade/mod.rs | 0 ...convert_named_tuple_functional_to_class.rs | 0 .../convert_typed_dict_functional_to_class.rs | 0 .../pyupgrade/rules/datetime_utc_alias.rs | 0 .../rules/deprecated_unittest_alias.rs | 0 .../pyupgrade/rules/format_literals.rs | 2 +- src/{ => rules}/pyupgrade/rules/mod.rs | 0 .../pyupgrade/rules/native_literals.rs | 0 src/{ => rules}/pyupgrade/rules/open_alias.rs | 0 .../pyupgrade/rules/os_error_alias.rs | 0 .../pyupgrade/rules/redundant_open_modes.rs | 0 .../pyupgrade/rules/remove_six_compat.rs | 0 .../pyupgrade/rules/replace_stdout_stderr.rs | 0 .../rules/replace_universal_newlines.rs | 0 .../pyupgrade/rules/rewrite_c_element_tree.rs | 0 .../pyupgrade/rules/rewrite_mock_import.rs | 0 .../rules/rewrite_unicode_literal.rs | 0 .../pyupgrade/rules/rewrite_yield_from.rs | 0 .../rules/super_call_with_parameters.rs | 7 +- .../pyupgrade/rules/type_of_primitive.rs | 2 +- .../pyupgrade/rules/typing_text_str_alias.rs | 0 .../rules/unnecessary_builtin_import.rs | 0 .../rules/unnecessary_encode_utf8.rs | 0 .../rules/unnecessary_future_import.rs | 0 .../rules/unnecessary_lru_cache_params.rs | 0 .../rules/unpack_list_comprehension.rs | 0 .../pyupgrade/rules/use_pep585_annotation.rs | 0 .../pyupgrade/rules/use_pep604_annotation.rs | 0 .../pyupgrade/rules/useless_metaclass_type.rs | 0 .../rules/useless_object_inheritance.rs | 5 +- src/{ => rules}/pyupgrade/settings.rs | 0 ...uff__pyupgrade__tests__UP001_UP001.py.snap | 0 ...uff__pyupgrade__tests__UP003_UP003.py.snap | 0 ...uff__pyupgrade__tests__UP004_UP004.py.snap | 0 ...uff__pyupgrade__tests__UP005_UP005.py.snap | 0 ...uff__pyupgrade__tests__UP006_UP006.py.snap | 0 ...uff__pyupgrade__tests__UP007_UP007.py.snap | 0 ...uff__pyupgrade__tests__UP008_UP008.py.snap | 0 ...f__pyupgrade__tests__UP009_UP009_0.py.snap | 0 ...f__pyupgrade__tests__UP009_UP009_1.py.snap | 0 ...f__pyupgrade__tests__UP009_UP009_2.py.snap | 0 ...f__pyupgrade__tests__UP009_UP009_3.py.snap | 0 ...f__pyupgrade__tests__UP009_UP009_4.py.snap | 0 ...uff__pyupgrade__tests__UP010_UP010.py.snap | 0 ...f__pyupgrade__tests__UP011_UP011_0.py.snap | 0 ...f__pyupgrade__tests__UP011_UP011_1.py.snap | 0 ...uff__pyupgrade__tests__UP012_UP012.py.snap | 0 ...uff__pyupgrade__tests__UP013_UP013.py.snap | 0 ...uff__pyupgrade__tests__UP014_UP014.py.snap | 0 ...uff__pyupgrade__tests__UP015_UP015.py.snap | 0 ...uff__pyupgrade__tests__UP016_UP016.py.snap | 0 ...uff__pyupgrade__tests__UP018_UP018.py.snap | 0 ...uff__pyupgrade__tests__UP019_UP019.py.snap | 0 ...uff__pyupgrade__tests__UP021_UP021.py.snap | 0 ...uff__pyupgrade__tests__UP022_UP022.py.snap | 0 ...uff__pyupgrade__tests__UP023_UP023.py.snap | 0 ...f__pyupgrade__tests__UP024_UP024_0.py.snap | 0 ...f__pyupgrade__tests__UP024_UP024_1.py.snap | 0 ...f__pyupgrade__tests__UP024_UP024_2.py.snap | 0 ...f__pyupgrade__tests__UP024_UP024_3.py.snap | 0 ...uff__pyupgrade__tests__UP025_UP025.py.snap | 0 ...uff__pyupgrade__tests__UP026_UP026.py.snap | 0 ...uff__pyupgrade__tests__UP027_UP027.py.snap | 0 ...f__pyupgrade__tests__UP028_UP028_0.py.snap | 0 ...f__pyupgrade__tests__UP028_UP028_1.py.snap | 0 ...uff__pyupgrade__tests__UP029_UP029.py.snap | 0 ...f__pyupgrade__tests__UP030_UP030_0.py.snap | 0 ...f__pyupgrade__tests__UP030_UP030_1.py.snap | 0 ...rade__tests__datetime_utc_alias_py311.snap | 0 ...tests__future_annotations_pep_585_p37.snap | 0 ...sts__future_annotations_pep_585_py310.snap | 0 ...tests__future_annotations_pep_604_p37.snap | 0 ...sts__future_annotations_pep_604_py310.snap | 0 src/{ => rules}/pyupgrade/types.rs | 0 src/{ => rules}/ruff/mod.rs | 0 src/{ => rules}/ruff/rules.rs | 0 .../ruff__ruff__tests__RUF004_RUF004.py.snap | 0 .../ruff__ruff__tests__confusables.snap | 0 .../ruff__ruff__tests__flake8_noqa.snap | 0 .../ruff__ruff__tests__redirects.snap | 0 .../ruff__ruff__tests__ruf100_0.snap | 0 .../ruff__ruff__tests__ruf100_1.snap | 0 .../ruff__ruff__tests__ruff_noqa.snap | 0 src/settings/configuration.rs | 11 +-- src/settings/mod.rs | 11 +-- src/settings/options.rs | 4 +- src/settings/pyproject.rs | 12 ++-- src/source_code/stylist.rs | 2 +- src/violations.rs | 10 +-- 781 files changed, 207 insertions(+), 208 deletions(-) rename src/{ => rules}/eradicate/detection.rs (99%) rename src/{ => rules}/eradicate/mod.rs (100%) rename src/{ => rules}/eradicate/rules.rs (96%) rename src/{ => rules}/eradicate/snapshots/ruff__eradicate__tests__ERA001_ERA001.py.snap (100%) rename src/{ => rules}/flake8_2020/mod.rs (100%) rename src/{ => rules}/flake8_2020/rules.rs (100%) rename src/{ => rules}/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT101_YTT101.py.snap (100%) rename src/{ => rules}/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT102_YTT102.py.snap (100%) rename src/{ => rules}/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT103_YTT103.py.snap (100%) rename src/{ => rules}/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT201_YTT201.py.snap (100%) rename src/{ => rules}/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT202_YTT202.py.snap (100%) rename src/{ => rules}/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT203_YTT203.py.snap (100%) rename src/{ => rules}/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT204_YTT204.py.snap (100%) rename src/{ => rules}/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT301_YTT301.py.snap (100%) rename src/{ => rules}/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT302_YTT302.py.snap (100%) rename src/{ => rules}/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT303_YTT303.py.snap (100%) rename src/{ => rules}/flake8_annotations/fixes.rs (100%) rename src/{ => rules}/flake8_annotations/helpers.rs (100%) rename src/{ => rules}/flake8_annotations/mod.rs (93%) rename src/{ => rules}/flake8_annotations/rules.rs (99%) rename src/{ => rules}/flake8_annotations/settings.rs (100%) rename src/{ => rules}/flake8_annotations/snapshots/ruff__flake8_annotations__tests__allow_nested_overload.snap (100%) rename src/{ => rules}/flake8_annotations/snapshots/ruff__flake8_annotations__tests__allow_overload.snap (100%) rename src/{ => rules}/flake8_annotations/snapshots/ruff__flake8_annotations__tests__allow_star_arg_any.snap (100%) rename src/{ => rules}/flake8_annotations/snapshots/ruff__flake8_annotations__tests__defaults.snap (100%) rename src/{ => rules}/flake8_annotations/snapshots/ruff__flake8_annotations__tests__mypy_init_return.snap (100%) rename src/{ => rules}/flake8_annotations/snapshots/ruff__flake8_annotations__tests__suppress_dummy_args.snap (100%) rename src/{ => rules}/flake8_annotations/snapshots/ruff__flake8_annotations__tests__suppress_none_returning.snap (100%) rename src/{ => rules}/flake8_bandit/helpers.rs (100%) rename src/{ => rules}/flake8_bandit/mod.rs (95%) rename src/{ => rules}/flake8_bandit/rules/assert_used.rs (100%) rename src/{ => rules}/flake8_bandit/rules/bad_file_permissions.rs (100%) rename src/{ => rules}/flake8_bandit/rules/exec_used.rs (100%) rename src/{ => rules}/flake8_bandit/rules/hardcoded_bind_all_interfaces.rs (100%) rename src/{ => rules}/flake8_bandit/rules/hardcoded_password_default.rs (95%) rename src/{ => rules}/flake8_bandit/rules/hardcoded_password_func_arg.rs (89%) rename src/{ => rules}/flake8_bandit/rules/hardcoded_password_string.rs (95%) rename src/{ => rules}/flake8_bandit/rules/hardcoded_tmp_directory.rs (100%) rename src/{ => rules}/flake8_bandit/rules/hashlib_insecure_hash_functions.rs (97%) rename src/{ => rules}/flake8_bandit/rules/jinja2_autoescape_false.rs (100%) rename src/{ => rules}/flake8_bandit/rules/mod.rs (100%) rename src/{ => rules}/flake8_bandit/rules/request_with_no_cert_validation.rs (100%) rename src/{ => rules}/flake8_bandit/rules/request_without_timeout.rs (100%) rename src/{ => rules}/flake8_bandit/rules/snmp_insecure_version.rs (100%) rename src/{ => rules}/flake8_bandit/rules/snmp_weak_cryptography.rs (100%) rename src/{ => rules}/flake8_bandit/rules/unsafe_yaml_load.rs (100%) rename src/{ => rules}/flake8_bandit/settings.rs (100%) rename src/{ => rules}/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S101_S101.py.snap (100%) rename src/{ => rules}/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S102_S102.py.snap (100%) rename src/{ => rules}/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S103_S103.py.snap (100%) rename src/{ => rules}/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S104_S104.py.snap (100%) rename src/{ => rules}/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S105_S105.py.snap (100%) rename src/{ => rules}/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S106_S106.py.snap (100%) rename src/{ => rules}/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S107_S107.py.snap (100%) rename src/{ => rules}/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S108_S108.py.snap (100%) rename src/{ => rules}/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S108_extend.snap (100%) rename src/{ => rules}/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S113_S113.py.snap (100%) rename src/{ => rules}/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S324_S324.py.snap (100%) rename src/{ => rules}/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S501_S501.py.snap (100%) rename src/{ => rules}/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S506_S506.py.snap (100%) rename src/{ => rules}/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S508_S508.py.snap (100%) rename src/{ => rules}/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S509_S509.py.snap (100%) rename src/{ => rules}/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S701_S701.py.snap (100%) rename src/{ => rules}/flake8_blind_except/mod.rs (100%) rename src/{ => rules}/flake8_blind_except/rules.rs (100%) rename src/{ => rules}/flake8_blind_except/snapshots/ruff__flake8_blind_except__tests__BLE001_BLE.py.snap (100%) rename src/{ => rules}/flake8_boolean_trap/mod.rs (100%) rename src/{ => rules}/flake8_boolean_trap/rules.rs (100%) rename src/{ => rules}/flake8_boolean_trap/snapshots/ruff__flake8_boolean_trap__tests__FBT001_FBT.py.snap (100%) rename src/{ => rules}/flake8_boolean_trap/snapshots/ruff__flake8_boolean_trap__tests__FBT002_FBT.py.snap (100%) rename src/{ => rules}/flake8_boolean_trap/snapshots/ruff__flake8_boolean_trap__tests__FBT003_FBT.py.snap (100%) rename src/{ => rules}/flake8_bugbear/mod.rs (96%) rename src/{ => rules}/flake8_bugbear/rules/abstract_base_class.rs (100%) rename src/{ => rules}/flake8_bugbear/rules/assert_false.rs (100%) rename src/{ => rules}/flake8_bugbear/rules/assert_raises_exception.rs (100%) rename src/{ => rules}/flake8_bugbear/rules/assignment_to_os_environ.rs (100%) rename src/{ => rules}/flake8_bugbear/rules/cached_instance_method.rs (100%) rename src/{ => rules}/flake8_bugbear/rules/cannot_raise_literal.rs (100%) rename src/{ => rules}/flake8_bugbear/rules/duplicate_exceptions.rs (100%) rename src/{ => rules}/flake8_bugbear/rules/f_string_docstring.rs (100%) rename src/{ => rules}/flake8_bugbear/rules/function_call_argument_default.rs (97%) rename src/{ => rules}/flake8_bugbear/rules/function_uses_loop_variable.rs (100%) rename src/{ => rules}/flake8_bugbear/rules/getattr_with_constant.rs (100%) rename src/{ => rules}/flake8_bugbear/rules/jump_statement_in_finally.rs (100%) rename src/{ => rules}/flake8_bugbear/rules/loop_variable_overrides_iterator.rs (100%) rename src/{ => rules}/flake8_bugbear/rules/mod.rs (100%) rename src/{ => rules}/flake8_bugbear/rules/mutable_argument_default.rs (100%) rename src/{ => rules}/flake8_bugbear/rules/raise_without_from_inside_except.rs (100%) rename src/{ => rules}/flake8_bugbear/rules/redundant_tuple_in_exception_handler.rs (100%) rename src/{ => rules}/flake8_bugbear/rules/setattr_with_constant.rs (100%) rename src/{ => rules}/flake8_bugbear/rules/star_arg_unpacking_after_keyword_arg.rs (100%) rename src/{ => rules}/flake8_bugbear/rules/strip_with_multi_characters.rs (100%) rename src/{ => rules}/flake8_bugbear/rules/unary_prefix_increment.rs (100%) rename src/{ => rules}/flake8_bugbear/rules/unreliable_callable_check.rs (100%) rename src/{ => rules}/flake8_bugbear/rules/unused_loop_control_variable.rs (100%) rename src/{ => rules}/flake8_bugbear/rules/useless_comparison.rs (100%) rename src/{ => rules}/flake8_bugbear/rules/useless_contextlib_suppress.rs (100%) rename src/{ => rules}/flake8_bugbear/rules/useless_expression.rs (100%) rename src/{ => rules}/flake8_bugbear/rules/zip_without_explicit_strict.rs (100%) rename src/{ => rules}/flake8_bugbear/settings.rs (100%) rename src/{ => rules}/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B002_B002.py.snap (100%) rename src/{ => rules}/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B003_B003.py.snap (100%) rename src/{ => rules}/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B004_B004.py.snap (100%) rename src/{ => rules}/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B005_B005.py.snap (100%) rename src/{ => rules}/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B006_B006_B008.py.snap (100%) rename src/{ => rules}/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B007_B007.py.snap (100%) rename src/{ => rules}/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B008_B006_B008.py.snap (100%) rename src/{ => rules}/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B009_B009_B010.py.snap (100%) rename src/{ => rules}/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B010_B009_B010.py.snap (100%) rename src/{ => rules}/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B011_B011.py.snap (100%) rename src/{ => rules}/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B012_B012.py.snap (100%) rename src/{ => rules}/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B013_B013.py.snap (100%) rename src/{ => rules}/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B014_B014.py.snap (100%) rename src/{ => rules}/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B015_B015.py.snap (100%) rename src/{ => rules}/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B016_B016.py.snap (100%) rename src/{ => rules}/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B017_B017.py.snap (100%) rename src/{ => rules}/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B018_B018.py.snap (100%) rename src/{ => rules}/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B019_B019.py.snap (100%) rename src/{ => rules}/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B020_B020.py.snap (100%) rename src/{ => rules}/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B021_B021.py.snap (100%) rename src/{ => rules}/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B022_B022.py.snap (100%) rename src/{ => rules}/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B023_B023.py.snap (100%) rename src/{ => rules}/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B024_B024.py.snap (100%) rename src/{ => rules}/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B025_B025.py.snap (100%) rename src/{ => rules}/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B026_B026.py.snap (100%) rename src/{ => rules}/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B027_B027.py.snap (100%) rename src/{ => rules}/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B904_B904.py.snap (100%) rename src/{ => rules}/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B905_B905.py.snap (100%) rename src/{ => rules}/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__extend_immutable_calls.snap (100%) rename src/{ => rules}/flake8_builtins/mod.rs (100%) rename src/{ => rules}/flake8_builtins/rules.rs (95%) rename src/{ => rules}/flake8_builtins/snapshots/ruff__flake8_builtins__tests__A001_A001.py.snap (100%) rename src/{ => rules}/flake8_builtins/snapshots/ruff__flake8_builtins__tests__A002_A002.py.snap (100%) rename src/{ => rules}/flake8_builtins/snapshots/ruff__flake8_builtins__tests__A003_A003.py.snap (100%) rename src/{ => rules}/flake8_builtins/types.rs (100%) rename src/{ => rules}/flake8_comprehensions/fixes.rs (100%) rename src/{ => rules}/flake8_comprehensions/mod.rs (100%) rename src/{ => rules}/flake8_comprehensions/rules.rs (99%) rename src/{ => rules}/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C400_C400.py.snap (100%) rename src/{ => rules}/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C401_C401.py.snap (100%) rename src/{ => rules}/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C402_C402.py.snap (100%) rename src/{ => rules}/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C403_C403.py.snap (100%) rename src/{ => rules}/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C404_C404.py.snap (100%) rename src/{ => rules}/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C405_C405.py.snap (100%) rename src/{ => rules}/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C406_C406.py.snap (100%) rename src/{ => rules}/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C408_C408.py.snap (100%) rename src/{ => rules}/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C409_C409.py.snap (100%) rename src/{ => rules}/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C410_C410.py.snap (100%) rename src/{ => rules}/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C411_C411.py.snap (100%) rename src/{ => rules}/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C413_C413.py.snap (100%) rename src/{ => rules}/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C414_C414.py.snap (100%) rename src/{ => rules}/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C415_C415.py.snap (100%) rename src/{ => rules}/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C416_C416.py.snap (100%) rename src/{ => rules}/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C417_C417.py.snap (100%) rename src/{ => rules}/flake8_datetimez/mod.rs (100%) rename src/{ => rules}/flake8_datetimez/rules.rs (100%) rename src/{ => rules}/flake8_datetimez/snapshots/ruff__flake8_datetimez__tests__DTZ001_DTZ001.py.snap (100%) rename src/{ => rules}/flake8_datetimez/snapshots/ruff__flake8_datetimez__tests__DTZ002_DTZ002.py.snap (100%) rename src/{ => rules}/flake8_datetimez/snapshots/ruff__flake8_datetimez__tests__DTZ003_DTZ003.py.snap (100%) rename src/{ => rules}/flake8_datetimez/snapshots/ruff__flake8_datetimez__tests__DTZ004_DTZ004.py.snap (100%) rename src/{ => rules}/flake8_datetimez/snapshots/ruff__flake8_datetimez__tests__DTZ005_DTZ005.py.snap (100%) rename src/{ => rules}/flake8_datetimez/snapshots/ruff__flake8_datetimez__tests__DTZ006_DTZ006.py.snap (100%) rename src/{ => rules}/flake8_datetimez/snapshots/ruff__flake8_datetimez__tests__DTZ007_DTZ007.py.snap (100%) rename src/{ => rules}/flake8_datetimez/snapshots/ruff__flake8_datetimez__tests__DTZ011_DTZ011.py.snap (100%) rename src/{ => rules}/flake8_datetimez/snapshots/ruff__flake8_datetimez__tests__DTZ012_DTZ012.py.snap (100%) rename src/{ => rules}/flake8_debugger/mod.rs (100%) rename src/{ => rules}/flake8_debugger/rules.rs (97%) rename src/{ => rules}/flake8_debugger/snapshots/ruff__flake8_debugger__tests__T100_T100.py.snap (100%) rename src/{ => rules}/flake8_debugger/types.rs (100%) rename src/{ => rules}/flake8_errmsg/mod.rs (90%) rename src/{ => rules}/flake8_errmsg/rules.rs (100%) rename src/{ => rules}/flake8_errmsg/settings.rs (100%) rename src/{ => rules}/flake8_errmsg/snapshots/ruff__flake8_errmsg__tests__custom.snap (100%) rename src/{ => rules}/flake8_errmsg/snapshots/ruff__flake8_errmsg__tests__defaults.snap (100%) rename src/{ => rules}/flake8_implicit_str_concat/mod.rs (100%) rename src/{ => rules}/flake8_implicit_str_concat/rules.rs (100%) rename src/{ => rules}/flake8_implicit_str_concat/snapshots/ruff__flake8_implicit_str_concat__tests__ISC001_ISC.py.snap (100%) rename src/{ => rules}/flake8_implicit_str_concat/snapshots/ruff__flake8_implicit_str_concat__tests__ISC002_ISC.py.snap (100%) rename src/{ => rules}/flake8_implicit_str_concat/snapshots/ruff__flake8_implicit_str_concat__tests__ISC003_ISC.py.snap (100%) rename src/{ => rules}/flake8_import_conventions/mod.rs (89%) rename src/{ => rules}/flake8_import_conventions/rules.rs (100%) rename src/{ => rules}/flake8_import_conventions/settings.rs (100%) rename src/{ => rules}/flake8_import_conventions/snapshots/ruff__flake8_import_conventions__tests__custom.snap (100%) rename src/{ => rules}/flake8_import_conventions/snapshots/ruff__flake8_import_conventions__tests__defaults.snap (100%) rename src/{ => rules}/flake8_import_conventions/snapshots/ruff__flake8_import_conventions__tests__override_default.snap (100%) rename src/{ => rules}/flake8_import_conventions/snapshots/ruff__flake8_import_conventions__tests__remove_default.snap (100%) rename src/{ => rules}/flake8_pie/mod.rs (100%) rename src/{ => rules}/flake8_pie/rules.rs (100%) rename src/{ => rules}/flake8_pie/snapshots/ruff__flake8_pie__tests__PIE790_PIE790.py.snap (100%) rename src/{ => rules}/flake8_pie/snapshots/ruff__flake8_pie__tests__PIE794_PIE794.py.snap (100%) rename src/{ => rules}/flake8_pie/snapshots/ruff__flake8_pie__tests__PIE807_PIE807.py.snap (100%) rename src/{ => rules}/flake8_print/mod.rs (100%) rename src/{ => rules}/flake8_print/rules/mod.rs (100%) rename src/{ => rules}/flake8_print/rules/print_call.rs (100%) rename src/{ => rules}/flake8_print/snapshots/ruff__flake8_print__tests__T201_T201.py.snap (100%) rename src/{ => rules}/flake8_print/snapshots/ruff__flake8_print__tests__T203_T203.py.snap (100%) rename src/{ => rules}/flake8_pytest_style/mod.rs (98%) rename src/{ => rules}/flake8_pytest_style/rules/assertion.rs (100%) rename src/{ => rules}/flake8_pytest_style/rules/fail.rs (100%) rename src/{ => rules}/flake8_pytest_style/rules/fixture.rs (100%) rename src/{ => rules}/flake8_pytest_style/rules/helpers.rs (100%) rename src/{ => rules}/flake8_pytest_style/rules/imports.rs (100%) rename src/{ => rules}/flake8_pytest_style/rules/marks.rs (100%) rename src/{ => rules}/flake8_pytest_style/rules/mod.rs (100%) rename src/{ => rules}/flake8_pytest_style/rules/parametrize.rs (99%) rename src/{ => rules}/flake8_pytest_style/rules/patch.rs (100%) rename src/{ => rules}/flake8_pytest_style/rules/raises.rs (100%) rename src/{ => rules}/flake8_pytest_style/rules/unittest_assert.rs (100%) rename src/{ => rules}/flake8_pytest_style/settings.rs (100%) rename src/{ => rules}/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT001_default.snap (100%) rename src/{ => rules}/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT001_no_parentheses.snap (100%) rename src/{ => rules}/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT002.snap (100%) rename src/{ => rules}/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT003.snap (100%) rename src/{ => rules}/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT004.snap (100%) rename src/{ => rules}/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT005.snap (100%) rename src/{ => rules}/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT006_csv.snap (100%) rename src/{ => rules}/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT006_default.snap (100%) rename src/{ => rules}/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT006_list.snap (100%) rename src/{ => rules}/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT007_list_of_lists.snap (100%) rename src/{ => rules}/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT007_list_of_tuples.snap (100%) rename src/{ => rules}/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT007_tuple_of_lists.snap (100%) rename src/{ => rules}/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT007_tuple_of_tuples.snap (100%) rename src/{ => rules}/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT008.snap (100%) rename src/{ => rules}/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT009.snap (100%) rename src/{ => rules}/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT010.snap (100%) rename src/{ => rules}/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT011_default.snap (100%) rename src/{ => rules}/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT011_extend_broad_exceptions.snap (100%) rename src/{ => rules}/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT011_replace_broad_exceptions.snap (100%) rename src/{ => rules}/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT012.snap (100%) rename src/{ => rules}/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT013.snap (100%) rename src/{ => rules}/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT015.snap (100%) rename src/{ => rules}/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT016.snap (100%) rename src/{ => rules}/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT017.snap (100%) rename src/{ => rules}/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT018.snap (100%) rename src/{ => rules}/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT019.snap (100%) rename src/{ => rules}/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT020.snap (100%) rename src/{ => rules}/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT021.snap (100%) rename src/{ => rules}/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT022.snap (100%) rename src/{ => rules}/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT023_default.snap (100%) rename src/{ => rules}/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT023_no_parentheses.snap (100%) rename src/{ => rules}/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT024.snap (100%) rename src/{ => rules}/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT025.snap (100%) rename src/{ => rules}/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT026.snap (100%) rename src/{ => rules}/flake8_pytest_style/types.rs (100%) rename src/{ => rules}/flake8_quotes/mod.rs (93%) rename src/{ => rules}/flake8_quotes/rules.rs (99%) rename src/{ => rules}/flake8_quotes/settings.rs (100%) rename src/{ => rules}/flake8_quotes/snapshots/ruff__flake8_quotes__tests__double_docstring_docstring_doubles.py.snap (100%) rename src/{ => rules}/flake8_quotes/snapshots/ruff__flake8_quotes__tests__double_docstring_docstring_doubles_class.py.snap (100%) rename src/{ => rules}/flake8_quotes/snapshots/ruff__flake8_quotes__tests__double_docstring_docstring_doubles_function.py.snap (100%) rename src/{ => rules}/flake8_quotes/snapshots/ruff__flake8_quotes__tests__double_docstring_docstring_doubles_module_multiline.py.snap (100%) rename src/{ => rules}/flake8_quotes/snapshots/ruff__flake8_quotes__tests__double_docstring_docstring_doubles_module_singleline.py.snap (100%) rename src/{ => rules}/flake8_quotes/snapshots/ruff__flake8_quotes__tests__double_docstring_docstring_singles.py.snap (100%) rename src/{ => rules}/flake8_quotes/snapshots/ruff__flake8_quotes__tests__double_docstring_docstring_singles_class.py.snap (100%) rename src/{ => rules}/flake8_quotes/snapshots/ruff__flake8_quotes__tests__double_docstring_docstring_singles_function.py.snap (100%) rename src/{ => rules}/flake8_quotes/snapshots/ruff__flake8_quotes__tests__double_docstring_docstring_singles_module_multiline.py.snap (100%) rename src/{ => rules}/flake8_quotes/snapshots/ruff__flake8_quotes__tests__double_docstring_docstring_singles_module_singleline.py.snap (100%) rename src/{ => rules}/flake8_quotes/snapshots/ruff__flake8_quotes__tests__doubles_doubles.py.snap (100%) rename src/{ => rules}/flake8_quotes/snapshots/ruff__flake8_quotes__tests__doubles_doubles_escaped.py.snap (100%) rename src/{ => rules}/flake8_quotes/snapshots/ruff__flake8_quotes__tests__doubles_doubles_multiline_string.py.snap (100%) rename src/{ => rules}/flake8_quotes/snapshots/ruff__flake8_quotes__tests__doubles_doubles_noqa.py.snap (100%) rename src/{ => rules}/flake8_quotes/snapshots/ruff__flake8_quotes__tests__doubles_doubles_wrapped.py.snap (100%) rename src/{ => rules}/flake8_quotes/snapshots/ruff__flake8_quotes__tests__single_docstring_docstring_doubles.py.snap (100%) rename src/{ => rules}/flake8_quotes/snapshots/ruff__flake8_quotes__tests__single_docstring_docstring_doubles_class.py.snap (100%) rename src/{ => rules}/flake8_quotes/snapshots/ruff__flake8_quotes__tests__single_docstring_docstring_doubles_function.py.snap (100%) rename src/{ => rules}/flake8_quotes/snapshots/ruff__flake8_quotes__tests__single_docstring_docstring_doubles_module_multiline.py.snap (100%) rename src/{ => rules}/flake8_quotes/snapshots/ruff__flake8_quotes__tests__single_docstring_docstring_doubles_module_singleline.py.snap (100%) rename src/{ => rules}/flake8_quotes/snapshots/ruff__flake8_quotes__tests__single_docstring_docstring_singles.py.snap (100%) rename src/{ => rules}/flake8_quotes/snapshots/ruff__flake8_quotes__tests__single_docstring_docstring_singles_class.py.snap (100%) rename src/{ => rules}/flake8_quotes/snapshots/ruff__flake8_quotes__tests__single_docstring_docstring_singles_function.py.snap (100%) rename src/{ => rules}/flake8_quotes/snapshots/ruff__flake8_quotes__tests__single_docstring_docstring_singles_module_multiline.py.snap (100%) rename src/{ => rules}/flake8_quotes/snapshots/ruff__flake8_quotes__tests__single_docstring_docstring_singles_module_singleline.py.snap (100%) rename src/{ => rules}/flake8_quotes/snapshots/ruff__flake8_quotes__tests__singles_singles.py.snap (100%) rename src/{ => rules}/flake8_quotes/snapshots/ruff__flake8_quotes__tests__singles_singles_escaped.py.snap (100%) rename src/{ => rules}/flake8_quotes/snapshots/ruff__flake8_quotes__tests__singles_singles_multiline_string.py.snap (100%) rename src/{ => rules}/flake8_quotes/snapshots/ruff__flake8_quotes__tests__singles_singles_noqa.py.snap (100%) rename src/{ => rules}/flake8_quotes/snapshots/ruff__flake8_quotes__tests__singles_singles_wrapped.py.snap (100%) rename src/{ => rules}/flake8_return/helpers.rs (100%) rename src/{ => rules}/flake8_return/mod.rs (100%) rename src/{ => rules}/flake8_return/rules.rs (99%) rename src/{ => rules}/flake8_return/snapshots/ruff__flake8_return__tests__RET501_RET501.py.snap (100%) rename src/{ => rules}/flake8_return/snapshots/ruff__flake8_return__tests__RET502_RET502.py.snap (100%) rename src/{ => rules}/flake8_return/snapshots/ruff__flake8_return__tests__RET503_RET503.py.snap (100%) rename src/{ => rules}/flake8_return/snapshots/ruff__flake8_return__tests__RET504_RET504.py.snap (100%) rename src/{ => rules}/flake8_return/snapshots/ruff__flake8_return__tests__RET505_RET505.py.snap (100%) rename src/{ => rules}/flake8_return/snapshots/ruff__flake8_return__tests__RET506_RET506.py.snap (100%) rename src/{ => rules}/flake8_return/snapshots/ruff__flake8_return__tests__RET507_RET507.py.snap (100%) rename src/{ => rules}/flake8_return/snapshots/ruff__flake8_return__tests__RET508_RET508.py.snap (100%) rename src/{ => rules}/flake8_return/visitor.rs (100%) rename src/{ => rules}/flake8_simplify/mod.rs (100%) rename src/{ => rules}/flake8_simplify/rules/ast_bool_op.rs (100%) rename src/{ => rules}/flake8_simplify/rules/ast_expr.rs (100%) rename src/{ => rules}/flake8_simplify/rules/ast_for.rs (100%) rename src/{ => rules}/flake8_simplify/rules/ast_if.rs (100%) rename src/{ => rules}/flake8_simplify/rules/ast_ifexp.rs (100%) rename src/{ => rules}/flake8_simplify/rules/ast_unary_op.rs (100%) rename src/{ => rules}/flake8_simplify/rules/ast_with.rs (100%) rename src/{ => rules}/flake8_simplify/rules/key_in_dict.rs (100%) rename src/{ => rules}/flake8_simplify/rules/mod.rs (100%) rename src/{ => rules}/flake8_simplify/rules/open_file_with_context_handler.rs (100%) rename src/{ => rules}/flake8_simplify/rules/return_in_try_except_finally.rs (100%) rename src/{ => rules}/flake8_simplify/rules/use_contextlib_suppress.rs (100%) rename src/{ => rules}/flake8_simplify/rules/yoda_conditions.rs (100%) rename src/{ => rules}/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM101_SIM101.py.snap (100%) rename src/{ => rules}/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM102_SIM102.py.snap (100%) rename src/{ => rules}/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM103_SIM103.py.snap (100%) rename src/{ => rules}/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM105_SIM105.py.snap (100%) rename src/{ => rules}/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM107_SIM107.py.snap (100%) rename src/{ => rules}/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM108_SIM108.py.snap (100%) rename src/{ => rules}/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM109_SIM109.py.snap (100%) rename src/{ => rules}/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM110_SIM110.py.snap (100%) rename src/{ => rules}/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM111_SIM111.py.snap (100%) rename src/{ => rules}/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM112_SIM112.py.snap (100%) rename src/{ => rules}/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM115_SIM115.py.snap (100%) rename src/{ => rules}/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM117_SIM117.py.snap (100%) rename src/{ => rules}/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM118_SIM118.py.snap (100%) rename src/{ => rules}/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM201_SIM201.py.snap (100%) rename src/{ => rules}/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM202_SIM202.py.snap (100%) rename src/{ => rules}/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM208_SIM208.py.snap (100%) rename src/{ => rules}/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM210_SIM210.py.snap (100%) rename src/{ => rules}/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM211_SIM211.py.snap (100%) rename src/{ => rules}/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM212_SIM212.py.snap (100%) rename src/{ => rules}/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM220_SIM220.py.snap (100%) rename src/{ => rules}/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM221_SIM221.py.snap (100%) rename src/{ => rules}/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM222_SIM222.py.snap (100%) rename src/{ => rules}/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM223_SIM223.py.snap (100%) rename src/{ => rules}/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM300_SIM300.py.snap (100%) rename src/{ => rules}/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM401_SIM401.py.snap (100%) rename src/{ => rules}/flake8_tidy_imports/mod.rs (86%) rename src/{ => rules}/flake8_tidy_imports/rules.rs (96%) rename src/{ => rules}/flake8_tidy_imports/settings.rs (100%) rename src/{ => rules}/flake8_tidy_imports/snapshots/ruff__flake8_tidy_imports__tests__ban_all_imports.snap (100%) rename src/{ => rules}/flake8_tidy_imports/snapshots/ruff__flake8_tidy_imports__tests__ban_parent_imports.snap (100%) rename src/{ => rules}/flake8_tidy_imports/snapshots/ruff__flake8_tidy_imports__tests__banned_api_true_positives.snap (100%) rename src/{ => rules}/flake8_unused_arguments/helpers.rs (100%) rename src/{ => rules}/flake8_unused_arguments/mod.rs (91%) rename src/{ => rules}/flake8_unused_arguments/rules.rs (98%) rename src/{ => rules}/flake8_unused_arguments/settings.rs (100%) rename src/{ => rules}/flake8_unused_arguments/snapshots/ruff__flake8_unused_arguments__tests__ARG001_ARG.py.snap (100%) rename src/{ => rules}/flake8_unused_arguments/snapshots/ruff__flake8_unused_arguments__tests__ARG002_ARG.py.snap (100%) rename src/{ => rules}/flake8_unused_arguments/snapshots/ruff__flake8_unused_arguments__tests__ARG003_ARG.py.snap (100%) rename src/{ => rules}/flake8_unused_arguments/snapshots/ruff__flake8_unused_arguments__tests__ARG004_ARG.py.snap (100%) rename src/{ => rules}/flake8_unused_arguments/snapshots/ruff__flake8_unused_arguments__tests__ARG005_ARG.py.snap (100%) rename src/{ => rules}/flake8_unused_arguments/snapshots/ruff__flake8_unused_arguments__tests__enforce_variadic_names.snap (100%) rename src/{ => rules}/flake8_unused_arguments/snapshots/ruff__flake8_unused_arguments__tests__ignore_variadic_names.snap (100%) rename src/{ => rules}/flake8_unused_arguments/types.rs (100%) rename src/{ => rules}/isort/categorize.rs (100%) rename src/{ => rules}/isort/comments.rs (100%) rename src/{ => rules}/isort/format.rs (98%) rename src/{ => rules}/isort/helpers.rs (98%) rename src/{ => rules}/isort/mod.rs (95%) rename src/{ => rules}/isort/rules/add_required_imports.rs (99%) rename src/{ => rules}/isort/rules/mod.rs (100%) rename src/{ => rules}/isort/rules/organize_imports.rs (97%) rename src/{ => rules}/isort/settings.rs (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__add_newline_before_comments.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__closest_to_furthest_relative_imports_order.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__combine_as_imports.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__combine_as_imports_combine_as_imports.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__combine_import_from.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__combined_required_imports_docstring.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__combined_required_imports_docstring_only.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__combined_required_imports_empty.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__comments.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__deduplicate_imports.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__fit_line_length.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__fit_line_length_comment.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__force_single_line_force_single_line.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__force_sort_within_sections.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__force_sort_within_sections_force_sort_within_sections.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__force_wrap_aliases.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__force_wrap_aliases_force_wrap_aliases.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__import_from_after_import.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__inline_comments.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__insert_empty_lines.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__insert_empty_lines.pyi.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__leading_prefix.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__line_ending_cr.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__line_ending_crlf.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__line_ending_lf.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__magic_trailing_comma.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__natural_order.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__no_reorder_within_section.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__no_wrap_star.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__order_by_type.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__order_by_type_false_order_by_type.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__order_by_type_with_custom_classes.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__order_by_type_with_custom_classes_order_by_type_with_custom_classes.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__order_relative_imports_by_level.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__preserve_comment_order.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__preserve_import_star.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__preserve_indentation.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__relative_imports_order.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__reorder_within_section.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__required_import_docstring.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__required_import_docstring_only.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__required_import_empty.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__required_imports_docstring.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__required_imports_docstring_only.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__required_imports_empty.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__separate_first_party_imports.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__separate_future_imports.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__separate_local_folder_imports.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__separate_third_party_imports.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__skip.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__skip_file.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__sort_similar_imports.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__split.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__split_on_trailing_comma_magic_trailing_comma.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__straight_required_import_docstring.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__straight_required_import_docstring_only.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__straight_required_import_empty.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__trailing_suffix.py.snap (100%) rename src/{ => rules}/isort/snapshots/ruff__isort__tests__type_comments.py.snap (100%) rename src/{ => rules}/isort/sorting.rs (95%) rename src/{ => rules}/isort/track.rs (99%) rename src/{ => rules}/isort/types.rs (100%) rename src/{ => rules}/mccabe/mod.rs (88%) rename src/{ => rules}/mccabe/rules.rs (99%) rename src/{ => rules}/mccabe/settings.rs (100%) rename src/{ => rules}/mccabe/snapshots/ruff__mccabe__tests__max_complexity_0.snap (100%) rename src/{ => rules}/mccabe/snapshots/ruff__mccabe__tests__max_complexity_10.snap (100%) rename src/{ => rules}/mccabe/snapshots/ruff__mccabe__tests__max_complexity_3.snap (100%) create mode 100644 src/rules/mod.rs rename src/{ => rules}/pandas_vet/helpers.rs (100%) rename src/{ => rules}/pandas_vet/mod.rs (100%) rename src/{ => rules}/pandas_vet/rules.rs (100%) rename src/{ => rules}/pep8_naming/helpers.rs (95%) rename src/{ => rules}/pep8_naming/mod.rs (100%) rename src/{ => rules}/pep8_naming/rules.rs (99%) rename src/{ => rules}/pep8_naming/settings.rs (100%) rename src/{ => rules}/pep8_naming/snapshots/ruff__pep8_naming__tests__N801_N801.py.snap (100%) rename src/{ => rules}/pep8_naming/snapshots/ruff__pep8_naming__tests__N802_N802.py.snap (100%) rename src/{ => rules}/pep8_naming/snapshots/ruff__pep8_naming__tests__N803_N803.py.snap (100%) rename src/{ => rules}/pep8_naming/snapshots/ruff__pep8_naming__tests__N804_N804.py.snap (100%) rename src/{ => rules}/pep8_naming/snapshots/ruff__pep8_naming__tests__N805_N805.py.snap (100%) rename src/{ => rules}/pep8_naming/snapshots/ruff__pep8_naming__tests__N806_N806.py.snap (100%) rename src/{ => rules}/pep8_naming/snapshots/ruff__pep8_naming__tests__N807_N807.py.snap (100%) rename src/{ => rules}/pep8_naming/snapshots/ruff__pep8_naming__tests__N811_N811.py.snap (100%) rename src/{ => rules}/pep8_naming/snapshots/ruff__pep8_naming__tests__N812_N812.py.snap (100%) rename src/{ => rules}/pep8_naming/snapshots/ruff__pep8_naming__tests__N813_N813.py.snap (100%) rename src/{ => rules}/pep8_naming/snapshots/ruff__pep8_naming__tests__N814_N814.py.snap (100%) rename src/{ => rules}/pep8_naming/snapshots/ruff__pep8_naming__tests__N815_N815.py.snap (100%) rename src/{ => rules}/pep8_naming/snapshots/ruff__pep8_naming__tests__N816_N816.py.snap (100%) rename src/{ => rules}/pep8_naming/snapshots/ruff__pep8_naming__tests__N817_N817.py.snap (100%) rename src/{ => rules}/pep8_naming/snapshots/ruff__pep8_naming__tests__N818_N818.py.snap (100%) rename src/{ => rules}/pycodestyle/mod.rs (100%) rename src/{ => rules}/pycodestyle/rules.rs (100%) rename src/{ => rules}/pycodestyle/settings.rs (100%) rename src/{ => rules}/pycodestyle/snapshots/ruff__pycodestyle__tests__E401_E40.py.snap (100%) rename src/{ => rules}/pycodestyle/snapshots/ruff__pycodestyle__tests__E402_E40.py.snap (100%) rename src/{ => rules}/pycodestyle/snapshots/ruff__pycodestyle__tests__E402_E402.py.snap (100%) rename src/{ => rules}/pycodestyle/snapshots/ruff__pycodestyle__tests__E501_E501.py.snap (100%) rename src/{ => rules}/pycodestyle/snapshots/ruff__pycodestyle__tests__E711_E711.py.snap (100%) rename src/{ => rules}/pycodestyle/snapshots/ruff__pycodestyle__tests__E712_E712.py.snap (100%) rename src/{ => rules}/pycodestyle/snapshots/ruff__pycodestyle__tests__E713_E713.py.snap (100%) rename src/{ => rules}/pycodestyle/snapshots/ruff__pycodestyle__tests__E714_E714.py.snap (100%) rename src/{ => rules}/pycodestyle/snapshots/ruff__pycodestyle__tests__E721_E721.py.snap (100%) rename src/{ => rules}/pycodestyle/snapshots/ruff__pycodestyle__tests__E722_E722.py.snap (100%) rename src/{ => rules}/pycodestyle/snapshots/ruff__pycodestyle__tests__E731_E731.py.snap (100%) rename src/{ => rules}/pycodestyle/snapshots/ruff__pycodestyle__tests__E741_E741.py.snap (100%) rename src/{ => rules}/pycodestyle/snapshots/ruff__pycodestyle__tests__E742_E742.py.snap (100%) rename src/{ => rules}/pycodestyle/snapshots/ruff__pycodestyle__tests__E743_E743.py.snap (100%) rename src/{ => rules}/pycodestyle/snapshots/ruff__pycodestyle__tests__E999_E999.py.snap (100%) rename src/{ => rules}/pycodestyle/snapshots/ruff__pycodestyle__tests__W292_W292_0.py.snap (100%) rename src/{ => rules}/pycodestyle/snapshots/ruff__pycodestyle__tests__W292_W292_1.py.snap (100%) rename src/{ => rules}/pycodestyle/snapshots/ruff__pycodestyle__tests__W292_W292_2.py.snap (100%) rename src/{ => rules}/pycodestyle/snapshots/ruff__pycodestyle__tests__W292_W292_3.py.snap (100%) rename src/{ => rules}/pycodestyle/snapshots/ruff__pycodestyle__tests__W292_W292_4.py.snap (100%) rename src/{ => rules}/pycodestyle/snapshots/ruff__pycodestyle__tests__W605_W605_0.py.snap (100%) rename src/{ => rules}/pycodestyle/snapshots/ruff__pycodestyle__tests__W605_W605_1.py.snap (100%) rename src/{ => rules}/pycodestyle/snapshots/ruff__pycodestyle__tests__constant_literals.snap (100%) rename src/{ => rules}/pycodestyle/snapshots/ruff__pycodestyle__tests__max_doc_length.snap (100%) rename src/{ => rules}/pycodestyle/snapshots/ruff__pycodestyle__tests__task_tags_false.snap (100%) rename src/{ => rules}/pycodestyle/snapshots/ruff__pycodestyle__tests__task_tags_true.snap (100%) rename src/{ => rules}/pydocstyle/helpers.rs (100%) rename src/{ => rules}/pydocstyle/mod.rs (98%) rename src/{ => rules}/pydocstyle/rules.rs (99%) rename src/{ => rules}/pydocstyle/settings.rs (100%) rename src/{ => rules}/pydocstyle/snapshots/ruff__pydocstyle__tests__D100_D.py.snap (100%) rename src/{ => rules}/pydocstyle/snapshots/ruff__pydocstyle__tests__D101_D.py.snap (100%) rename src/{ => rules}/pydocstyle/snapshots/ruff__pydocstyle__tests__D102_D.py.snap (100%) rename src/{ => rules}/pydocstyle/snapshots/ruff__pydocstyle__tests__D103_D.py.snap (100%) rename src/{ => rules}/pydocstyle/snapshots/ruff__pydocstyle__tests__D104_D.py.snap (100%) rename src/{ => rules}/pydocstyle/snapshots/ruff__pydocstyle__tests__D104_D104____init__.py.snap (100%) rename src/{ => rules}/pydocstyle/snapshots/ruff__pydocstyle__tests__D105_D.py.snap (100%) rename src/{ => rules}/pydocstyle/snapshots/ruff__pydocstyle__tests__D106_D.py.snap (100%) rename src/{ => rules}/pydocstyle/snapshots/ruff__pydocstyle__tests__D107_D.py.snap (100%) rename src/{ => rules}/pydocstyle/snapshots/ruff__pydocstyle__tests__D201_D.py.snap (100%) rename src/{ => rules}/pydocstyle/snapshots/ruff__pydocstyle__tests__D202_D.py.snap (100%) rename src/{ => rules}/pydocstyle/snapshots/ruff__pydocstyle__tests__D203_D.py.snap (100%) rename src/{ => rules}/pydocstyle/snapshots/ruff__pydocstyle__tests__D204_D.py.snap (100%) rename src/{ => rules}/pydocstyle/snapshots/ruff__pydocstyle__tests__D205_D.py.snap (100%) rename src/{ => rules}/pydocstyle/snapshots/ruff__pydocstyle__tests__D206_D.py.snap (100%) rename src/{ => rules}/pydocstyle/snapshots/ruff__pydocstyle__tests__D207_D.py.snap (100%) rename src/{ => rules}/pydocstyle/snapshots/ruff__pydocstyle__tests__D208_D.py.snap (100%) rename src/{ => rules}/pydocstyle/snapshots/ruff__pydocstyle__tests__D209_D.py.snap (100%) rename src/{ => rules}/pydocstyle/snapshots/ruff__pydocstyle__tests__D210_D.py.snap (100%) rename src/{ => rules}/pydocstyle/snapshots/ruff__pydocstyle__tests__D211_D.py.snap (100%) rename src/{ => rules}/pydocstyle/snapshots/ruff__pydocstyle__tests__D212_D.py.snap (100%) rename src/{ => rules}/pydocstyle/snapshots/ruff__pydocstyle__tests__D213_D.py.snap (100%) rename src/{ => rules}/pydocstyle/snapshots/ruff__pydocstyle__tests__D214_sections.py.snap (100%) rename src/{ => rules}/pydocstyle/snapshots/ruff__pydocstyle__tests__D215_sections.py.snap (100%) rename src/{ => rules}/pydocstyle/snapshots/ruff__pydocstyle__tests__D300_D.py.snap (100%) rename src/{ => rules}/pydocstyle/snapshots/ruff__pydocstyle__tests__D301_D.py.snap (100%) rename src/{ => rules}/pydocstyle/snapshots/ruff__pydocstyle__tests__D400_D.py.snap (100%) rename src/{ => rules}/pydocstyle/snapshots/ruff__pydocstyle__tests__D400_D400.py.snap (100%) rename src/{ => rules}/pydocstyle/snapshots/ruff__pydocstyle__tests__D402_D.py.snap (100%) rename src/{ => rules}/pydocstyle/snapshots/ruff__pydocstyle__tests__D403_D.py.snap (100%) rename src/{ => rules}/pydocstyle/snapshots/ruff__pydocstyle__tests__D404_D.py.snap (100%) rename src/{ => rules}/pydocstyle/snapshots/ruff__pydocstyle__tests__D405_sections.py.snap (100%) rename src/{ => rules}/pydocstyle/snapshots/ruff__pydocstyle__tests__D406_sections.py.snap (100%) rename src/{ => rules}/pydocstyle/snapshots/ruff__pydocstyle__tests__D407_sections.py.snap (100%) rename src/{ => rules}/pydocstyle/snapshots/ruff__pydocstyle__tests__D408_sections.py.snap (100%) rename src/{ => rules}/pydocstyle/snapshots/ruff__pydocstyle__tests__D409_sections.py.snap (100%) rename src/{ => rules}/pydocstyle/snapshots/ruff__pydocstyle__tests__D410_sections.py.snap (100%) rename src/{ => rules}/pydocstyle/snapshots/ruff__pydocstyle__tests__D411_sections.py.snap (100%) rename src/{ => rules}/pydocstyle/snapshots/ruff__pydocstyle__tests__D412_sections.py.snap (100%) rename src/{ => rules}/pydocstyle/snapshots/ruff__pydocstyle__tests__D413_sections.py.snap (100%) rename src/{ => rules}/pydocstyle/snapshots/ruff__pydocstyle__tests__D414_sections.py.snap (100%) rename src/{ => rules}/pydocstyle/snapshots/ruff__pydocstyle__tests__D415_D.py.snap (100%) rename src/{ => rules}/pydocstyle/snapshots/ruff__pydocstyle__tests__D416_D.py.snap (100%) rename src/{ => rules}/pydocstyle/snapshots/ruff__pydocstyle__tests__D417_canonical_google_examples.py.snap (100%) rename src/{ => rules}/pydocstyle/snapshots/ruff__pydocstyle__tests__D417_canonical_numpy_examples.py.snap (100%) rename src/{ => rules}/pydocstyle/snapshots/ruff__pydocstyle__tests__D417_sections.py.snap (100%) rename src/{ => rules}/pydocstyle/snapshots/ruff__pydocstyle__tests__D418_D.py.snap (100%) rename src/{ => rules}/pydocstyle/snapshots/ruff__pydocstyle__tests__D419_D.py.snap (100%) rename src/{ => rules}/pydocstyle/snapshots/ruff__pydocstyle__tests__d417_google.snap (100%) rename src/{ => rules}/pydocstyle/snapshots/ruff__pydocstyle__tests__d417_numpy.snap (100%) rename src/{ => rules}/pydocstyle/snapshots/ruff__pydocstyle__tests__d417_unspecified.snap (100%) rename src/{ => rules}/pyflakes/cformat.rs (100%) rename src/{ => rules}/pyflakes/fixes.rs (100%) rename src/{ => rules}/pyflakes/format.rs (100%) rename src/{ => rules}/pyflakes/mod.rs (100%) rename src/{ => rules}/pyflakes/rules/assert_tuple.rs (100%) rename src/{ => rules}/pyflakes/rules/f_string_missing_placeholders.rs (100%) rename src/{ => rules}/pyflakes/rules/if_tuple.rs (100%) rename src/{ => rules}/pyflakes/rules/invalid_literal_comparisons.rs (100%) rename src/{ => rules}/pyflakes/rules/invalid_print_syntax.rs (100%) rename src/{ => rules}/pyflakes/rules/mod.rs (100%) rename src/{ => rules}/pyflakes/rules/raise_not_implemented.rs (100%) rename src/{ => rules}/pyflakes/rules/repeated_keys.rs (100%) rename src/{ => rules}/pyflakes/rules/strings.rs (98%) rename src/{ => rules}/pyflakes/rules/unused_annotation.rs (100%) rename src/{ => rules}/pyflakes/rules/unused_variable.rs (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_0.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_1.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_2.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_3.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_4.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_5.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_6.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_7.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F402_F402.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F403_F403.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F404_F404.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F405_F405.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F406_F406.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F407_F407.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F501_F50x.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F502_F502.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F502_F50x.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F503_F503.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F503_F50x.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F504_F504.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F504_F50x.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F505_F504.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F505_F50x.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F506_F50x.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F507_F50x.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F508_F50x.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F509_F50x.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F521_F521.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F522_F522.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F523_F523.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F524_F524.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F525_F525.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F541_F541.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F601_F601.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F602_F602.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F622_F622.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F631_F631.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F632_F632.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F633_F633.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F634_F634.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F701_F701.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F702_F702.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F704_F704.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F706_F706.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F707_F707.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F722_F722.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_0.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_1.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_10.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_11.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_12.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_13.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_14.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_15.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_16.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_17.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_18.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_19.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_2.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_20.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_3.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_4.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_5.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_6.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_7.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_8.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_9.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_0.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_1.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_2.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_3.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_4.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_5.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_6.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_7.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_8.pyi.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F822_F822.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F823_F823.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F841_F841_0.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F841_F841_1.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F841_F841_2.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F841_F841_3.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F842_F842.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__F901_F901.py.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__default_builtins.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__default_typing_modules.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__extra_builtins.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__extra_typing_modules.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__f841_dummy_variable_rgx.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__future_annotations.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__init.snap (100%) rename src/{ => rules}/pyflakes/snapshots/ruff__pyflakes__tests__multi_statement_lines.snap (100%) rename src/{ => rules}/pygrep_hooks/mod.rs (100%) rename src/{ => rules}/pygrep_hooks/rules/blanket_noqa.rs (100%) rename src/{ => rules}/pygrep_hooks/rules/blanket_type_ignore.rs (100%) rename src/{ => rules}/pygrep_hooks/rules/deprecated_log_warn.rs (100%) rename src/{ => rules}/pygrep_hooks/rules/mod.rs (100%) rename src/{ => rules}/pygrep_hooks/rules/no_eval.rs (100%) rename src/{ => rules}/pygrep_hooks/snapshots/ruff__pygrep_hooks__tests__PGH001_PGH001_0.py.snap (100%) rename src/{ => rules}/pygrep_hooks/snapshots/ruff__pygrep_hooks__tests__PGH001_PGH001_1.py.snap (100%) rename src/{ => rules}/pygrep_hooks/snapshots/ruff__pygrep_hooks__tests__PGH002_PGH002_0.py.snap (100%) rename src/{ => rules}/pygrep_hooks/snapshots/ruff__pygrep_hooks__tests__PGH002_PGH002_1.py.snap (100%) rename src/{ => rules}/pygrep_hooks/snapshots/ruff__pygrep_hooks__tests__PGH003_PGH003_0.py.snap (100%) rename src/{ => rules}/pygrep_hooks/snapshots/ruff__pygrep_hooks__tests__PGH004_PGH004_0.py.snap (100%) rename src/{ => rules}/pylint/mod.rs (100%) rename src/{ => rules}/pylint/rules/await_outside_async.rs (100%) rename src/{ => rules}/pylint/rules/constant_comparison.rs (100%) rename src/{ => rules}/pylint/rules/magic_value_comparison.rs (100%) rename src/{ => rules}/pylint/rules/merge_isinstance.rs (100%) rename src/{ => rules}/pylint/rules/misplaced_comparison_constant.rs (100%) rename src/{ => rules}/pylint/rules/mod.rs (100%) rename src/{ => rules}/pylint/rules/property_with_parameters.rs (100%) rename src/{ => rules}/pylint/rules/unnecessary_direct_lambda_call.rs (100%) rename src/{ => rules}/pylint/rules/use_from_import.rs (100%) rename src/{ => rules}/pylint/rules/use_sys_exit.rs (100%) rename src/{ => rules}/pylint/rules/used_prior_global_declaration.rs (100%) rename src/{ => rules}/pylint/rules/useless_else_on_loop.rs (100%) rename src/{ => rules}/pylint/rules/useless_import_alias.rs (100%) rename src/{ => rules}/pylint/snapshots/ruff__pylint__tests__PLC0414_import_aliasing.py.snap (100%) rename src/{ => rules}/pylint/snapshots/ruff__pylint__tests__PLC2201_misplaced_comparison_constant.py.snap (100%) rename src/{ => rules}/pylint/snapshots/ruff__pylint__tests__PLC3002_unnecessary_direct_lambda_call.py.snap (100%) rename src/{ => rules}/pylint/snapshots/ruff__pylint__tests__PLE0117_nonlocal_without_binding.py.snap (100%) rename src/{ => rules}/pylint/snapshots/ruff__pylint__tests__PLE0118_used_prior_global_declaration.py.snap (100%) rename src/{ => rules}/pylint/snapshots/ruff__pylint__tests__PLE1142_await_outside_async.py.snap (100%) rename src/{ => rules}/pylint/snapshots/ruff__pylint__tests__PLR0133_constant_comparison.py.snap (100%) rename src/{ => rules}/pylint/snapshots/ruff__pylint__tests__PLR0206_property_with_parameters.py.snap (100%) rename src/{ => rules}/pylint/snapshots/ruff__pylint__tests__PLR0402_import_aliasing.py.snap (100%) rename src/{ => rules}/pylint/snapshots/ruff__pylint__tests__PLR1701_consider_merging_isinstance.py.snap (100%) rename src/{ => rules}/pylint/snapshots/ruff__pylint__tests__PLR1722_consider_using_sys_exit_0.py.snap (100%) rename src/{ => rules}/pylint/snapshots/ruff__pylint__tests__PLR1722_consider_using_sys_exit_1.py.snap (100%) rename src/{ => rules}/pylint/snapshots/ruff__pylint__tests__PLR1722_consider_using_sys_exit_2.py.snap (100%) rename src/{ => rules}/pylint/snapshots/ruff__pylint__tests__PLR1722_consider_using_sys_exit_3.py.snap (100%) rename src/{ => rules}/pylint/snapshots/ruff__pylint__tests__PLR1722_consider_using_sys_exit_4.py.snap (100%) rename src/{ => rules}/pylint/snapshots/ruff__pylint__tests__PLR1722_consider_using_sys_exit_5.py.snap (100%) rename src/{ => rules}/pylint/snapshots/ruff__pylint__tests__PLR1722_consider_using_sys_exit_6.py.snap (100%) rename src/{ => rules}/pylint/snapshots/ruff__pylint__tests__PLR2004_magic_value_comparison.py.snap (100%) rename src/{ => rules}/pylint/snapshots/ruff__pylint__tests__PLW0120_useless_else_on_loop.py.snap (100%) rename src/{ => rules}/pylint/snapshots/ruff__pylint__tests__PLW0602_global_variable_not_assigned.py.snap (100%) rename src/{ => rules}/pyupgrade/fixes.rs (100%) rename src/{ => rules}/pyupgrade/mod.rs (100%) rename src/{ => rules}/pyupgrade/rules/convert_named_tuple_functional_to_class.rs (100%) rename src/{ => rules}/pyupgrade/rules/convert_typed_dict_functional_to_class.rs (100%) rename src/{ => rules}/pyupgrade/rules/datetime_utc_alias.rs (100%) rename src/{ => rules}/pyupgrade/rules/deprecated_unittest_alias.rs (100%) rename src/{ => rules}/pyupgrade/rules/format_literals.rs (98%) rename src/{ => rules}/pyupgrade/rules/mod.rs (100%) rename src/{ => rules}/pyupgrade/rules/native_literals.rs (100%) rename src/{ => rules}/pyupgrade/rules/open_alias.rs (100%) rename src/{ => rules}/pyupgrade/rules/os_error_alias.rs (100%) rename src/{ => rules}/pyupgrade/rules/redundant_open_modes.rs (100%) rename src/{ => rules}/pyupgrade/rules/remove_six_compat.rs (100%) rename src/{ => rules}/pyupgrade/rules/replace_stdout_stderr.rs (100%) rename src/{ => rules}/pyupgrade/rules/replace_universal_newlines.rs (100%) rename src/{ => rules}/pyupgrade/rules/rewrite_c_element_tree.rs (100%) rename src/{ => rules}/pyupgrade/rules/rewrite_mock_import.rs (100%) rename src/{ => rules}/pyupgrade/rules/rewrite_unicode_literal.rs (100%) rename src/{ => rules}/pyupgrade/rules/rewrite_yield_from.rs (100%) rename src/{ => rules}/pyupgrade/rules/super_call_with_parameters.rs (79%) rename src/{ => rules}/pyupgrade/rules/type_of_primitive.rs (97%) rename src/{ => rules}/pyupgrade/rules/typing_text_str_alias.rs (100%) rename src/{ => rules}/pyupgrade/rules/unnecessary_builtin_import.rs (100%) rename src/{ => rules}/pyupgrade/rules/unnecessary_encode_utf8.rs (100%) rename src/{ => rules}/pyupgrade/rules/unnecessary_future_import.rs (100%) rename src/{ => rules}/pyupgrade/rules/unnecessary_lru_cache_params.rs (100%) rename src/{ => rules}/pyupgrade/rules/unpack_list_comprehension.rs (100%) rename src/{ => rules}/pyupgrade/rules/use_pep585_annotation.rs (100%) rename src/{ => rules}/pyupgrade/rules/use_pep604_annotation.rs (100%) rename src/{ => rules}/pyupgrade/rules/useless_metaclass_type.rs (100%) rename src/{ => rules}/pyupgrade/rules/useless_object_inheritance.rs (93%) rename src/{ => rules}/pyupgrade/settings.rs (100%) rename src/{ => rules}/pyupgrade/snapshots/ruff__pyupgrade__tests__UP001_UP001.py.snap (100%) rename src/{ => rules}/pyupgrade/snapshots/ruff__pyupgrade__tests__UP003_UP003.py.snap (100%) rename src/{ => rules}/pyupgrade/snapshots/ruff__pyupgrade__tests__UP004_UP004.py.snap (100%) rename src/{ => rules}/pyupgrade/snapshots/ruff__pyupgrade__tests__UP005_UP005.py.snap (100%) rename src/{ => rules}/pyupgrade/snapshots/ruff__pyupgrade__tests__UP006_UP006.py.snap (100%) rename src/{ => rules}/pyupgrade/snapshots/ruff__pyupgrade__tests__UP007_UP007.py.snap (100%) rename src/{ => rules}/pyupgrade/snapshots/ruff__pyupgrade__tests__UP008_UP008.py.snap (100%) rename src/{ => rules}/pyupgrade/snapshots/ruff__pyupgrade__tests__UP009_UP009_0.py.snap (100%) rename src/{ => rules}/pyupgrade/snapshots/ruff__pyupgrade__tests__UP009_UP009_1.py.snap (100%) rename src/{ => rules}/pyupgrade/snapshots/ruff__pyupgrade__tests__UP009_UP009_2.py.snap (100%) rename src/{ => rules}/pyupgrade/snapshots/ruff__pyupgrade__tests__UP009_UP009_3.py.snap (100%) rename src/{ => rules}/pyupgrade/snapshots/ruff__pyupgrade__tests__UP009_UP009_4.py.snap (100%) rename src/{ => rules}/pyupgrade/snapshots/ruff__pyupgrade__tests__UP010_UP010.py.snap (100%) rename src/{ => rules}/pyupgrade/snapshots/ruff__pyupgrade__tests__UP011_UP011_0.py.snap (100%) rename src/{ => rules}/pyupgrade/snapshots/ruff__pyupgrade__tests__UP011_UP011_1.py.snap (100%) rename src/{ => rules}/pyupgrade/snapshots/ruff__pyupgrade__tests__UP012_UP012.py.snap (100%) rename src/{ => rules}/pyupgrade/snapshots/ruff__pyupgrade__tests__UP013_UP013.py.snap (100%) rename src/{ => rules}/pyupgrade/snapshots/ruff__pyupgrade__tests__UP014_UP014.py.snap (100%) rename src/{ => rules}/pyupgrade/snapshots/ruff__pyupgrade__tests__UP015_UP015.py.snap (100%) rename src/{ => rules}/pyupgrade/snapshots/ruff__pyupgrade__tests__UP016_UP016.py.snap (100%) rename src/{ => rules}/pyupgrade/snapshots/ruff__pyupgrade__tests__UP018_UP018.py.snap (100%) rename src/{ => rules}/pyupgrade/snapshots/ruff__pyupgrade__tests__UP019_UP019.py.snap (100%) rename src/{ => rules}/pyupgrade/snapshots/ruff__pyupgrade__tests__UP021_UP021.py.snap (100%) rename src/{ => rules}/pyupgrade/snapshots/ruff__pyupgrade__tests__UP022_UP022.py.snap (100%) rename src/{ => rules}/pyupgrade/snapshots/ruff__pyupgrade__tests__UP023_UP023.py.snap (100%) rename src/{ => rules}/pyupgrade/snapshots/ruff__pyupgrade__tests__UP024_UP024_0.py.snap (100%) rename src/{ => rules}/pyupgrade/snapshots/ruff__pyupgrade__tests__UP024_UP024_1.py.snap (100%) rename src/{ => rules}/pyupgrade/snapshots/ruff__pyupgrade__tests__UP024_UP024_2.py.snap (100%) rename src/{ => rules}/pyupgrade/snapshots/ruff__pyupgrade__tests__UP024_UP024_3.py.snap (100%) rename src/{ => rules}/pyupgrade/snapshots/ruff__pyupgrade__tests__UP025_UP025.py.snap (100%) rename src/{ => rules}/pyupgrade/snapshots/ruff__pyupgrade__tests__UP026_UP026.py.snap (100%) rename src/{ => rules}/pyupgrade/snapshots/ruff__pyupgrade__tests__UP027_UP027.py.snap (100%) rename src/{ => rules}/pyupgrade/snapshots/ruff__pyupgrade__tests__UP028_UP028_0.py.snap (100%) rename src/{ => rules}/pyupgrade/snapshots/ruff__pyupgrade__tests__UP028_UP028_1.py.snap (100%) rename src/{ => rules}/pyupgrade/snapshots/ruff__pyupgrade__tests__UP029_UP029.py.snap (100%) rename src/{ => rules}/pyupgrade/snapshots/ruff__pyupgrade__tests__UP030_UP030_0.py.snap (100%) rename src/{ => rules}/pyupgrade/snapshots/ruff__pyupgrade__tests__UP030_UP030_1.py.snap (100%) rename src/{ => rules}/pyupgrade/snapshots/ruff__pyupgrade__tests__datetime_utc_alias_py311.snap (100%) rename src/{ => rules}/pyupgrade/snapshots/ruff__pyupgrade__tests__future_annotations_pep_585_p37.snap (100%) rename src/{ => rules}/pyupgrade/snapshots/ruff__pyupgrade__tests__future_annotations_pep_585_py310.snap (100%) rename src/{ => rules}/pyupgrade/snapshots/ruff__pyupgrade__tests__future_annotations_pep_604_p37.snap (100%) rename src/{ => rules}/pyupgrade/snapshots/ruff__pyupgrade__tests__future_annotations_pep_604_py310.snap (100%) rename src/{ => rules}/pyupgrade/types.rs (100%) rename src/{ => rules}/ruff/mod.rs (100%) rename src/{ => rules}/ruff/rules.rs (100%) rename src/{ => rules}/ruff/snapshots/ruff__ruff__tests__RUF004_RUF004.py.snap (100%) rename src/{ => rules}/ruff/snapshots/ruff__ruff__tests__confusables.snap (100%) rename src/{ => rules}/ruff/snapshots/ruff__ruff__tests__flake8_noqa.snap (100%) rename src/{ => rules}/ruff/snapshots/ruff__ruff__tests__redirects.snap (100%) rename src/{ => rules}/ruff/snapshots/ruff__ruff__tests__ruf100_0.snap (100%) rename src/{ => rules}/ruff/snapshots/ruff__ruff__tests__ruf100_1.snap (100%) rename src/{ => rules}/ruff/snapshots/ruff__ruff__tests__ruff_noqa.snap (100%) diff --git a/flake8_to_ruff/src/converter.rs b/flake8_to_ruff/src/converter.rs index 35767a0efb..2a9e23de77 100644 --- a/flake8_to_ruff/src/converter.rs +++ b/flake8_to_ruff/src/converter.rs @@ -2,19 +2,20 @@ use std::collections::{BTreeSet, HashMap}; use anyhow::Result; use colored::Colorize; -use ruff::flake8_pytest_style::types::{ +use ruff::registry::RuleCodePrefix; +use ruff::rules::flake8_pytest_style::types::{ ParametrizeNameType, ParametrizeValuesRowType, ParametrizeValuesType, }; -use ruff::flake8_quotes::settings::Quote; -use ruff::flake8_tidy_imports::settings::Strictness; -use ruff::pydocstyle::settings::Convention; -use ruff::registry::RuleCodePrefix; +use ruff::rules::flake8_quotes::settings::Quote; +use ruff::rules::flake8_tidy_imports::settings::Strictness; +use ruff::rules::pydocstyle::settings::Convention; +use ruff::rules::{ + flake8_annotations, flake8_bugbear, flake8_errmsg, flake8_pytest_style, flake8_quotes, + flake8_tidy_imports, mccabe, pep8_naming, pydocstyle, +}; use ruff::settings::options::Options; use ruff::settings::pyproject::Pyproject; -use ruff::{ - flake8_annotations, flake8_bugbear, flake8_errmsg, flake8_pytest_style, flake8_quotes, - flake8_tidy_imports, mccabe, pep8_naming, pydocstyle, warn_user, -}; +use ruff::warn_user; use crate::black::Black; use crate::plugin::Plugin; @@ -389,11 +390,11 @@ mod tests { use std::collections::HashMap; use anyhow::Result; - use ruff::pydocstyle::settings::Convention; use ruff::registry::RuleCodePrefix; + use ruff::rules::pydocstyle::settings::Convention; + use ruff::rules::{flake8_quotes, pydocstyle}; use ruff::settings::options::Options; use ruff::settings::pyproject::Pyproject; - use ruff::{flake8_quotes, pydocstyle}; use crate::converter::convert; use crate::plugin::Plugin; diff --git a/ruff_cli/src/cli.rs b/ruff_cli/src/cli.rs index 9f9ff13af3..e9ec481628 100644 --- a/ruff_cli/src/cli.rs +++ b/ruff_cli/src/cli.rs @@ -2,13 +2,14 @@ use std::path::{Path, PathBuf}; use clap::{command, Parser}; use regex::Regex; +use ruff::fs; use ruff::logging::LogLevel; use ruff::registry::{RuleCode, RuleCodePrefix}; use ruff::resolver::ConfigProcessor; +use ruff::rules::mccabe; use ruff::settings::types::{ FilePattern, PatternPrefixPair, PerFileIgnore, PythonVersion, SerializationFormat, }; -use ruff::{fs, mccabe}; use rustc_hash::FxHashMap; #[derive(Debug, Parser)] diff --git a/src/checkers/ast.rs b/src/checkers/ast.rs index af670b5e1a..c41f3caddd 100644 --- a/src/checkers/ast.rs +++ b/src/checkers/ast.rs @@ -29,20 +29,20 @@ use crate::python::future::ALL_FEATURE_NAMES; use crate::python::typing; use crate::python::typing::SubscriptKind; use crate::registry::{Diagnostic, RuleCode}; +use crate::rules::{ + flake8_2020, flake8_annotations, flake8_bandit, flake8_blind_except, flake8_boolean_trap, + flake8_bugbear, flake8_builtins, flake8_comprehensions, flake8_datetimez, flake8_debugger, + flake8_errmsg, flake8_implicit_str_concat, flake8_import_conventions, flake8_pie, flake8_print, + flake8_pytest_style, flake8_return, flake8_simplify, flake8_tidy_imports, + flake8_unused_arguments, mccabe, pandas_vet, pep8_naming, pycodestyle, pydocstyle, pyflakes, + pygrep_hooks, pylint, pyupgrade, ruff, +}; use crate::settings::types::PythonVersion; use crate::settings::{flags, Settings}; use crate::source_code::{Locator, Stylist}; use crate::violations::DeferralKeyword; use crate::visibility::{module_visibility, transition_scope, Modifier, Visibility, VisibleScope}; -use crate::{ - autofix, docstrings, flake8_2020, flake8_annotations, flake8_bandit, flake8_blind_except, - flake8_boolean_trap, flake8_bugbear, flake8_builtins, flake8_comprehensions, flake8_datetimez, - flake8_debugger, flake8_errmsg, flake8_implicit_str_concat, flake8_import_conventions, - flake8_pie, flake8_print, flake8_pytest_style, flake8_return, flake8_simplify, - flake8_tidy_imports, flake8_unused_arguments, mccabe, noqa, pandas_vet, pep8_naming, - pycodestyle, pydocstyle, pyflakes, pygrep_hooks, pylint, pyupgrade, ruff, violations, - visibility, -}; +use crate::{autofix, docstrings, noqa, violations, visibility}; const GLOBAL_SCOPE_INDEX: usize = 0; diff --git a/src/checkers/imports.rs b/src/checkers/imports.rs index f3586325a3..1ad51cd289 100644 --- a/src/checkers/imports.rs +++ b/src/checkers/imports.rs @@ -6,9 +6,9 @@ use rustpython_parser::ast::Suite; use crate::ast::visitor::Visitor; use crate::directives::IsortDirectives; -use crate::isort; -use crate::isort::track::{Block, ImportTracker}; use crate::registry::{Diagnostic, RuleCode}; +use crate::rules::isort; +use crate::rules::isort::track::{Block, ImportTracker}; use crate::settings::{flags, Settings}; use crate::source_code::{Locator, Stylist}; diff --git a/src/checkers/lines.rs b/src/checkers/lines.rs index 53e2411e78..706c24a5eb 100644 --- a/src/checkers/lines.rs +++ b/src/checkers/lines.rs @@ -1,9 +1,11 @@ //! Lint rules based on checking raw physical lines. -use crate::pycodestyle::rules::{doc_line_too_long, line_too_long, no_newline_at_end_of_file}; -use crate::pygrep_hooks::rules::{blanket_noqa, blanket_type_ignore}; -use crate::pyupgrade::rules::unnecessary_coding_comment; use crate::registry::{Diagnostic, RuleCode}; +use crate::rules::pycodestyle::rules::{ + doc_line_too_long, line_too_long, no_newline_at_end_of_file, +}; +use crate::rules::pygrep_hooks::rules::{blanket_noqa, blanket_type_ignore}; +use crate::rules::pyupgrade::rules::unnecessary_coding_comment; use crate::settings::{flags, Settings}; pub fn check_lines( diff --git a/src/checkers/tokens.rs b/src/checkers/tokens.rs index 23d257df5e..4771a08a14 100644 --- a/src/checkers/tokens.rs +++ b/src/checkers/tokens.rs @@ -4,10 +4,10 @@ use rustpython_parser::lexer::{LexResult, Tok}; use crate::lex::docstring_detection::StateMachine; use crate::registry::{Diagnostic, RuleCode}; -use crate::ruff::rules::Context; +use crate::rules::ruff::rules::Context; +use crate::rules::{eradicate, flake8_implicit_str_concat, flake8_quotes, pycodestyle, ruff}; use crate::settings::{flags, Settings}; use crate::source_code::Locator; -use crate::{eradicate, flake8_implicit_str_concat, flake8_quotes, pycodestyle, ruff}; pub fn check_tokens( locator: &Locator, diff --git a/src/lib.rs b/src/lib.rs index 662983cb10..0c9560fec8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -28,49 +28,17 @@ mod cst; pub mod directives; mod doc_lines; mod docstrings; -mod eradicate; pub mod fix; -mod flake8_2020; -pub mod flake8_annotations; -pub mod flake8_bandit; -mod flake8_blind_except; -pub mod flake8_boolean_trap; -pub mod flake8_bugbear; -mod flake8_builtins; -mod flake8_comprehensions; -mod flake8_datetimez; -mod flake8_debugger; -pub mod flake8_errmsg; -mod flake8_implicit_str_concat; -mod flake8_import_conventions; -pub mod flake8_pie; -mod flake8_print; -pub mod flake8_pytest_style; -pub mod flake8_quotes; -mod flake8_return; -mod flake8_simplify; -pub mod flake8_tidy_imports; -mod flake8_unused_arguments; pub mod fs; -mod isort; mod lex; pub mod linter; pub mod logging; -pub mod mccabe; pub mod message; mod noqa; -mod pandas_vet; -pub mod pep8_naming; -mod pycodestyle; -pub mod pydocstyle; -mod pyflakes; -mod pygrep_hooks; -mod pylint; mod python; -mod pyupgrade; pub mod registry; pub mod resolver; -mod ruff; +pub mod rules; pub mod rustpython_helpers; pub mod settings; pub mod source_code; diff --git a/src/lib_wasm.rs b/src/lib_wasm.rs index eba08fa32b..3670171909 100644 --- a/src/lib_wasm.rs +++ b/src/lib_wasm.rs @@ -5,19 +5,20 @@ use rustpython_parser::lexer::LexResult; use serde::Serialize; use wasm_bindgen::prelude::*; +use crate::directives; use crate::linter::check_path; use crate::registry::{RuleCode, RuleCodePrefix}; +use crate::rules::{ + flake8_annotations, flake8_bandit, flake8_bugbear, flake8_errmsg, flake8_import_conventions, + flake8_pytest_style, flake8_quotes, flake8_tidy_imports, flake8_unused_arguments, isort, + mccabe, pep8_naming, pycodestyle, pydocstyle, pyupgrade, +}; use crate::rustpython_helpers::tokenize; use crate::settings::configuration::Configuration; use crate::settings::options::Options; use crate::settings::types::PythonVersion; use crate::settings::{flags, Settings}; use crate::source_code::{Locator, Stylist}; -use crate::{ - directives, flake8_annotations, flake8_bandit, flake8_bugbear, flake8_errmsg, - flake8_import_conventions, flake8_pytest_style, flake8_quotes, flake8_tidy_imports, - flake8_unused_arguments, isort, mccabe, pep8_naming, pycodestyle, pydocstyle, pyupgrade, -}; const VERSION: &str = env!("CARGO_PKG_VERSION"); diff --git a/src/eradicate/detection.rs b/src/rules/eradicate/detection.rs similarity index 99% rename from src/eradicate/detection.rs rename to src/rules/eradicate/detection.rs index 68b996549e..4080e23f99 100644 --- a/src/eradicate/detection.rs +++ b/src/rules/eradicate/detection.rs @@ -99,7 +99,7 @@ fn multiline_case(line: &str) -> bool { #[cfg(test)] mod tests { - use crate::eradicate::detection::comment_contains_code; + use super::comment_contains_code; #[test] fn comment_contains_code_basic() { diff --git a/src/eradicate/mod.rs b/src/rules/eradicate/mod.rs similarity index 100% rename from src/eradicate/mod.rs rename to src/rules/eradicate/mod.rs diff --git a/src/eradicate/rules.rs b/src/rules/eradicate/rules.rs similarity index 96% rename from src/eradicate/rules.rs rename to src/rules/eradicate/rules.rs index b3f1872d1e..a30f1d20ff 100644 --- a/src/eradicate/rules.rs +++ b/src/rules/eradicate/rules.rs @@ -1,7 +1,7 @@ use rustpython_ast::Location; +use super::detection::comment_contains_code; use crate::ast::types::Range; -use crate::eradicate::detection::comment_contains_code; use crate::fix::Fix; use crate::registry::{Diagnostic, RuleCode}; use crate::settings::{flags, Settings}; diff --git a/src/eradicate/snapshots/ruff__eradicate__tests__ERA001_ERA001.py.snap b/src/rules/eradicate/snapshots/ruff__eradicate__tests__ERA001_ERA001.py.snap similarity index 100% rename from src/eradicate/snapshots/ruff__eradicate__tests__ERA001_ERA001.py.snap rename to src/rules/eradicate/snapshots/ruff__eradicate__tests__ERA001_ERA001.py.snap diff --git a/src/flake8_2020/mod.rs b/src/rules/flake8_2020/mod.rs similarity index 100% rename from src/flake8_2020/mod.rs rename to src/rules/flake8_2020/mod.rs diff --git a/src/flake8_2020/rules.rs b/src/rules/flake8_2020/rules.rs similarity index 100% rename from src/flake8_2020/rules.rs rename to src/rules/flake8_2020/rules.rs diff --git a/src/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT101_YTT101.py.snap b/src/rules/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT101_YTT101.py.snap similarity index 100% rename from src/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT101_YTT101.py.snap rename to src/rules/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT101_YTT101.py.snap diff --git a/src/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT102_YTT102.py.snap b/src/rules/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT102_YTT102.py.snap similarity index 100% rename from src/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT102_YTT102.py.snap rename to src/rules/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT102_YTT102.py.snap diff --git a/src/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT103_YTT103.py.snap b/src/rules/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT103_YTT103.py.snap similarity index 100% rename from src/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT103_YTT103.py.snap rename to src/rules/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT103_YTT103.py.snap diff --git a/src/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT201_YTT201.py.snap b/src/rules/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT201_YTT201.py.snap similarity index 100% rename from src/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT201_YTT201.py.snap rename to src/rules/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT201_YTT201.py.snap diff --git a/src/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT202_YTT202.py.snap b/src/rules/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT202_YTT202.py.snap similarity index 100% rename from src/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT202_YTT202.py.snap rename to src/rules/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT202_YTT202.py.snap diff --git a/src/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT203_YTT203.py.snap b/src/rules/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT203_YTT203.py.snap similarity index 100% rename from src/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT203_YTT203.py.snap rename to src/rules/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT203_YTT203.py.snap diff --git a/src/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT204_YTT204.py.snap b/src/rules/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT204_YTT204.py.snap similarity index 100% rename from src/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT204_YTT204.py.snap rename to src/rules/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT204_YTT204.py.snap diff --git a/src/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT301_YTT301.py.snap b/src/rules/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT301_YTT301.py.snap similarity index 100% rename from src/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT301_YTT301.py.snap rename to src/rules/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT301_YTT301.py.snap diff --git a/src/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT302_YTT302.py.snap b/src/rules/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT302_YTT302.py.snap similarity index 100% rename from src/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT302_YTT302.py.snap rename to src/rules/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT302_YTT302.py.snap diff --git a/src/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT303_YTT303.py.snap b/src/rules/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT303_YTT303.py.snap similarity index 100% rename from src/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT303_YTT303.py.snap rename to src/rules/flake8_2020/snapshots/ruff__flake8_2020__tests__YTT303_YTT303.py.snap diff --git a/src/flake8_annotations/fixes.rs b/src/rules/flake8_annotations/fixes.rs similarity index 100% rename from src/flake8_annotations/fixes.rs rename to src/rules/flake8_annotations/fixes.rs diff --git a/src/flake8_annotations/helpers.rs b/src/rules/flake8_annotations/helpers.rs similarity index 100% rename from src/flake8_annotations/helpers.rs rename to src/rules/flake8_annotations/helpers.rs diff --git a/src/flake8_annotations/mod.rs b/src/rules/flake8_annotations/mod.rs similarity index 93% rename from src/flake8_annotations/mod.rs rename to src/rules/flake8_annotations/mod.rs index affb89750a..8181b12511 100644 --- a/src/flake8_annotations/mod.rs +++ b/src/rules/flake8_annotations/mod.rs @@ -9,7 +9,6 @@ mod tests { use anyhow::Result; - use crate::flake8_annotations; use crate::linter::test_path; use crate::registry::RuleCode; use crate::settings::Settings; @@ -43,7 +42,7 @@ mod tests { let diagnostics = test_path( Path::new("./resources/test/fixtures/flake8_annotations/suppress_dummy_args.py"), &Settings { - flake8_annotations: flake8_annotations::settings::Settings { + flake8_annotations: super::settings::Settings { mypy_init_return: false, suppress_dummy_args: true, suppress_none_returning: false, @@ -67,7 +66,7 @@ mod tests { let diagnostics = test_path( Path::new("./resources/test/fixtures/flake8_annotations/mypy_init_return.py"), &Settings { - flake8_annotations: flake8_annotations::settings::Settings { + flake8_annotations: super::settings::Settings { mypy_init_return: true, suppress_dummy_args: false, suppress_none_returning: false, @@ -91,7 +90,7 @@ mod tests { let diagnostics = test_path( Path::new("./resources/test/fixtures/flake8_annotations/suppress_none_returning.py"), &Settings { - flake8_annotations: flake8_annotations::settings::Settings { + flake8_annotations: super::settings::Settings { mypy_init_return: false, suppress_dummy_args: false, suppress_none_returning: true, @@ -115,7 +114,7 @@ mod tests { let diagnostics = test_path( Path::new("./resources/test/fixtures/flake8_annotations/allow_star_arg_any.py"), &Settings { - flake8_annotations: flake8_annotations::settings::Settings { + flake8_annotations: super::settings::Settings { mypy_init_return: false, suppress_dummy_args: false, suppress_none_returning: false, diff --git a/src/flake8_annotations/rules.rs b/src/rules/flake8_annotations/rules.rs similarity index 99% rename from src/flake8_annotations/rules.rs rename to src/rules/flake8_annotations/rules.rs index 06bc452477..8e5993cf4b 100644 --- a/src/flake8_annotations/rules.rs +++ b/src/rules/flake8_annotations/rules.rs @@ -1,13 +1,13 @@ use log::error; use rustpython_ast::{Constant, Expr, ExprKind, Stmt, StmtKind}; +use super::fixes; +use super::helpers::match_function_def; use crate::ast::types::Range; use crate::ast::visitor::Visitor; use crate::ast::{cast, helpers, visitor}; use crate::checkers::ast::Checker; use crate::docstrings::definition::{Definition, DefinitionKind}; -use crate::flake8_annotations::fixes; -use crate::flake8_annotations::helpers::match_function_def; use crate::registry::{Diagnostic, RuleCode}; use crate::visibility::Visibility; use crate::{violations, visibility}; diff --git a/src/flake8_annotations/settings.rs b/src/rules/flake8_annotations/settings.rs similarity index 100% rename from src/flake8_annotations/settings.rs rename to src/rules/flake8_annotations/settings.rs diff --git a/src/flake8_annotations/snapshots/ruff__flake8_annotations__tests__allow_nested_overload.snap b/src/rules/flake8_annotations/snapshots/ruff__flake8_annotations__tests__allow_nested_overload.snap similarity index 100% rename from src/flake8_annotations/snapshots/ruff__flake8_annotations__tests__allow_nested_overload.snap rename to src/rules/flake8_annotations/snapshots/ruff__flake8_annotations__tests__allow_nested_overload.snap diff --git a/src/flake8_annotations/snapshots/ruff__flake8_annotations__tests__allow_overload.snap b/src/rules/flake8_annotations/snapshots/ruff__flake8_annotations__tests__allow_overload.snap similarity index 100% rename from src/flake8_annotations/snapshots/ruff__flake8_annotations__tests__allow_overload.snap rename to src/rules/flake8_annotations/snapshots/ruff__flake8_annotations__tests__allow_overload.snap diff --git a/src/flake8_annotations/snapshots/ruff__flake8_annotations__tests__allow_star_arg_any.snap b/src/rules/flake8_annotations/snapshots/ruff__flake8_annotations__tests__allow_star_arg_any.snap similarity index 100% rename from src/flake8_annotations/snapshots/ruff__flake8_annotations__tests__allow_star_arg_any.snap rename to src/rules/flake8_annotations/snapshots/ruff__flake8_annotations__tests__allow_star_arg_any.snap diff --git a/src/flake8_annotations/snapshots/ruff__flake8_annotations__tests__defaults.snap b/src/rules/flake8_annotations/snapshots/ruff__flake8_annotations__tests__defaults.snap similarity index 100% rename from src/flake8_annotations/snapshots/ruff__flake8_annotations__tests__defaults.snap rename to src/rules/flake8_annotations/snapshots/ruff__flake8_annotations__tests__defaults.snap diff --git a/src/flake8_annotations/snapshots/ruff__flake8_annotations__tests__mypy_init_return.snap b/src/rules/flake8_annotations/snapshots/ruff__flake8_annotations__tests__mypy_init_return.snap similarity index 100% rename from src/flake8_annotations/snapshots/ruff__flake8_annotations__tests__mypy_init_return.snap rename to src/rules/flake8_annotations/snapshots/ruff__flake8_annotations__tests__mypy_init_return.snap diff --git a/src/flake8_annotations/snapshots/ruff__flake8_annotations__tests__suppress_dummy_args.snap b/src/rules/flake8_annotations/snapshots/ruff__flake8_annotations__tests__suppress_dummy_args.snap similarity index 100% rename from src/flake8_annotations/snapshots/ruff__flake8_annotations__tests__suppress_dummy_args.snap rename to src/rules/flake8_annotations/snapshots/ruff__flake8_annotations__tests__suppress_dummy_args.snap diff --git a/src/flake8_annotations/snapshots/ruff__flake8_annotations__tests__suppress_none_returning.snap b/src/rules/flake8_annotations/snapshots/ruff__flake8_annotations__tests__suppress_none_returning.snap similarity index 100% rename from src/flake8_annotations/snapshots/ruff__flake8_annotations__tests__suppress_none_returning.snap rename to src/rules/flake8_annotations/snapshots/ruff__flake8_annotations__tests__suppress_none_returning.snap diff --git a/src/flake8_bandit/helpers.rs b/src/rules/flake8_bandit/helpers.rs similarity index 100% rename from src/flake8_bandit/helpers.rs rename to src/rules/flake8_bandit/helpers.rs diff --git a/src/flake8_bandit/mod.rs b/src/rules/flake8_bandit/mod.rs similarity index 95% rename from src/flake8_bandit/mod.rs rename to src/rules/flake8_bandit/mod.rs index 423fe3a0d4..d2accc18b2 100644 --- a/src/flake8_bandit/mod.rs +++ b/src/rules/flake8_bandit/mod.rs @@ -9,7 +9,6 @@ mod tests { use anyhow::Result; use test_case::test_case; - use crate::flake8_bandit; use crate::linter::test_path; use crate::registry::RuleCode; use crate::settings::Settings; @@ -46,7 +45,7 @@ mod tests { let diagnostics = test_path( Path::new("./resources/test/fixtures/flake8_bandit/S108.py"), &Settings { - flake8_bandit: flake8_bandit::settings::Settings { + flake8_bandit: super::settings::Settings { hardcoded_tmp_directory: vec![ "/tmp".to_string(), "/var/tmp".to_string(), diff --git a/src/flake8_bandit/rules/assert_used.rs b/src/rules/flake8_bandit/rules/assert_used.rs similarity index 100% rename from src/flake8_bandit/rules/assert_used.rs rename to src/rules/flake8_bandit/rules/assert_used.rs diff --git a/src/flake8_bandit/rules/bad_file_permissions.rs b/src/rules/flake8_bandit/rules/bad_file_permissions.rs similarity index 100% rename from src/flake8_bandit/rules/bad_file_permissions.rs rename to src/rules/flake8_bandit/rules/bad_file_permissions.rs diff --git a/src/flake8_bandit/rules/exec_used.rs b/src/rules/flake8_bandit/rules/exec_used.rs similarity index 100% rename from src/flake8_bandit/rules/exec_used.rs rename to src/rules/flake8_bandit/rules/exec_used.rs diff --git a/src/flake8_bandit/rules/hardcoded_bind_all_interfaces.rs b/src/rules/flake8_bandit/rules/hardcoded_bind_all_interfaces.rs similarity index 100% rename from src/flake8_bandit/rules/hardcoded_bind_all_interfaces.rs rename to src/rules/flake8_bandit/rules/hardcoded_bind_all_interfaces.rs diff --git a/src/flake8_bandit/rules/hardcoded_password_default.rs b/src/rules/flake8_bandit/rules/hardcoded_password_default.rs similarity index 95% rename from src/flake8_bandit/rules/hardcoded_password_default.rs rename to src/rules/flake8_bandit/rules/hardcoded_password_default.rs index c8ae3abec8..156c3d30d6 100644 --- a/src/flake8_bandit/rules/hardcoded_password_default.rs +++ b/src/rules/flake8_bandit/rules/hardcoded_password_default.rs @@ -1,7 +1,7 @@ use rustpython_ast::{ArgData, Arguments, Expr, Located}; +use super::super::helpers::{matches_password_name, string_literal}; use crate::ast::types::Range; -use crate::flake8_bandit::helpers::{matches_password_name, string_literal}; use crate::registry::Diagnostic; use crate::violations; diff --git a/src/flake8_bandit/rules/hardcoded_password_func_arg.rs b/src/rules/flake8_bandit/rules/hardcoded_password_func_arg.rs similarity index 89% rename from src/flake8_bandit/rules/hardcoded_password_func_arg.rs rename to src/rules/flake8_bandit/rules/hardcoded_password_func_arg.rs index 1f95e6521e..2a4f188be2 100644 --- a/src/flake8_bandit/rules/hardcoded_password_func_arg.rs +++ b/src/rules/flake8_bandit/rules/hardcoded_password_func_arg.rs @@ -1,7 +1,7 @@ use rustpython_ast::Keyword; +use super::super::helpers::{matches_password_name, string_literal}; use crate::ast::types::Range; -use crate::flake8_bandit::helpers::{matches_password_name, string_literal}; use crate::registry::Diagnostic; use crate::violations; diff --git a/src/flake8_bandit/rules/hardcoded_password_string.rs b/src/rules/flake8_bandit/rules/hardcoded_password_string.rs similarity index 95% rename from src/flake8_bandit/rules/hardcoded_password_string.rs rename to src/rules/flake8_bandit/rules/hardcoded_password_string.rs index 6f6852a7f5..fd658a41da 100644 --- a/src/flake8_bandit/rules/hardcoded_password_string.rs +++ b/src/rules/flake8_bandit/rules/hardcoded_password_string.rs @@ -1,7 +1,7 @@ use rustpython_ast::{Constant, Expr, ExprKind}; +use super::super::helpers::{matches_password_name, string_literal}; use crate::ast::types::Range; -use crate::flake8_bandit::helpers::{matches_password_name, string_literal}; use crate::registry::Diagnostic; use crate::violations; diff --git a/src/flake8_bandit/rules/hardcoded_tmp_directory.rs b/src/rules/flake8_bandit/rules/hardcoded_tmp_directory.rs similarity index 100% rename from src/flake8_bandit/rules/hardcoded_tmp_directory.rs rename to src/rules/flake8_bandit/rules/hardcoded_tmp_directory.rs diff --git a/src/flake8_bandit/rules/hashlib_insecure_hash_functions.rs b/src/rules/flake8_bandit/rules/hashlib_insecure_hash_functions.rs similarity index 97% rename from src/flake8_bandit/rules/hashlib_insecure_hash_functions.rs rename to src/rules/flake8_bandit/rules/hashlib_insecure_hash_functions.rs index 3f13d881c6..09263e6192 100644 --- a/src/flake8_bandit/rules/hashlib_insecure_hash_functions.rs +++ b/src/rules/flake8_bandit/rules/hashlib_insecure_hash_functions.rs @@ -1,9 +1,9 @@ use rustpython_ast::{Constant, Expr, ExprKind, Keyword}; +use super::super::helpers::string_literal; use crate::ast::helpers::SimpleCallArgs; use crate::ast::types::Range; use crate::checkers::ast::Checker; -use crate::flake8_bandit::helpers::string_literal; use crate::registry::Diagnostic; use crate::violations; diff --git a/src/flake8_bandit/rules/jinja2_autoescape_false.rs b/src/rules/flake8_bandit/rules/jinja2_autoescape_false.rs similarity index 100% rename from src/flake8_bandit/rules/jinja2_autoescape_false.rs rename to src/rules/flake8_bandit/rules/jinja2_autoescape_false.rs diff --git a/src/flake8_bandit/rules/mod.rs b/src/rules/flake8_bandit/rules/mod.rs similarity index 100% rename from src/flake8_bandit/rules/mod.rs rename to src/rules/flake8_bandit/rules/mod.rs diff --git a/src/flake8_bandit/rules/request_with_no_cert_validation.rs b/src/rules/flake8_bandit/rules/request_with_no_cert_validation.rs similarity index 100% rename from src/flake8_bandit/rules/request_with_no_cert_validation.rs rename to src/rules/flake8_bandit/rules/request_with_no_cert_validation.rs diff --git a/src/flake8_bandit/rules/request_without_timeout.rs b/src/rules/flake8_bandit/rules/request_without_timeout.rs similarity index 100% rename from src/flake8_bandit/rules/request_without_timeout.rs rename to src/rules/flake8_bandit/rules/request_without_timeout.rs diff --git a/src/flake8_bandit/rules/snmp_insecure_version.rs b/src/rules/flake8_bandit/rules/snmp_insecure_version.rs similarity index 100% rename from src/flake8_bandit/rules/snmp_insecure_version.rs rename to src/rules/flake8_bandit/rules/snmp_insecure_version.rs diff --git a/src/flake8_bandit/rules/snmp_weak_cryptography.rs b/src/rules/flake8_bandit/rules/snmp_weak_cryptography.rs similarity index 100% rename from src/flake8_bandit/rules/snmp_weak_cryptography.rs rename to src/rules/flake8_bandit/rules/snmp_weak_cryptography.rs diff --git a/src/flake8_bandit/rules/unsafe_yaml_load.rs b/src/rules/flake8_bandit/rules/unsafe_yaml_load.rs similarity index 100% rename from src/flake8_bandit/rules/unsafe_yaml_load.rs rename to src/rules/flake8_bandit/rules/unsafe_yaml_load.rs diff --git a/src/flake8_bandit/settings.rs b/src/rules/flake8_bandit/settings.rs similarity index 100% rename from src/flake8_bandit/settings.rs rename to src/rules/flake8_bandit/settings.rs diff --git a/src/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S101_S101.py.snap b/src/rules/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S101_S101.py.snap similarity index 100% rename from src/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S101_S101.py.snap rename to src/rules/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S101_S101.py.snap diff --git a/src/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S102_S102.py.snap b/src/rules/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S102_S102.py.snap similarity index 100% rename from src/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S102_S102.py.snap rename to src/rules/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S102_S102.py.snap diff --git a/src/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S103_S103.py.snap b/src/rules/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S103_S103.py.snap similarity index 100% rename from src/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S103_S103.py.snap rename to src/rules/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S103_S103.py.snap diff --git a/src/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S104_S104.py.snap b/src/rules/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S104_S104.py.snap similarity index 100% rename from src/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S104_S104.py.snap rename to src/rules/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S104_S104.py.snap diff --git a/src/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S105_S105.py.snap b/src/rules/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S105_S105.py.snap similarity index 100% rename from src/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S105_S105.py.snap rename to src/rules/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S105_S105.py.snap diff --git a/src/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S106_S106.py.snap b/src/rules/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S106_S106.py.snap similarity index 100% rename from src/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S106_S106.py.snap rename to src/rules/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S106_S106.py.snap diff --git a/src/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S107_S107.py.snap b/src/rules/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S107_S107.py.snap similarity index 100% rename from src/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S107_S107.py.snap rename to src/rules/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S107_S107.py.snap diff --git a/src/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S108_S108.py.snap b/src/rules/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S108_S108.py.snap similarity index 100% rename from src/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S108_S108.py.snap rename to src/rules/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S108_S108.py.snap diff --git a/src/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S108_extend.snap b/src/rules/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S108_extend.snap similarity index 100% rename from src/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S108_extend.snap rename to src/rules/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S108_extend.snap diff --git a/src/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S113_S113.py.snap b/src/rules/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S113_S113.py.snap similarity index 100% rename from src/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S113_S113.py.snap rename to src/rules/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S113_S113.py.snap diff --git a/src/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S324_S324.py.snap b/src/rules/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S324_S324.py.snap similarity index 100% rename from src/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S324_S324.py.snap rename to src/rules/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S324_S324.py.snap diff --git a/src/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S501_S501.py.snap b/src/rules/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S501_S501.py.snap similarity index 100% rename from src/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S501_S501.py.snap rename to src/rules/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S501_S501.py.snap diff --git a/src/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S506_S506.py.snap b/src/rules/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S506_S506.py.snap similarity index 100% rename from src/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S506_S506.py.snap rename to src/rules/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S506_S506.py.snap diff --git a/src/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S508_S508.py.snap b/src/rules/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S508_S508.py.snap similarity index 100% rename from src/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S508_S508.py.snap rename to src/rules/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S508_S508.py.snap diff --git a/src/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S509_S509.py.snap b/src/rules/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S509_S509.py.snap similarity index 100% rename from src/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S509_S509.py.snap rename to src/rules/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S509_S509.py.snap diff --git a/src/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S701_S701.py.snap b/src/rules/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S701_S701.py.snap similarity index 100% rename from src/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S701_S701.py.snap rename to src/rules/flake8_bandit/snapshots/ruff__flake8_bandit__tests__S701_S701.py.snap diff --git a/src/flake8_blind_except/mod.rs b/src/rules/flake8_blind_except/mod.rs similarity index 100% rename from src/flake8_blind_except/mod.rs rename to src/rules/flake8_blind_except/mod.rs diff --git a/src/flake8_blind_except/rules.rs b/src/rules/flake8_blind_except/rules.rs similarity index 100% rename from src/flake8_blind_except/rules.rs rename to src/rules/flake8_blind_except/rules.rs diff --git a/src/flake8_blind_except/snapshots/ruff__flake8_blind_except__tests__BLE001_BLE.py.snap b/src/rules/flake8_blind_except/snapshots/ruff__flake8_blind_except__tests__BLE001_BLE.py.snap similarity index 100% rename from src/flake8_blind_except/snapshots/ruff__flake8_blind_except__tests__BLE001_BLE.py.snap rename to src/rules/flake8_blind_except/snapshots/ruff__flake8_blind_except__tests__BLE001_BLE.py.snap diff --git a/src/flake8_boolean_trap/mod.rs b/src/rules/flake8_boolean_trap/mod.rs similarity index 100% rename from src/flake8_boolean_trap/mod.rs rename to src/rules/flake8_boolean_trap/mod.rs diff --git a/src/flake8_boolean_trap/rules.rs b/src/rules/flake8_boolean_trap/rules.rs similarity index 100% rename from src/flake8_boolean_trap/rules.rs rename to src/rules/flake8_boolean_trap/rules.rs diff --git a/src/flake8_boolean_trap/snapshots/ruff__flake8_boolean_trap__tests__FBT001_FBT.py.snap b/src/rules/flake8_boolean_trap/snapshots/ruff__flake8_boolean_trap__tests__FBT001_FBT.py.snap similarity index 100% rename from src/flake8_boolean_trap/snapshots/ruff__flake8_boolean_trap__tests__FBT001_FBT.py.snap rename to src/rules/flake8_boolean_trap/snapshots/ruff__flake8_boolean_trap__tests__FBT001_FBT.py.snap diff --git a/src/flake8_boolean_trap/snapshots/ruff__flake8_boolean_trap__tests__FBT002_FBT.py.snap b/src/rules/flake8_boolean_trap/snapshots/ruff__flake8_boolean_trap__tests__FBT002_FBT.py.snap similarity index 100% rename from src/flake8_boolean_trap/snapshots/ruff__flake8_boolean_trap__tests__FBT002_FBT.py.snap rename to src/rules/flake8_boolean_trap/snapshots/ruff__flake8_boolean_trap__tests__FBT002_FBT.py.snap diff --git a/src/flake8_boolean_trap/snapshots/ruff__flake8_boolean_trap__tests__FBT003_FBT.py.snap b/src/rules/flake8_boolean_trap/snapshots/ruff__flake8_boolean_trap__tests__FBT003_FBT.py.snap similarity index 100% rename from src/flake8_boolean_trap/snapshots/ruff__flake8_boolean_trap__tests__FBT003_FBT.py.snap rename to src/rules/flake8_boolean_trap/snapshots/ruff__flake8_boolean_trap__tests__FBT003_FBT.py.snap diff --git a/src/flake8_bugbear/mod.rs b/src/rules/flake8_bugbear/mod.rs similarity index 96% rename from src/flake8_bugbear/mod.rs rename to src/rules/flake8_bugbear/mod.rs index dbea0cc2f8..07382dd42a 100644 --- a/src/flake8_bugbear/mod.rs +++ b/src/rules/flake8_bugbear/mod.rs @@ -8,7 +8,6 @@ mod tests { use anyhow::Result; use test_case::test_case; - use crate::flake8_bugbear; use crate::linter::test_path; use crate::registry::RuleCode; use crate::settings::Settings; @@ -59,7 +58,7 @@ mod tests { let diagnostics = test_path( Path::new("./resources/test/fixtures/flake8_bugbear/B008_extended.py"), &Settings { - flake8_bugbear: flake8_bugbear::settings::Settings { + flake8_bugbear: super::settings::Settings { extend_immutable_calls: vec![ "fastapi.Depends".to_string(), "fastapi.Query".to_string(), diff --git a/src/flake8_bugbear/rules/abstract_base_class.rs b/src/rules/flake8_bugbear/rules/abstract_base_class.rs similarity index 100% rename from src/flake8_bugbear/rules/abstract_base_class.rs rename to src/rules/flake8_bugbear/rules/abstract_base_class.rs diff --git a/src/flake8_bugbear/rules/assert_false.rs b/src/rules/flake8_bugbear/rules/assert_false.rs similarity index 100% rename from src/flake8_bugbear/rules/assert_false.rs rename to src/rules/flake8_bugbear/rules/assert_false.rs diff --git a/src/flake8_bugbear/rules/assert_raises_exception.rs b/src/rules/flake8_bugbear/rules/assert_raises_exception.rs similarity index 100% rename from src/flake8_bugbear/rules/assert_raises_exception.rs rename to src/rules/flake8_bugbear/rules/assert_raises_exception.rs diff --git a/src/flake8_bugbear/rules/assignment_to_os_environ.rs b/src/rules/flake8_bugbear/rules/assignment_to_os_environ.rs similarity index 100% rename from src/flake8_bugbear/rules/assignment_to_os_environ.rs rename to src/rules/flake8_bugbear/rules/assignment_to_os_environ.rs diff --git a/src/flake8_bugbear/rules/cached_instance_method.rs b/src/rules/flake8_bugbear/rules/cached_instance_method.rs similarity index 100% rename from src/flake8_bugbear/rules/cached_instance_method.rs rename to src/rules/flake8_bugbear/rules/cached_instance_method.rs diff --git a/src/flake8_bugbear/rules/cannot_raise_literal.rs b/src/rules/flake8_bugbear/rules/cannot_raise_literal.rs similarity index 100% rename from src/flake8_bugbear/rules/cannot_raise_literal.rs rename to src/rules/flake8_bugbear/rules/cannot_raise_literal.rs diff --git a/src/flake8_bugbear/rules/duplicate_exceptions.rs b/src/rules/flake8_bugbear/rules/duplicate_exceptions.rs similarity index 100% rename from src/flake8_bugbear/rules/duplicate_exceptions.rs rename to src/rules/flake8_bugbear/rules/duplicate_exceptions.rs diff --git a/src/flake8_bugbear/rules/f_string_docstring.rs b/src/rules/flake8_bugbear/rules/f_string_docstring.rs similarity index 100% rename from src/flake8_bugbear/rules/f_string_docstring.rs rename to src/rules/flake8_bugbear/rules/f_string_docstring.rs diff --git a/src/flake8_bugbear/rules/function_call_argument_default.rs b/src/rules/flake8_bugbear/rules/function_call_argument_default.rs similarity index 97% rename from src/flake8_bugbear/rules/function_call_argument_default.rs rename to src/rules/flake8_bugbear/rules/function_call_argument_default.rs index 68781cf6d4..2c3fa53ef9 100644 --- a/src/flake8_bugbear/rules/function_call_argument_default.rs +++ b/src/rules/flake8_bugbear/rules/function_call_argument_default.rs @@ -1,11 +1,11 @@ use rustpython_ast::{Arguments, Constant, Expr, ExprKind}; +use super::mutable_argument_default::is_mutable_func; use crate::ast::helpers::{compose_call_path, to_call_path}; use crate::ast::types::Range; use crate::ast::visitor; use crate::ast::visitor::Visitor; use crate::checkers::ast::Checker; -use crate::flake8_bugbear::rules::mutable_argument_default::is_mutable_func; use crate::registry::{Diagnostic, DiagnosticKind}; use crate::violations; diff --git a/src/flake8_bugbear/rules/function_uses_loop_variable.rs b/src/rules/flake8_bugbear/rules/function_uses_loop_variable.rs similarity index 100% rename from src/flake8_bugbear/rules/function_uses_loop_variable.rs rename to src/rules/flake8_bugbear/rules/function_uses_loop_variable.rs diff --git a/src/flake8_bugbear/rules/getattr_with_constant.rs b/src/rules/flake8_bugbear/rules/getattr_with_constant.rs similarity index 100% rename from src/flake8_bugbear/rules/getattr_with_constant.rs rename to src/rules/flake8_bugbear/rules/getattr_with_constant.rs diff --git a/src/flake8_bugbear/rules/jump_statement_in_finally.rs b/src/rules/flake8_bugbear/rules/jump_statement_in_finally.rs similarity index 100% rename from src/flake8_bugbear/rules/jump_statement_in_finally.rs rename to src/rules/flake8_bugbear/rules/jump_statement_in_finally.rs diff --git a/src/flake8_bugbear/rules/loop_variable_overrides_iterator.rs b/src/rules/flake8_bugbear/rules/loop_variable_overrides_iterator.rs similarity index 100% rename from src/flake8_bugbear/rules/loop_variable_overrides_iterator.rs rename to src/rules/flake8_bugbear/rules/loop_variable_overrides_iterator.rs diff --git a/src/flake8_bugbear/rules/mod.rs b/src/rules/flake8_bugbear/rules/mod.rs similarity index 100% rename from src/flake8_bugbear/rules/mod.rs rename to src/rules/flake8_bugbear/rules/mod.rs diff --git a/src/flake8_bugbear/rules/mutable_argument_default.rs b/src/rules/flake8_bugbear/rules/mutable_argument_default.rs similarity index 100% rename from src/flake8_bugbear/rules/mutable_argument_default.rs rename to src/rules/flake8_bugbear/rules/mutable_argument_default.rs diff --git a/src/flake8_bugbear/rules/raise_without_from_inside_except.rs b/src/rules/flake8_bugbear/rules/raise_without_from_inside_except.rs similarity index 100% rename from src/flake8_bugbear/rules/raise_without_from_inside_except.rs rename to src/rules/flake8_bugbear/rules/raise_without_from_inside_except.rs diff --git a/src/flake8_bugbear/rules/redundant_tuple_in_exception_handler.rs b/src/rules/flake8_bugbear/rules/redundant_tuple_in_exception_handler.rs similarity index 100% rename from src/flake8_bugbear/rules/redundant_tuple_in_exception_handler.rs rename to src/rules/flake8_bugbear/rules/redundant_tuple_in_exception_handler.rs diff --git a/src/flake8_bugbear/rules/setattr_with_constant.rs b/src/rules/flake8_bugbear/rules/setattr_with_constant.rs similarity index 100% rename from src/flake8_bugbear/rules/setattr_with_constant.rs rename to src/rules/flake8_bugbear/rules/setattr_with_constant.rs diff --git a/src/flake8_bugbear/rules/star_arg_unpacking_after_keyword_arg.rs b/src/rules/flake8_bugbear/rules/star_arg_unpacking_after_keyword_arg.rs similarity index 100% rename from src/flake8_bugbear/rules/star_arg_unpacking_after_keyword_arg.rs rename to src/rules/flake8_bugbear/rules/star_arg_unpacking_after_keyword_arg.rs diff --git a/src/flake8_bugbear/rules/strip_with_multi_characters.rs b/src/rules/flake8_bugbear/rules/strip_with_multi_characters.rs similarity index 100% rename from src/flake8_bugbear/rules/strip_with_multi_characters.rs rename to src/rules/flake8_bugbear/rules/strip_with_multi_characters.rs diff --git a/src/flake8_bugbear/rules/unary_prefix_increment.rs b/src/rules/flake8_bugbear/rules/unary_prefix_increment.rs similarity index 100% rename from src/flake8_bugbear/rules/unary_prefix_increment.rs rename to src/rules/flake8_bugbear/rules/unary_prefix_increment.rs diff --git a/src/flake8_bugbear/rules/unreliable_callable_check.rs b/src/rules/flake8_bugbear/rules/unreliable_callable_check.rs similarity index 100% rename from src/flake8_bugbear/rules/unreliable_callable_check.rs rename to src/rules/flake8_bugbear/rules/unreliable_callable_check.rs diff --git a/src/flake8_bugbear/rules/unused_loop_control_variable.rs b/src/rules/flake8_bugbear/rules/unused_loop_control_variable.rs similarity index 100% rename from src/flake8_bugbear/rules/unused_loop_control_variable.rs rename to src/rules/flake8_bugbear/rules/unused_loop_control_variable.rs diff --git a/src/flake8_bugbear/rules/useless_comparison.rs b/src/rules/flake8_bugbear/rules/useless_comparison.rs similarity index 100% rename from src/flake8_bugbear/rules/useless_comparison.rs rename to src/rules/flake8_bugbear/rules/useless_comparison.rs diff --git a/src/flake8_bugbear/rules/useless_contextlib_suppress.rs b/src/rules/flake8_bugbear/rules/useless_contextlib_suppress.rs similarity index 100% rename from src/flake8_bugbear/rules/useless_contextlib_suppress.rs rename to src/rules/flake8_bugbear/rules/useless_contextlib_suppress.rs diff --git a/src/flake8_bugbear/rules/useless_expression.rs b/src/rules/flake8_bugbear/rules/useless_expression.rs similarity index 100% rename from src/flake8_bugbear/rules/useless_expression.rs rename to src/rules/flake8_bugbear/rules/useless_expression.rs diff --git a/src/flake8_bugbear/rules/zip_without_explicit_strict.rs b/src/rules/flake8_bugbear/rules/zip_without_explicit_strict.rs similarity index 100% rename from src/flake8_bugbear/rules/zip_without_explicit_strict.rs rename to src/rules/flake8_bugbear/rules/zip_without_explicit_strict.rs diff --git a/src/flake8_bugbear/settings.rs b/src/rules/flake8_bugbear/settings.rs similarity index 100% rename from src/flake8_bugbear/settings.rs rename to src/rules/flake8_bugbear/settings.rs diff --git a/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B002_B002.py.snap b/src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B002_B002.py.snap similarity index 100% rename from src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B002_B002.py.snap rename to src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B002_B002.py.snap diff --git a/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B003_B003.py.snap b/src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B003_B003.py.snap similarity index 100% rename from src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B003_B003.py.snap rename to src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B003_B003.py.snap diff --git a/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B004_B004.py.snap b/src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B004_B004.py.snap similarity index 100% rename from src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B004_B004.py.snap rename to src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B004_B004.py.snap diff --git a/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B005_B005.py.snap b/src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B005_B005.py.snap similarity index 100% rename from src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B005_B005.py.snap rename to src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B005_B005.py.snap diff --git a/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B006_B006_B008.py.snap b/src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B006_B006_B008.py.snap similarity index 100% rename from src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B006_B006_B008.py.snap rename to src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B006_B006_B008.py.snap diff --git a/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B007_B007.py.snap b/src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B007_B007.py.snap similarity index 100% rename from src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B007_B007.py.snap rename to src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B007_B007.py.snap diff --git a/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B008_B006_B008.py.snap b/src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B008_B006_B008.py.snap similarity index 100% rename from src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B008_B006_B008.py.snap rename to src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B008_B006_B008.py.snap diff --git a/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B009_B009_B010.py.snap b/src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B009_B009_B010.py.snap similarity index 100% rename from src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B009_B009_B010.py.snap rename to src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B009_B009_B010.py.snap diff --git a/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B010_B009_B010.py.snap b/src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B010_B009_B010.py.snap similarity index 100% rename from src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B010_B009_B010.py.snap rename to src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B010_B009_B010.py.snap diff --git a/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B011_B011.py.snap b/src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B011_B011.py.snap similarity index 100% rename from src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B011_B011.py.snap rename to src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B011_B011.py.snap diff --git a/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B012_B012.py.snap b/src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B012_B012.py.snap similarity index 100% rename from src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B012_B012.py.snap rename to src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B012_B012.py.snap diff --git a/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B013_B013.py.snap b/src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B013_B013.py.snap similarity index 100% rename from src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B013_B013.py.snap rename to src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B013_B013.py.snap diff --git a/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B014_B014.py.snap b/src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B014_B014.py.snap similarity index 100% rename from src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B014_B014.py.snap rename to src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B014_B014.py.snap diff --git a/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B015_B015.py.snap b/src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B015_B015.py.snap similarity index 100% rename from src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B015_B015.py.snap rename to src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B015_B015.py.snap diff --git a/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B016_B016.py.snap b/src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B016_B016.py.snap similarity index 100% rename from src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B016_B016.py.snap rename to src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B016_B016.py.snap diff --git a/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B017_B017.py.snap b/src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B017_B017.py.snap similarity index 100% rename from src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B017_B017.py.snap rename to src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B017_B017.py.snap diff --git a/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B018_B018.py.snap b/src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B018_B018.py.snap similarity index 100% rename from src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B018_B018.py.snap rename to src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B018_B018.py.snap diff --git a/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B019_B019.py.snap b/src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B019_B019.py.snap similarity index 100% rename from src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B019_B019.py.snap rename to src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B019_B019.py.snap diff --git a/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B020_B020.py.snap b/src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B020_B020.py.snap similarity index 100% rename from src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B020_B020.py.snap rename to src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B020_B020.py.snap diff --git a/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B021_B021.py.snap b/src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B021_B021.py.snap similarity index 100% rename from src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B021_B021.py.snap rename to src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B021_B021.py.snap diff --git a/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B022_B022.py.snap b/src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B022_B022.py.snap similarity index 100% rename from src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B022_B022.py.snap rename to src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B022_B022.py.snap diff --git a/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B023_B023.py.snap b/src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B023_B023.py.snap similarity index 100% rename from src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B023_B023.py.snap rename to src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B023_B023.py.snap diff --git a/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B024_B024.py.snap b/src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B024_B024.py.snap similarity index 100% rename from src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B024_B024.py.snap rename to src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B024_B024.py.snap diff --git a/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B025_B025.py.snap b/src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B025_B025.py.snap similarity index 100% rename from src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B025_B025.py.snap rename to src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B025_B025.py.snap diff --git a/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B026_B026.py.snap b/src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B026_B026.py.snap similarity index 100% rename from src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B026_B026.py.snap rename to src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B026_B026.py.snap diff --git a/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B027_B027.py.snap b/src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B027_B027.py.snap similarity index 100% rename from src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B027_B027.py.snap rename to src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B027_B027.py.snap diff --git a/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B904_B904.py.snap b/src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B904_B904.py.snap similarity index 100% rename from src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B904_B904.py.snap rename to src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B904_B904.py.snap diff --git a/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B905_B905.py.snap b/src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B905_B905.py.snap similarity index 100% rename from src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B905_B905.py.snap rename to src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__B905_B905.py.snap diff --git a/src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__extend_immutable_calls.snap b/src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__extend_immutable_calls.snap similarity index 100% rename from src/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__extend_immutable_calls.snap rename to src/rules/flake8_bugbear/snapshots/ruff__flake8_bugbear__tests__extend_immutable_calls.snap diff --git a/src/flake8_builtins/mod.rs b/src/rules/flake8_builtins/mod.rs similarity index 100% rename from src/flake8_builtins/mod.rs rename to src/rules/flake8_builtins/mod.rs diff --git a/src/flake8_builtins/rules.rs b/src/rules/flake8_builtins/rules.rs similarity index 95% rename from src/flake8_builtins/rules.rs rename to src/rules/flake8_builtins/rules.rs index 2f268659c4..4c8b744801 100644 --- a/src/flake8_builtins/rules.rs +++ b/src/rules/flake8_builtins/rules.rs @@ -1,7 +1,7 @@ use rustpython_ast::Located; +use super::types::ShadowingType; use crate::ast::types::Range; -use crate::flake8_builtins::types::ShadowingType; use crate::python::builtins::BUILTINS; use crate::registry::{Diagnostic, DiagnosticKind}; use crate::violations; diff --git a/src/flake8_builtins/snapshots/ruff__flake8_builtins__tests__A001_A001.py.snap b/src/rules/flake8_builtins/snapshots/ruff__flake8_builtins__tests__A001_A001.py.snap similarity index 100% rename from src/flake8_builtins/snapshots/ruff__flake8_builtins__tests__A001_A001.py.snap rename to src/rules/flake8_builtins/snapshots/ruff__flake8_builtins__tests__A001_A001.py.snap diff --git a/src/flake8_builtins/snapshots/ruff__flake8_builtins__tests__A002_A002.py.snap b/src/rules/flake8_builtins/snapshots/ruff__flake8_builtins__tests__A002_A002.py.snap similarity index 100% rename from src/flake8_builtins/snapshots/ruff__flake8_builtins__tests__A002_A002.py.snap rename to src/rules/flake8_builtins/snapshots/ruff__flake8_builtins__tests__A002_A002.py.snap diff --git a/src/flake8_builtins/snapshots/ruff__flake8_builtins__tests__A003_A003.py.snap b/src/rules/flake8_builtins/snapshots/ruff__flake8_builtins__tests__A003_A003.py.snap similarity index 100% rename from src/flake8_builtins/snapshots/ruff__flake8_builtins__tests__A003_A003.py.snap rename to src/rules/flake8_builtins/snapshots/ruff__flake8_builtins__tests__A003_A003.py.snap diff --git a/src/flake8_builtins/types.rs b/src/rules/flake8_builtins/types.rs similarity index 100% rename from src/flake8_builtins/types.rs rename to src/rules/flake8_builtins/types.rs diff --git a/src/flake8_comprehensions/fixes.rs b/src/rules/flake8_comprehensions/fixes.rs similarity index 100% rename from src/flake8_comprehensions/fixes.rs rename to src/rules/flake8_comprehensions/fixes.rs diff --git a/src/flake8_comprehensions/mod.rs b/src/rules/flake8_comprehensions/mod.rs similarity index 100% rename from src/flake8_comprehensions/mod.rs rename to src/rules/flake8_comprehensions/mod.rs diff --git a/src/flake8_comprehensions/rules.rs b/src/rules/flake8_comprehensions/rules.rs similarity index 99% rename from src/flake8_comprehensions/rules.rs rename to src/rules/flake8_comprehensions/rules.rs index 7073fd5bd5..1a89924d46 100644 --- a/src/flake8_comprehensions/rules.rs +++ b/src/rules/flake8_comprehensions/rules.rs @@ -2,9 +2,9 @@ use log::error; use num_bigint::BigInt; use rustpython_ast::{Comprehension, Constant, Expr, ExprKind, Keyword, Unaryop}; +use super::fixes; use crate::ast::types::Range; use crate::checkers::ast::Checker; -use crate::flake8_comprehensions::fixes; use crate::registry::{Diagnostic, RuleCode}; use crate::violations; diff --git a/src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C400_C400.py.snap b/src/rules/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C400_C400.py.snap similarity index 100% rename from src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C400_C400.py.snap rename to src/rules/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C400_C400.py.snap diff --git a/src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C401_C401.py.snap b/src/rules/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C401_C401.py.snap similarity index 100% rename from src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C401_C401.py.snap rename to src/rules/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C401_C401.py.snap diff --git a/src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C402_C402.py.snap b/src/rules/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C402_C402.py.snap similarity index 100% rename from src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C402_C402.py.snap rename to src/rules/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C402_C402.py.snap diff --git a/src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C403_C403.py.snap b/src/rules/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C403_C403.py.snap similarity index 100% rename from src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C403_C403.py.snap rename to src/rules/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C403_C403.py.snap diff --git a/src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C404_C404.py.snap b/src/rules/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C404_C404.py.snap similarity index 100% rename from src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C404_C404.py.snap rename to src/rules/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C404_C404.py.snap diff --git a/src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C405_C405.py.snap b/src/rules/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C405_C405.py.snap similarity index 100% rename from src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C405_C405.py.snap rename to src/rules/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C405_C405.py.snap diff --git a/src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C406_C406.py.snap b/src/rules/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C406_C406.py.snap similarity index 100% rename from src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C406_C406.py.snap rename to src/rules/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C406_C406.py.snap diff --git a/src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C408_C408.py.snap b/src/rules/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C408_C408.py.snap similarity index 100% rename from src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C408_C408.py.snap rename to src/rules/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C408_C408.py.snap diff --git a/src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C409_C409.py.snap b/src/rules/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C409_C409.py.snap similarity index 100% rename from src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C409_C409.py.snap rename to src/rules/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C409_C409.py.snap diff --git a/src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C410_C410.py.snap b/src/rules/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C410_C410.py.snap similarity index 100% rename from src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C410_C410.py.snap rename to src/rules/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C410_C410.py.snap diff --git a/src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C411_C411.py.snap b/src/rules/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C411_C411.py.snap similarity index 100% rename from src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C411_C411.py.snap rename to src/rules/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C411_C411.py.snap diff --git a/src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C413_C413.py.snap b/src/rules/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C413_C413.py.snap similarity index 100% rename from src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C413_C413.py.snap rename to src/rules/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C413_C413.py.snap diff --git a/src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C414_C414.py.snap b/src/rules/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C414_C414.py.snap similarity index 100% rename from src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C414_C414.py.snap rename to src/rules/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C414_C414.py.snap diff --git a/src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C415_C415.py.snap b/src/rules/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C415_C415.py.snap similarity index 100% rename from src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C415_C415.py.snap rename to src/rules/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C415_C415.py.snap diff --git a/src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C416_C416.py.snap b/src/rules/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C416_C416.py.snap similarity index 100% rename from src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C416_C416.py.snap rename to src/rules/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C416_C416.py.snap diff --git a/src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C417_C417.py.snap b/src/rules/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C417_C417.py.snap similarity index 100% rename from src/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C417_C417.py.snap rename to src/rules/flake8_comprehensions/snapshots/ruff__flake8_comprehensions__tests__C417_C417.py.snap diff --git a/src/flake8_datetimez/mod.rs b/src/rules/flake8_datetimez/mod.rs similarity index 100% rename from src/flake8_datetimez/mod.rs rename to src/rules/flake8_datetimez/mod.rs diff --git a/src/flake8_datetimez/rules.rs b/src/rules/flake8_datetimez/rules.rs similarity index 100% rename from src/flake8_datetimez/rules.rs rename to src/rules/flake8_datetimez/rules.rs diff --git a/src/flake8_datetimez/snapshots/ruff__flake8_datetimez__tests__DTZ001_DTZ001.py.snap b/src/rules/flake8_datetimez/snapshots/ruff__flake8_datetimez__tests__DTZ001_DTZ001.py.snap similarity index 100% rename from src/flake8_datetimez/snapshots/ruff__flake8_datetimez__tests__DTZ001_DTZ001.py.snap rename to src/rules/flake8_datetimez/snapshots/ruff__flake8_datetimez__tests__DTZ001_DTZ001.py.snap diff --git a/src/flake8_datetimez/snapshots/ruff__flake8_datetimez__tests__DTZ002_DTZ002.py.snap b/src/rules/flake8_datetimez/snapshots/ruff__flake8_datetimez__tests__DTZ002_DTZ002.py.snap similarity index 100% rename from src/flake8_datetimez/snapshots/ruff__flake8_datetimez__tests__DTZ002_DTZ002.py.snap rename to src/rules/flake8_datetimez/snapshots/ruff__flake8_datetimez__tests__DTZ002_DTZ002.py.snap diff --git a/src/flake8_datetimez/snapshots/ruff__flake8_datetimez__tests__DTZ003_DTZ003.py.snap b/src/rules/flake8_datetimez/snapshots/ruff__flake8_datetimez__tests__DTZ003_DTZ003.py.snap similarity index 100% rename from src/flake8_datetimez/snapshots/ruff__flake8_datetimez__tests__DTZ003_DTZ003.py.snap rename to src/rules/flake8_datetimez/snapshots/ruff__flake8_datetimez__tests__DTZ003_DTZ003.py.snap diff --git a/src/flake8_datetimez/snapshots/ruff__flake8_datetimez__tests__DTZ004_DTZ004.py.snap b/src/rules/flake8_datetimez/snapshots/ruff__flake8_datetimez__tests__DTZ004_DTZ004.py.snap similarity index 100% rename from src/flake8_datetimez/snapshots/ruff__flake8_datetimez__tests__DTZ004_DTZ004.py.snap rename to src/rules/flake8_datetimez/snapshots/ruff__flake8_datetimez__tests__DTZ004_DTZ004.py.snap diff --git a/src/flake8_datetimez/snapshots/ruff__flake8_datetimez__tests__DTZ005_DTZ005.py.snap b/src/rules/flake8_datetimez/snapshots/ruff__flake8_datetimez__tests__DTZ005_DTZ005.py.snap similarity index 100% rename from src/flake8_datetimez/snapshots/ruff__flake8_datetimez__tests__DTZ005_DTZ005.py.snap rename to src/rules/flake8_datetimez/snapshots/ruff__flake8_datetimez__tests__DTZ005_DTZ005.py.snap diff --git a/src/flake8_datetimez/snapshots/ruff__flake8_datetimez__tests__DTZ006_DTZ006.py.snap b/src/rules/flake8_datetimez/snapshots/ruff__flake8_datetimez__tests__DTZ006_DTZ006.py.snap similarity index 100% rename from src/flake8_datetimez/snapshots/ruff__flake8_datetimez__tests__DTZ006_DTZ006.py.snap rename to src/rules/flake8_datetimez/snapshots/ruff__flake8_datetimez__tests__DTZ006_DTZ006.py.snap diff --git a/src/flake8_datetimez/snapshots/ruff__flake8_datetimez__tests__DTZ007_DTZ007.py.snap b/src/rules/flake8_datetimez/snapshots/ruff__flake8_datetimez__tests__DTZ007_DTZ007.py.snap similarity index 100% rename from src/flake8_datetimez/snapshots/ruff__flake8_datetimez__tests__DTZ007_DTZ007.py.snap rename to src/rules/flake8_datetimez/snapshots/ruff__flake8_datetimez__tests__DTZ007_DTZ007.py.snap diff --git a/src/flake8_datetimez/snapshots/ruff__flake8_datetimez__tests__DTZ011_DTZ011.py.snap b/src/rules/flake8_datetimez/snapshots/ruff__flake8_datetimez__tests__DTZ011_DTZ011.py.snap similarity index 100% rename from src/flake8_datetimez/snapshots/ruff__flake8_datetimez__tests__DTZ011_DTZ011.py.snap rename to src/rules/flake8_datetimez/snapshots/ruff__flake8_datetimez__tests__DTZ011_DTZ011.py.snap diff --git a/src/flake8_datetimez/snapshots/ruff__flake8_datetimez__tests__DTZ012_DTZ012.py.snap b/src/rules/flake8_datetimez/snapshots/ruff__flake8_datetimez__tests__DTZ012_DTZ012.py.snap similarity index 100% rename from src/flake8_datetimez/snapshots/ruff__flake8_datetimez__tests__DTZ012_DTZ012.py.snap rename to src/rules/flake8_datetimez/snapshots/ruff__flake8_datetimez__tests__DTZ012_DTZ012.py.snap diff --git a/src/flake8_debugger/mod.rs b/src/rules/flake8_debugger/mod.rs similarity index 100% rename from src/flake8_debugger/mod.rs rename to src/rules/flake8_debugger/mod.rs diff --git a/src/flake8_debugger/rules.rs b/src/rules/flake8_debugger/rules.rs similarity index 97% rename from src/flake8_debugger/rules.rs rename to src/rules/flake8_debugger/rules.rs index 29b2c5a31a..dd8f709e96 100644 --- a/src/flake8_debugger/rules.rs +++ b/src/rules/flake8_debugger/rules.rs @@ -1,9 +1,9 @@ use rustpython_ast::{Expr, Stmt}; +use super::types::DebuggerUsingType; use crate::ast::helpers::format_call_path; use crate::ast::types::Range; use crate::checkers::ast::Checker; -use crate::flake8_debugger::types::DebuggerUsingType; use crate::registry::Diagnostic; use crate::violations; diff --git a/src/flake8_debugger/snapshots/ruff__flake8_debugger__tests__T100_T100.py.snap b/src/rules/flake8_debugger/snapshots/ruff__flake8_debugger__tests__T100_T100.py.snap similarity index 100% rename from src/flake8_debugger/snapshots/ruff__flake8_debugger__tests__T100_T100.py.snap rename to src/rules/flake8_debugger/snapshots/ruff__flake8_debugger__tests__T100_T100.py.snap diff --git a/src/flake8_debugger/types.rs b/src/rules/flake8_debugger/types.rs similarity index 100% rename from src/flake8_debugger/types.rs rename to src/rules/flake8_debugger/types.rs diff --git a/src/flake8_errmsg/mod.rs b/src/rules/flake8_errmsg/mod.rs similarity index 90% rename from src/flake8_errmsg/mod.rs rename to src/rules/flake8_errmsg/mod.rs index ef829ae1b5..0733257d2c 100644 --- a/src/flake8_errmsg/mod.rs +++ b/src/rules/flake8_errmsg/mod.rs @@ -9,7 +9,7 @@ mod tests { use crate::linter::test_path; use crate::registry::RuleCode; - use crate::{flake8_errmsg, settings}; + use crate::settings; #[test] fn defaults() -> Result<()> { @@ -26,7 +26,7 @@ mod tests { let diagnostics = test_path( Path::new("./resources/test/fixtures/flake8_errmsg/EM.py"), &settings::Settings { - flake8_errmsg: flake8_errmsg::settings::Settings { + flake8_errmsg: super::settings::Settings { max_string_length: 20, }, ..settings::Settings::for_rules(vec![ diff --git a/src/flake8_errmsg/rules.rs b/src/rules/flake8_errmsg/rules.rs similarity index 100% rename from src/flake8_errmsg/rules.rs rename to src/rules/flake8_errmsg/rules.rs diff --git a/src/flake8_errmsg/settings.rs b/src/rules/flake8_errmsg/settings.rs similarity index 100% rename from src/flake8_errmsg/settings.rs rename to src/rules/flake8_errmsg/settings.rs diff --git a/src/flake8_errmsg/snapshots/ruff__flake8_errmsg__tests__custom.snap b/src/rules/flake8_errmsg/snapshots/ruff__flake8_errmsg__tests__custom.snap similarity index 100% rename from src/flake8_errmsg/snapshots/ruff__flake8_errmsg__tests__custom.snap rename to src/rules/flake8_errmsg/snapshots/ruff__flake8_errmsg__tests__custom.snap diff --git a/src/flake8_errmsg/snapshots/ruff__flake8_errmsg__tests__defaults.snap b/src/rules/flake8_errmsg/snapshots/ruff__flake8_errmsg__tests__defaults.snap similarity index 100% rename from src/flake8_errmsg/snapshots/ruff__flake8_errmsg__tests__defaults.snap rename to src/rules/flake8_errmsg/snapshots/ruff__flake8_errmsg__tests__defaults.snap diff --git a/src/flake8_implicit_str_concat/mod.rs b/src/rules/flake8_implicit_str_concat/mod.rs similarity index 100% rename from src/flake8_implicit_str_concat/mod.rs rename to src/rules/flake8_implicit_str_concat/mod.rs diff --git a/src/flake8_implicit_str_concat/rules.rs b/src/rules/flake8_implicit_str_concat/rules.rs similarity index 100% rename from src/flake8_implicit_str_concat/rules.rs rename to src/rules/flake8_implicit_str_concat/rules.rs diff --git a/src/flake8_implicit_str_concat/snapshots/ruff__flake8_implicit_str_concat__tests__ISC001_ISC.py.snap b/src/rules/flake8_implicit_str_concat/snapshots/ruff__flake8_implicit_str_concat__tests__ISC001_ISC.py.snap similarity index 100% rename from src/flake8_implicit_str_concat/snapshots/ruff__flake8_implicit_str_concat__tests__ISC001_ISC.py.snap rename to src/rules/flake8_implicit_str_concat/snapshots/ruff__flake8_implicit_str_concat__tests__ISC001_ISC.py.snap diff --git a/src/flake8_implicit_str_concat/snapshots/ruff__flake8_implicit_str_concat__tests__ISC002_ISC.py.snap b/src/rules/flake8_implicit_str_concat/snapshots/ruff__flake8_implicit_str_concat__tests__ISC002_ISC.py.snap similarity index 100% rename from src/flake8_implicit_str_concat/snapshots/ruff__flake8_implicit_str_concat__tests__ISC002_ISC.py.snap rename to src/rules/flake8_implicit_str_concat/snapshots/ruff__flake8_implicit_str_concat__tests__ISC002_ISC.py.snap diff --git a/src/flake8_implicit_str_concat/snapshots/ruff__flake8_implicit_str_concat__tests__ISC003_ISC.py.snap b/src/rules/flake8_implicit_str_concat/snapshots/ruff__flake8_implicit_str_concat__tests__ISC003_ISC.py.snap similarity index 100% rename from src/flake8_implicit_str_concat/snapshots/ruff__flake8_implicit_str_concat__tests__ISC003_ISC.py.snap rename to src/rules/flake8_implicit_str_concat/snapshots/ruff__flake8_implicit_str_concat__tests__ISC003_ISC.py.snap diff --git a/src/flake8_import_conventions/mod.rs b/src/rules/flake8_import_conventions/mod.rs similarity index 89% rename from src/flake8_import_conventions/mod.rs rename to src/rules/flake8_import_conventions/mod.rs index 31a4a45fcb..b2975762a3 100644 --- a/src/flake8_import_conventions/mod.rs +++ b/src/rules/flake8_import_conventions/mod.rs @@ -8,7 +8,6 @@ mod tests { use anyhow::Result; use rustc_hash::FxHashMap; - use crate::flake8_import_conventions; use crate::linter::test_path; use crate::registry::RuleCode; use crate::settings::Settings; @@ -28,7 +27,7 @@ mod tests { let diagnostics = test_path( Path::new("./resources/test/fixtures/flake8_import_conventions/custom.py"), &Settings { - flake8_import_conventions: flake8_import_conventions::settings::Options { + flake8_import_conventions: super::settings::Options { aliases: None, extend_aliases: Some(FxHashMap::from_iter([ ("dask.array".to_string(), "da".to_string()), @@ -48,7 +47,7 @@ mod tests { let diagnostics = test_path( Path::new("./resources/test/fixtures/flake8_import_conventions/remove_default.py"), &Settings { - flake8_import_conventions: flake8_import_conventions::settings::Options { + flake8_import_conventions: super::settings::Options { aliases: Some(FxHashMap::from_iter([ ("altair".to_string(), "alt".to_string()), ("matplotlib.pyplot".to_string(), "plt".to_string()), @@ -70,7 +69,7 @@ mod tests { let diagnostics = test_path( Path::new("./resources/test/fixtures/flake8_import_conventions/override_default.py"), &Settings { - flake8_import_conventions: flake8_import_conventions::settings::Options { + flake8_import_conventions: super::settings::Options { aliases: None, extend_aliases: Some(FxHashMap::from_iter([( "numpy".to_string(), diff --git a/src/flake8_import_conventions/rules.rs b/src/rules/flake8_import_conventions/rules.rs similarity index 100% rename from src/flake8_import_conventions/rules.rs rename to src/rules/flake8_import_conventions/rules.rs diff --git a/src/flake8_import_conventions/settings.rs b/src/rules/flake8_import_conventions/settings.rs similarity index 100% rename from src/flake8_import_conventions/settings.rs rename to src/rules/flake8_import_conventions/settings.rs diff --git a/src/flake8_import_conventions/snapshots/ruff__flake8_import_conventions__tests__custom.snap b/src/rules/flake8_import_conventions/snapshots/ruff__flake8_import_conventions__tests__custom.snap similarity index 100% rename from src/flake8_import_conventions/snapshots/ruff__flake8_import_conventions__tests__custom.snap rename to src/rules/flake8_import_conventions/snapshots/ruff__flake8_import_conventions__tests__custom.snap diff --git a/src/flake8_import_conventions/snapshots/ruff__flake8_import_conventions__tests__defaults.snap b/src/rules/flake8_import_conventions/snapshots/ruff__flake8_import_conventions__tests__defaults.snap similarity index 100% rename from src/flake8_import_conventions/snapshots/ruff__flake8_import_conventions__tests__defaults.snap rename to src/rules/flake8_import_conventions/snapshots/ruff__flake8_import_conventions__tests__defaults.snap diff --git a/src/flake8_import_conventions/snapshots/ruff__flake8_import_conventions__tests__override_default.snap b/src/rules/flake8_import_conventions/snapshots/ruff__flake8_import_conventions__tests__override_default.snap similarity index 100% rename from src/flake8_import_conventions/snapshots/ruff__flake8_import_conventions__tests__override_default.snap rename to src/rules/flake8_import_conventions/snapshots/ruff__flake8_import_conventions__tests__override_default.snap diff --git a/src/flake8_import_conventions/snapshots/ruff__flake8_import_conventions__tests__remove_default.snap b/src/rules/flake8_import_conventions/snapshots/ruff__flake8_import_conventions__tests__remove_default.snap similarity index 100% rename from src/flake8_import_conventions/snapshots/ruff__flake8_import_conventions__tests__remove_default.snap rename to src/rules/flake8_import_conventions/snapshots/ruff__flake8_import_conventions__tests__remove_default.snap diff --git a/src/flake8_pie/mod.rs b/src/rules/flake8_pie/mod.rs similarity index 100% rename from src/flake8_pie/mod.rs rename to src/rules/flake8_pie/mod.rs diff --git a/src/flake8_pie/rules.rs b/src/rules/flake8_pie/rules.rs similarity index 100% rename from src/flake8_pie/rules.rs rename to src/rules/flake8_pie/rules.rs diff --git a/src/flake8_pie/snapshots/ruff__flake8_pie__tests__PIE790_PIE790.py.snap b/src/rules/flake8_pie/snapshots/ruff__flake8_pie__tests__PIE790_PIE790.py.snap similarity index 100% rename from src/flake8_pie/snapshots/ruff__flake8_pie__tests__PIE790_PIE790.py.snap rename to src/rules/flake8_pie/snapshots/ruff__flake8_pie__tests__PIE790_PIE790.py.snap diff --git a/src/flake8_pie/snapshots/ruff__flake8_pie__tests__PIE794_PIE794.py.snap b/src/rules/flake8_pie/snapshots/ruff__flake8_pie__tests__PIE794_PIE794.py.snap similarity index 100% rename from src/flake8_pie/snapshots/ruff__flake8_pie__tests__PIE794_PIE794.py.snap rename to src/rules/flake8_pie/snapshots/ruff__flake8_pie__tests__PIE794_PIE794.py.snap diff --git a/src/flake8_pie/snapshots/ruff__flake8_pie__tests__PIE807_PIE807.py.snap b/src/rules/flake8_pie/snapshots/ruff__flake8_pie__tests__PIE807_PIE807.py.snap similarity index 100% rename from src/flake8_pie/snapshots/ruff__flake8_pie__tests__PIE807_PIE807.py.snap rename to src/rules/flake8_pie/snapshots/ruff__flake8_pie__tests__PIE807_PIE807.py.snap diff --git a/src/flake8_print/mod.rs b/src/rules/flake8_print/mod.rs similarity index 100% rename from src/flake8_print/mod.rs rename to src/rules/flake8_print/mod.rs diff --git a/src/flake8_print/rules/mod.rs b/src/rules/flake8_print/rules/mod.rs similarity index 100% rename from src/flake8_print/rules/mod.rs rename to src/rules/flake8_print/rules/mod.rs diff --git a/src/flake8_print/rules/print_call.rs b/src/rules/flake8_print/rules/print_call.rs similarity index 100% rename from src/flake8_print/rules/print_call.rs rename to src/rules/flake8_print/rules/print_call.rs diff --git a/src/flake8_print/snapshots/ruff__flake8_print__tests__T201_T201.py.snap b/src/rules/flake8_print/snapshots/ruff__flake8_print__tests__T201_T201.py.snap similarity index 100% rename from src/flake8_print/snapshots/ruff__flake8_print__tests__T201_T201.py.snap rename to src/rules/flake8_print/snapshots/ruff__flake8_print__tests__T201_T201.py.snap diff --git a/src/flake8_print/snapshots/ruff__flake8_print__tests__T203_T203.py.snap b/src/rules/flake8_print/snapshots/ruff__flake8_print__tests__T203_T203.py.snap similarity index 100% rename from src/flake8_print/snapshots/ruff__flake8_print__tests__T203_T203.py.snap rename to src/rules/flake8_print/snapshots/ruff__flake8_print__tests__T203_T203.py.snap diff --git a/src/flake8_pytest_style/mod.rs b/src/rules/flake8_pytest_style/mod.rs similarity index 98% rename from src/flake8_pytest_style/mod.rs rename to src/rules/flake8_pytest_style/mod.rs index 987f56b680..2edbb2956e 100644 --- a/src/flake8_pytest_style/mod.rs +++ b/src/rules/flake8_pytest_style/mod.rs @@ -9,8 +9,8 @@ mod tests { use anyhow::Result; use test_case::test_case; - use crate::flake8_pytest_style::settings::Settings; - use crate::flake8_pytest_style::types; + use super::settings::Settings; + use super::types; use crate::linter::test_path; use crate::registry::RuleCode; use crate::settings; diff --git a/src/flake8_pytest_style/rules/assertion.rs b/src/rules/flake8_pytest_style/rules/assertion.rs similarity index 100% rename from src/flake8_pytest_style/rules/assertion.rs rename to src/rules/flake8_pytest_style/rules/assertion.rs diff --git a/src/flake8_pytest_style/rules/fail.rs b/src/rules/flake8_pytest_style/rules/fail.rs similarity index 100% rename from src/flake8_pytest_style/rules/fail.rs rename to src/rules/flake8_pytest_style/rules/fail.rs diff --git a/src/flake8_pytest_style/rules/fixture.rs b/src/rules/flake8_pytest_style/rules/fixture.rs similarity index 100% rename from src/flake8_pytest_style/rules/fixture.rs rename to src/rules/flake8_pytest_style/rules/fixture.rs diff --git a/src/flake8_pytest_style/rules/helpers.rs b/src/rules/flake8_pytest_style/rules/helpers.rs similarity index 100% rename from src/flake8_pytest_style/rules/helpers.rs rename to src/rules/flake8_pytest_style/rules/helpers.rs diff --git a/src/flake8_pytest_style/rules/imports.rs b/src/rules/flake8_pytest_style/rules/imports.rs similarity index 100% rename from src/flake8_pytest_style/rules/imports.rs rename to src/rules/flake8_pytest_style/rules/imports.rs diff --git a/src/flake8_pytest_style/rules/marks.rs b/src/rules/flake8_pytest_style/rules/marks.rs similarity index 100% rename from src/flake8_pytest_style/rules/marks.rs rename to src/rules/flake8_pytest_style/rules/marks.rs diff --git a/src/flake8_pytest_style/rules/mod.rs b/src/rules/flake8_pytest_style/rules/mod.rs similarity index 100% rename from src/flake8_pytest_style/rules/mod.rs rename to src/rules/flake8_pytest_style/rules/mod.rs diff --git a/src/flake8_pytest_style/rules/parametrize.rs b/src/rules/flake8_pytest_style/rules/parametrize.rs similarity index 99% rename from src/flake8_pytest_style/rules/parametrize.rs rename to src/rules/flake8_pytest_style/rules/parametrize.rs index 2a692ddfcf..09c2e8e9e5 100644 --- a/src/flake8_pytest_style/rules/parametrize.rs +++ b/src/rules/flake8_pytest_style/rules/parametrize.rs @@ -1,11 +1,11 @@ use rustpython_ast::{Constant, Expr, ExprContext, ExprKind}; +use super::super::types; use super::helpers::is_pytest_parametrize; use crate::ast::helpers::create_expr; use crate::ast::types::Range; use crate::checkers::ast::Checker; use crate::fix::Fix; -use crate::flake8_pytest_style::types; use crate::registry::{Diagnostic, RuleCode}; use crate::source_code::Generator; use crate::violations; diff --git a/src/flake8_pytest_style/rules/patch.rs b/src/rules/flake8_pytest_style/rules/patch.rs similarity index 100% rename from src/flake8_pytest_style/rules/patch.rs rename to src/rules/flake8_pytest_style/rules/patch.rs diff --git a/src/flake8_pytest_style/rules/raises.rs b/src/rules/flake8_pytest_style/rules/raises.rs similarity index 100% rename from src/flake8_pytest_style/rules/raises.rs rename to src/rules/flake8_pytest_style/rules/raises.rs diff --git a/src/flake8_pytest_style/rules/unittest_assert.rs b/src/rules/flake8_pytest_style/rules/unittest_assert.rs similarity index 100% rename from src/flake8_pytest_style/rules/unittest_assert.rs rename to src/rules/flake8_pytest_style/rules/unittest_assert.rs diff --git a/src/flake8_pytest_style/settings.rs b/src/rules/flake8_pytest_style/settings.rs similarity index 100% rename from src/flake8_pytest_style/settings.rs rename to src/rules/flake8_pytest_style/settings.rs diff --git a/src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT001_default.snap b/src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT001_default.snap similarity index 100% rename from src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT001_default.snap rename to src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT001_default.snap diff --git a/src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT001_no_parentheses.snap b/src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT001_no_parentheses.snap similarity index 100% rename from src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT001_no_parentheses.snap rename to src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT001_no_parentheses.snap diff --git a/src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT002.snap b/src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT002.snap similarity index 100% rename from src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT002.snap rename to src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT002.snap diff --git a/src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT003.snap b/src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT003.snap similarity index 100% rename from src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT003.snap rename to src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT003.snap diff --git a/src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT004.snap b/src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT004.snap similarity index 100% rename from src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT004.snap rename to src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT004.snap diff --git a/src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT005.snap b/src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT005.snap similarity index 100% rename from src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT005.snap rename to src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT005.snap diff --git a/src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT006_csv.snap b/src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT006_csv.snap similarity index 100% rename from src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT006_csv.snap rename to src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT006_csv.snap diff --git a/src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT006_default.snap b/src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT006_default.snap similarity index 100% rename from src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT006_default.snap rename to src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT006_default.snap diff --git a/src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT006_list.snap b/src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT006_list.snap similarity index 100% rename from src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT006_list.snap rename to src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT006_list.snap diff --git a/src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT007_list_of_lists.snap b/src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT007_list_of_lists.snap similarity index 100% rename from src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT007_list_of_lists.snap rename to src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT007_list_of_lists.snap diff --git a/src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT007_list_of_tuples.snap b/src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT007_list_of_tuples.snap similarity index 100% rename from src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT007_list_of_tuples.snap rename to src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT007_list_of_tuples.snap diff --git a/src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT007_tuple_of_lists.snap b/src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT007_tuple_of_lists.snap similarity index 100% rename from src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT007_tuple_of_lists.snap rename to src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT007_tuple_of_lists.snap diff --git a/src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT007_tuple_of_tuples.snap b/src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT007_tuple_of_tuples.snap similarity index 100% rename from src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT007_tuple_of_tuples.snap rename to src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT007_tuple_of_tuples.snap diff --git a/src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT008.snap b/src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT008.snap similarity index 100% rename from src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT008.snap rename to src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT008.snap diff --git a/src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT009.snap b/src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT009.snap similarity index 100% rename from src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT009.snap rename to src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT009.snap diff --git a/src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT010.snap b/src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT010.snap similarity index 100% rename from src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT010.snap rename to src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT010.snap diff --git a/src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT011_default.snap b/src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT011_default.snap similarity index 100% rename from src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT011_default.snap rename to src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT011_default.snap diff --git a/src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT011_extend_broad_exceptions.snap b/src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT011_extend_broad_exceptions.snap similarity index 100% rename from src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT011_extend_broad_exceptions.snap rename to src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT011_extend_broad_exceptions.snap diff --git a/src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT011_replace_broad_exceptions.snap b/src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT011_replace_broad_exceptions.snap similarity index 100% rename from src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT011_replace_broad_exceptions.snap rename to src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT011_replace_broad_exceptions.snap diff --git a/src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT012.snap b/src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT012.snap similarity index 100% rename from src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT012.snap rename to src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT012.snap diff --git a/src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT013.snap b/src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT013.snap similarity index 100% rename from src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT013.snap rename to src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT013.snap diff --git a/src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT015.snap b/src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT015.snap similarity index 100% rename from src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT015.snap rename to src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT015.snap diff --git a/src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT016.snap b/src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT016.snap similarity index 100% rename from src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT016.snap rename to src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT016.snap diff --git a/src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT017.snap b/src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT017.snap similarity index 100% rename from src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT017.snap rename to src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT017.snap diff --git a/src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT018.snap b/src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT018.snap similarity index 100% rename from src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT018.snap rename to src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT018.snap diff --git a/src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT019.snap b/src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT019.snap similarity index 100% rename from src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT019.snap rename to src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT019.snap diff --git a/src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT020.snap b/src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT020.snap similarity index 100% rename from src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT020.snap rename to src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT020.snap diff --git a/src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT021.snap b/src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT021.snap similarity index 100% rename from src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT021.snap rename to src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT021.snap diff --git a/src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT022.snap b/src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT022.snap similarity index 100% rename from src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT022.snap rename to src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT022.snap diff --git a/src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT023_default.snap b/src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT023_default.snap similarity index 100% rename from src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT023_default.snap rename to src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT023_default.snap diff --git a/src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT023_no_parentheses.snap b/src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT023_no_parentheses.snap similarity index 100% rename from src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT023_no_parentheses.snap rename to src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT023_no_parentheses.snap diff --git a/src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT024.snap b/src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT024.snap similarity index 100% rename from src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT024.snap rename to src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT024.snap diff --git a/src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT025.snap b/src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT025.snap similarity index 100% rename from src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT025.snap rename to src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT025.snap diff --git a/src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT026.snap b/src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT026.snap similarity index 100% rename from src/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT026.snap rename to src/rules/flake8_pytest_style/snapshots/ruff__flake8_pytest_style__tests__PT026.snap diff --git a/src/flake8_pytest_style/types.rs b/src/rules/flake8_pytest_style/types.rs similarity index 100% rename from src/flake8_pytest_style/types.rs rename to src/rules/flake8_pytest_style/types.rs diff --git a/src/flake8_quotes/mod.rs b/src/rules/flake8_quotes/mod.rs similarity index 93% rename from src/flake8_quotes/mod.rs rename to src/rules/flake8_quotes/mod.rs index 3d094ec87b..713614dd34 100644 --- a/src/flake8_quotes/mod.rs +++ b/src/rules/flake8_quotes/mod.rs @@ -8,8 +8,7 @@ mod tests { use anyhow::Result; use test_case::test_case; - use crate::flake8_quotes; - use crate::flake8_quotes::settings::Quote; + use super::settings::Quote; use crate::linter::test_path; use crate::registry::RuleCode; use crate::settings::Settings; @@ -26,7 +25,7 @@ mod tests { .join(path) .as_path(), &Settings { - flake8_quotes: flake8_quotes::settings::Settings { + flake8_quotes: super::settings::Settings { inline_quotes: Quote::Single, multiline_quotes: Quote::Single, docstring_quotes: Quote::Single, @@ -56,7 +55,7 @@ mod tests { .join(path) .as_path(), &Settings { - flake8_quotes: flake8_quotes::settings::Settings { + flake8_quotes: super::settings::Settings { inline_quotes: Quote::Double, multiline_quotes: Quote::Double, docstring_quotes: Quote::Double, @@ -91,7 +90,7 @@ mod tests { .join(path) .as_path(), &Settings { - flake8_quotes: flake8_quotes::settings::Settings { + flake8_quotes: super::settings::Settings { inline_quotes: Quote::Single, multiline_quotes: Quote::Single, docstring_quotes: Quote::Double, @@ -126,7 +125,7 @@ mod tests { .join(path) .as_path(), &Settings { - flake8_quotes: flake8_quotes::settings::Settings { + flake8_quotes: super::settings::Settings { inline_quotes: Quote::Single, multiline_quotes: Quote::Double, docstring_quotes: Quote::Single, diff --git a/src/flake8_quotes/rules.rs b/src/rules/flake8_quotes/rules.rs similarity index 99% rename from src/flake8_quotes/rules.rs rename to src/rules/flake8_quotes/rules.rs index e70230c738..6cfe591c7e 100644 --- a/src/flake8_quotes/rules.rs +++ b/src/rules/flake8_quotes/rules.rs @@ -1,8 +1,8 @@ use rustpython_ast::Location; +use super::settings::Quote; use crate::ast::types::Range; use crate::fix::Fix; -use crate::flake8_quotes::settings::Quote; use crate::registry::{Diagnostic, RuleCode}; use crate::settings::{flags, Settings}; use crate::source_code::Locator; diff --git a/src/flake8_quotes/settings.rs b/src/rules/flake8_quotes/settings.rs similarity index 100% rename from src/flake8_quotes/settings.rs rename to src/rules/flake8_quotes/settings.rs diff --git a/src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__double_docstring_docstring_doubles.py.snap b/src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__double_docstring_docstring_doubles.py.snap similarity index 100% rename from src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__double_docstring_docstring_doubles.py.snap rename to src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__double_docstring_docstring_doubles.py.snap diff --git a/src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__double_docstring_docstring_doubles_class.py.snap b/src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__double_docstring_docstring_doubles_class.py.snap similarity index 100% rename from src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__double_docstring_docstring_doubles_class.py.snap rename to src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__double_docstring_docstring_doubles_class.py.snap diff --git a/src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__double_docstring_docstring_doubles_function.py.snap b/src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__double_docstring_docstring_doubles_function.py.snap similarity index 100% rename from src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__double_docstring_docstring_doubles_function.py.snap rename to src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__double_docstring_docstring_doubles_function.py.snap diff --git a/src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__double_docstring_docstring_doubles_module_multiline.py.snap b/src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__double_docstring_docstring_doubles_module_multiline.py.snap similarity index 100% rename from src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__double_docstring_docstring_doubles_module_multiline.py.snap rename to src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__double_docstring_docstring_doubles_module_multiline.py.snap diff --git a/src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__double_docstring_docstring_doubles_module_singleline.py.snap b/src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__double_docstring_docstring_doubles_module_singleline.py.snap similarity index 100% rename from src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__double_docstring_docstring_doubles_module_singleline.py.snap rename to src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__double_docstring_docstring_doubles_module_singleline.py.snap diff --git a/src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__double_docstring_docstring_singles.py.snap b/src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__double_docstring_docstring_singles.py.snap similarity index 100% rename from src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__double_docstring_docstring_singles.py.snap rename to src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__double_docstring_docstring_singles.py.snap diff --git a/src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__double_docstring_docstring_singles_class.py.snap b/src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__double_docstring_docstring_singles_class.py.snap similarity index 100% rename from src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__double_docstring_docstring_singles_class.py.snap rename to src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__double_docstring_docstring_singles_class.py.snap diff --git a/src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__double_docstring_docstring_singles_function.py.snap b/src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__double_docstring_docstring_singles_function.py.snap similarity index 100% rename from src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__double_docstring_docstring_singles_function.py.snap rename to src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__double_docstring_docstring_singles_function.py.snap diff --git a/src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__double_docstring_docstring_singles_module_multiline.py.snap b/src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__double_docstring_docstring_singles_module_multiline.py.snap similarity index 100% rename from src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__double_docstring_docstring_singles_module_multiline.py.snap rename to src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__double_docstring_docstring_singles_module_multiline.py.snap diff --git a/src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__double_docstring_docstring_singles_module_singleline.py.snap b/src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__double_docstring_docstring_singles_module_singleline.py.snap similarity index 100% rename from src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__double_docstring_docstring_singles_module_singleline.py.snap rename to src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__double_docstring_docstring_singles_module_singleline.py.snap diff --git a/src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__doubles_doubles.py.snap b/src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__doubles_doubles.py.snap similarity index 100% rename from src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__doubles_doubles.py.snap rename to src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__doubles_doubles.py.snap diff --git a/src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__doubles_doubles_escaped.py.snap b/src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__doubles_doubles_escaped.py.snap similarity index 100% rename from src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__doubles_doubles_escaped.py.snap rename to src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__doubles_doubles_escaped.py.snap diff --git a/src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__doubles_doubles_multiline_string.py.snap b/src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__doubles_doubles_multiline_string.py.snap similarity index 100% rename from src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__doubles_doubles_multiline_string.py.snap rename to src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__doubles_doubles_multiline_string.py.snap diff --git a/src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__doubles_doubles_noqa.py.snap b/src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__doubles_doubles_noqa.py.snap similarity index 100% rename from src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__doubles_doubles_noqa.py.snap rename to src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__doubles_doubles_noqa.py.snap diff --git a/src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__doubles_doubles_wrapped.py.snap b/src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__doubles_doubles_wrapped.py.snap similarity index 100% rename from src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__doubles_doubles_wrapped.py.snap rename to src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__doubles_doubles_wrapped.py.snap diff --git a/src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__single_docstring_docstring_doubles.py.snap b/src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__single_docstring_docstring_doubles.py.snap similarity index 100% rename from src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__single_docstring_docstring_doubles.py.snap rename to src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__single_docstring_docstring_doubles.py.snap diff --git a/src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__single_docstring_docstring_doubles_class.py.snap b/src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__single_docstring_docstring_doubles_class.py.snap similarity index 100% rename from src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__single_docstring_docstring_doubles_class.py.snap rename to src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__single_docstring_docstring_doubles_class.py.snap diff --git a/src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__single_docstring_docstring_doubles_function.py.snap b/src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__single_docstring_docstring_doubles_function.py.snap similarity index 100% rename from src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__single_docstring_docstring_doubles_function.py.snap rename to src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__single_docstring_docstring_doubles_function.py.snap diff --git a/src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__single_docstring_docstring_doubles_module_multiline.py.snap b/src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__single_docstring_docstring_doubles_module_multiline.py.snap similarity index 100% rename from src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__single_docstring_docstring_doubles_module_multiline.py.snap rename to src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__single_docstring_docstring_doubles_module_multiline.py.snap diff --git a/src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__single_docstring_docstring_doubles_module_singleline.py.snap b/src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__single_docstring_docstring_doubles_module_singleline.py.snap similarity index 100% rename from src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__single_docstring_docstring_doubles_module_singleline.py.snap rename to src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__single_docstring_docstring_doubles_module_singleline.py.snap diff --git a/src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__single_docstring_docstring_singles.py.snap b/src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__single_docstring_docstring_singles.py.snap similarity index 100% rename from src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__single_docstring_docstring_singles.py.snap rename to src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__single_docstring_docstring_singles.py.snap diff --git a/src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__single_docstring_docstring_singles_class.py.snap b/src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__single_docstring_docstring_singles_class.py.snap similarity index 100% rename from src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__single_docstring_docstring_singles_class.py.snap rename to src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__single_docstring_docstring_singles_class.py.snap diff --git a/src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__single_docstring_docstring_singles_function.py.snap b/src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__single_docstring_docstring_singles_function.py.snap similarity index 100% rename from src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__single_docstring_docstring_singles_function.py.snap rename to src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__single_docstring_docstring_singles_function.py.snap diff --git a/src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__single_docstring_docstring_singles_module_multiline.py.snap b/src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__single_docstring_docstring_singles_module_multiline.py.snap similarity index 100% rename from src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__single_docstring_docstring_singles_module_multiline.py.snap rename to src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__single_docstring_docstring_singles_module_multiline.py.snap diff --git a/src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__single_docstring_docstring_singles_module_singleline.py.snap b/src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__single_docstring_docstring_singles_module_singleline.py.snap similarity index 100% rename from src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__single_docstring_docstring_singles_module_singleline.py.snap rename to src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__single_docstring_docstring_singles_module_singleline.py.snap diff --git a/src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__singles_singles.py.snap b/src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__singles_singles.py.snap similarity index 100% rename from src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__singles_singles.py.snap rename to src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__singles_singles.py.snap diff --git a/src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__singles_singles_escaped.py.snap b/src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__singles_singles_escaped.py.snap similarity index 100% rename from src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__singles_singles_escaped.py.snap rename to src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__singles_singles_escaped.py.snap diff --git a/src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__singles_singles_multiline_string.py.snap b/src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__singles_singles_multiline_string.py.snap similarity index 100% rename from src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__singles_singles_multiline_string.py.snap rename to src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__singles_singles_multiline_string.py.snap diff --git a/src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__singles_singles_noqa.py.snap b/src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__singles_singles_noqa.py.snap similarity index 100% rename from src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__singles_singles_noqa.py.snap rename to src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__singles_singles_noqa.py.snap diff --git a/src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__singles_singles_wrapped.py.snap b/src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__singles_singles_wrapped.py.snap similarity index 100% rename from src/flake8_quotes/snapshots/ruff__flake8_quotes__tests__singles_singles_wrapped.py.snap rename to src/rules/flake8_quotes/snapshots/ruff__flake8_quotes__tests__singles_singles_wrapped.py.snap diff --git a/src/flake8_return/helpers.rs b/src/rules/flake8_return/helpers.rs similarity index 100% rename from src/flake8_return/helpers.rs rename to src/rules/flake8_return/helpers.rs diff --git a/src/flake8_return/mod.rs b/src/rules/flake8_return/mod.rs similarity index 100% rename from src/flake8_return/mod.rs rename to src/rules/flake8_return/mod.rs diff --git a/src/flake8_return/rules.rs b/src/rules/flake8_return/rules.rs similarity index 99% rename from src/flake8_return/rules.rs rename to src/rules/flake8_return/rules.rs index 6e001ab805..58da12dfc7 100644 --- a/src/flake8_return/rules.rs +++ b/src/rules/flake8_return/rules.rs @@ -1,13 +1,13 @@ use itertools::Itertools; use rustpython_ast::{Constant, Expr, ExprKind, Location, Stmt, StmtKind}; +use super::helpers::result_exists; +use super::visitor::{ReturnVisitor, Stack}; use crate::ast::types::Range; use crate::ast::visitor::Visitor; use crate::ast::whitespace::indentation; use crate::checkers::ast::Checker; use crate::fix::Fix; -use crate::flake8_return::helpers::result_exists; -use crate::flake8_return::visitor::{ReturnVisitor, Stack}; use crate::registry::{Diagnostic, RuleCode}; use crate::violations; use crate::violations::Branch; diff --git a/src/flake8_return/snapshots/ruff__flake8_return__tests__RET501_RET501.py.snap b/src/rules/flake8_return/snapshots/ruff__flake8_return__tests__RET501_RET501.py.snap similarity index 100% rename from src/flake8_return/snapshots/ruff__flake8_return__tests__RET501_RET501.py.snap rename to src/rules/flake8_return/snapshots/ruff__flake8_return__tests__RET501_RET501.py.snap diff --git a/src/flake8_return/snapshots/ruff__flake8_return__tests__RET502_RET502.py.snap b/src/rules/flake8_return/snapshots/ruff__flake8_return__tests__RET502_RET502.py.snap similarity index 100% rename from src/flake8_return/snapshots/ruff__flake8_return__tests__RET502_RET502.py.snap rename to src/rules/flake8_return/snapshots/ruff__flake8_return__tests__RET502_RET502.py.snap diff --git a/src/flake8_return/snapshots/ruff__flake8_return__tests__RET503_RET503.py.snap b/src/rules/flake8_return/snapshots/ruff__flake8_return__tests__RET503_RET503.py.snap similarity index 100% rename from src/flake8_return/snapshots/ruff__flake8_return__tests__RET503_RET503.py.snap rename to src/rules/flake8_return/snapshots/ruff__flake8_return__tests__RET503_RET503.py.snap diff --git a/src/flake8_return/snapshots/ruff__flake8_return__tests__RET504_RET504.py.snap b/src/rules/flake8_return/snapshots/ruff__flake8_return__tests__RET504_RET504.py.snap similarity index 100% rename from src/flake8_return/snapshots/ruff__flake8_return__tests__RET504_RET504.py.snap rename to src/rules/flake8_return/snapshots/ruff__flake8_return__tests__RET504_RET504.py.snap diff --git a/src/flake8_return/snapshots/ruff__flake8_return__tests__RET505_RET505.py.snap b/src/rules/flake8_return/snapshots/ruff__flake8_return__tests__RET505_RET505.py.snap similarity index 100% rename from src/flake8_return/snapshots/ruff__flake8_return__tests__RET505_RET505.py.snap rename to src/rules/flake8_return/snapshots/ruff__flake8_return__tests__RET505_RET505.py.snap diff --git a/src/flake8_return/snapshots/ruff__flake8_return__tests__RET506_RET506.py.snap b/src/rules/flake8_return/snapshots/ruff__flake8_return__tests__RET506_RET506.py.snap similarity index 100% rename from src/flake8_return/snapshots/ruff__flake8_return__tests__RET506_RET506.py.snap rename to src/rules/flake8_return/snapshots/ruff__flake8_return__tests__RET506_RET506.py.snap diff --git a/src/flake8_return/snapshots/ruff__flake8_return__tests__RET507_RET507.py.snap b/src/rules/flake8_return/snapshots/ruff__flake8_return__tests__RET507_RET507.py.snap similarity index 100% rename from src/flake8_return/snapshots/ruff__flake8_return__tests__RET507_RET507.py.snap rename to src/rules/flake8_return/snapshots/ruff__flake8_return__tests__RET507_RET507.py.snap diff --git a/src/flake8_return/snapshots/ruff__flake8_return__tests__RET508_RET508.py.snap b/src/rules/flake8_return/snapshots/ruff__flake8_return__tests__RET508_RET508.py.snap similarity index 100% rename from src/flake8_return/snapshots/ruff__flake8_return__tests__RET508_RET508.py.snap rename to src/rules/flake8_return/snapshots/ruff__flake8_return__tests__RET508_RET508.py.snap diff --git a/src/flake8_return/visitor.rs b/src/rules/flake8_return/visitor.rs similarity index 100% rename from src/flake8_return/visitor.rs rename to src/rules/flake8_return/visitor.rs diff --git a/src/flake8_simplify/mod.rs b/src/rules/flake8_simplify/mod.rs similarity index 100% rename from src/flake8_simplify/mod.rs rename to src/rules/flake8_simplify/mod.rs diff --git a/src/flake8_simplify/rules/ast_bool_op.rs b/src/rules/flake8_simplify/rules/ast_bool_op.rs similarity index 100% rename from src/flake8_simplify/rules/ast_bool_op.rs rename to src/rules/flake8_simplify/rules/ast_bool_op.rs diff --git a/src/flake8_simplify/rules/ast_expr.rs b/src/rules/flake8_simplify/rules/ast_expr.rs similarity index 100% rename from src/flake8_simplify/rules/ast_expr.rs rename to src/rules/flake8_simplify/rules/ast_expr.rs diff --git a/src/flake8_simplify/rules/ast_for.rs b/src/rules/flake8_simplify/rules/ast_for.rs similarity index 100% rename from src/flake8_simplify/rules/ast_for.rs rename to src/rules/flake8_simplify/rules/ast_for.rs diff --git a/src/flake8_simplify/rules/ast_if.rs b/src/rules/flake8_simplify/rules/ast_if.rs similarity index 100% rename from src/flake8_simplify/rules/ast_if.rs rename to src/rules/flake8_simplify/rules/ast_if.rs diff --git a/src/flake8_simplify/rules/ast_ifexp.rs b/src/rules/flake8_simplify/rules/ast_ifexp.rs similarity index 100% rename from src/flake8_simplify/rules/ast_ifexp.rs rename to src/rules/flake8_simplify/rules/ast_ifexp.rs diff --git a/src/flake8_simplify/rules/ast_unary_op.rs b/src/rules/flake8_simplify/rules/ast_unary_op.rs similarity index 100% rename from src/flake8_simplify/rules/ast_unary_op.rs rename to src/rules/flake8_simplify/rules/ast_unary_op.rs diff --git a/src/flake8_simplify/rules/ast_with.rs b/src/rules/flake8_simplify/rules/ast_with.rs similarity index 100% rename from src/flake8_simplify/rules/ast_with.rs rename to src/rules/flake8_simplify/rules/ast_with.rs diff --git a/src/flake8_simplify/rules/key_in_dict.rs b/src/rules/flake8_simplify/rules/key_in_dict.rs similarity index 100% rename from src/flake8_simplify/rules/key_in_dict.rs rename to src/rules/flake8_simplify/rules/key_in_dict.rs diff --git a/src/flake8_simplify/rules/mod.rs b/src/rules/flake8_simplify/rules/mod.rs similarity index 100% rename from src/flake8_simplify/rules/mod.rs rename to src/rules/flake8_simplify/rules/mod.rs diff --git a/src/flake8_simplify/rules/open_file_with_context_handler.rs b/src/rules/flake8_simplify/rules/open_file_with_context_handler.rs similarity index 100% rename from src/flake8_simplify/rules/open_file_with_context_handler.rs rename to src/rules/flake8_simplify/rules/open_file_with_context_handler.rs diff --git a/src/flake8_simplify/rules/return_in_try_except_finally.rs b/src/rules/flake8_simplify/rules/return_in_try_except_finally.rs similarity index 100% rename from src/flake8_simplify/rules/return_in_try_except_finally.rs rename to src/rules/flake8_simplify/rules/return_in_try_except_finally.rs diff --git a/src/flake8_simplify/rules/use_contextlib_suppress.rs b/src/rules/flake8_simplify/rules/use_contextlib_suppress.rs similarity index 100% rename from src/flake8_simplify/rules/use_contextlib_suppress.rs rename to src/rules/flake8_simplify/rules/use_contextlib_suppress.rs diff --git a/src/flake8_simplify/rules/yoda_conditions.rs b/src/rules/flake8_simplify/rules/yoda_conditions.rs similarity index 100% rename from src/flake8_simplify/rules/yoda_conditions.rs rename to src/rules/flake8_simplify/rules/yoda_conditions.rs diff --git a/src/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM101_SIM101.py.snap b/src/rules/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM101_SIM101.py.snap similarity index 100% rename from src/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM101_SIM101.py.snap rename to src/rules/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM101_SIM101.py.snap diff --git a/src/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM102_SIM102.py.snap b/src/rules/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM102_SIM102.py.snap similarity index 100% rename from src/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM102_SIM102.py.snap rename to src/rules/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM102_SIM102.py.snap diff --git a/src/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM103_SIM103.py.snap b/src/rules/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM103_SIM103.py.snap similarity index 100% rename from src/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM103_SIM103.py.snap rename to src/rules/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM103_SIM103.py.snap diff --git a/src/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM105_SIM105.py.snap b/src/rules/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM105_SIM105.py.snap similarity index 100% rename from src/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM105_SIM105.py.snap rename to src/rules/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM105_SIM105.py.snap diff --git a/src/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM107_SIM107.py.snap b/src/rules/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM107_SIM107.py.snap similarity index 100% rename from src/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM107_SIM107.py.snap rename to src/rules/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM107_SIM107.py.snap diff --git a/src/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM108_SIM108.py.snap b/src/rules/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM108_SIM108.py.snap similarity index 100% rename from src/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM108_SIM108.py.snap rename to src/rules/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM108_SIM108.py.snap diff --git a/src/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM109_SIM109.py.snap b/src/rules/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM109_SIM109.py.snap similarity index 100% rename from src/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM109_SIM109.py.snap rename to src/rules/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM109_SIM109.py.snap diff --git a/src/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM110_SIM110.py.snap b/src/rules/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM110_SIM110.py.snap similarity index 100% rename from src/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM110_SIM110.py.snap rename to src/rules/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM110_SIM110.py.snap diff --git a/src/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM111_SIM111.py.snap b/src/rules/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM111_SIM111.py.snap similarity index 100% rename from src/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM111_SIM111.py.snap rename to src/rules/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM111_SIM111.py.snap diff --git a/src/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM112_SIM112.py.snap b/src/rules/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM112_SIM112.py.snap similarity index 100% rename from src/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM112_SIM112.py.snap rename to src/rules/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM112_SIM112.py.snap diff --git a/src/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM115_SIM115.py.snap b/src/rules/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM115_SIM115.py.snap similarity index 100% rename from src/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM115_SIM115.py.snap rename to src/rules/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM115_SIM115.py.snap diff --git a/src/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM117_SIM117.py.snap b/src/rules/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM117_SIM117.py.snap similarity index 100% rename from src/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM117_SIM117.py.snap rename to src/rules/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM117_SIM117.py.snap diff --git a/src/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM118_SIM118.py.snap b/src/rules/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM118_SIM118.py.snap similarity index 100% rename from src/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM118_SIM118.py.snap rename to src/rules/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM118_SIM118.py.snap diff --git a/src/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM201_SIM201.py.snap b/src/rules/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM201_SIM201.py.snap similarity index 100% rename from src/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM201_SIM201.py.snap rename to src/rules/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM201_SIM201.py.snap diff --git a/src/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM202_SIM202.py.snap b/src/rules/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM202_SIM202.py.snap similarity index 100% rename from src/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM202_SIM202.py.snap rename to src/rules/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM202_SIM202.py.snap diff --git a/src/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM208_SIM208.py.snap b/src/rules/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM208_SIM208.py.snap similarity index 100% rename from src/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM208_SIM208.py.snap rename to src/rules/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM208_SIM208.py.snap diff --git a/src/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM210_SIM210.py.snap b/src/rules/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM210_SIM210.py.snap similarity index 100% rename from src/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM210_SIM210.py.snap rename to src/rules/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM210_SIM210.py.snap diff --git a/src/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM211_SIM211.py.snap b/src/rules/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM211_SIM211.py.snap similarity index 100% rename from src/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM211_SIM211.py.snap rename to src/rules/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM211_SIM211.py.snap diff --git a/src/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM212_SIM212.py.snap b/src/rules/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM212_SIM212.py.snap similarity index 100% rename from src/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM212_SIM212.py.snap rename to src/rules/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM212_SIM212.py.snap diff --git a/src/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM220_SIM220.py.snap b/src/rules/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM220_SIM220.py.snap similarity index 100% rename from src/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM220_SIM220.py.snap rename to src/rules/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM220_SIM220.py.snap diff --git a/src/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM221_SIM221.py.snap b/src/rules/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM221_SIM221.py.snap similarity index 100% rename from src/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM221_SIM221.py.snap rename to src/rules/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM221_SIM221.py.snap diff --git a/src/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM222_SIM222.py.snap b/src/rules/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM222_SIM222.py.snap similarity index 100% rename from src/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM222_SIM222.py.snap rename to src/rules/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM222_SIM222.py.snap diff --git a/src/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM223_SIM223.py.snap b/src/rules/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM223_SIM223.py.snap similarity index 100% rename from src/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM223_SIM223.py.snap rename to src/rules/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM223_SIM223.py.snap diff --git a/src/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM300_SIM300.py.snap b/src/rules/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM300_SIM300.py.snap similarity index 100% rename from src/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM300_SIM300.py.snap rename to src/rules/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM300_SIM300.py.snap diff --git a/src/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM401_SIM401.py.snap b/src/rules/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM401_SIM401.py.snap similarity index 100% rename from src/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM401_SIM401.py.snap rename to src/rules/flake8_simplify/snapshots/ruff__flake8_simplify__tests__SIM401_SIM401.py.snap diff --git a/src/flake8_tidy_imports/mod.rs b/src/rules/flake8_tidy_imports/mod.rs similarity index 86% rename from src/flake8_tidy_imports/mod.rs rename to src/rules/flake8_tidy_imports/mod.rs index 2293e91d6b..3659aec2fb 100644 --- a/src/flake8_tidy_imports/mod.rs +++ b/src/rules/flake8_tidy_imports/mod.rs @@ -8,8 +8,7 @@ mod tests { use anyhow::Result; use rustc_hash::FxHashMap; - use crate::flake8_tidy_imports; - use crate::flake8_tidy_imports::settings::{BannedApi, Strictness}; + use super::settings::{BannedApi, Strictness}; use crate::linter::test_path; use crate::registry::RuleCode; use crate::settings::Settings; @@ -19,7 +18,7 @@ mod tests { let diagnostics = test_path( Path::new("./resources/test/fixtures/flake8_tidy_imports/TID252.py"), &Settings { - flake8_tidy_imports: flake8_tidy_imports::settings::Settings { + flake8_tidy_imports: super::settings::Settings { ban_relative_imports: Strictness::Parents, ..Default::default() }, @@ -35,7 +34,7 @@ mod tests { let diagnostics = test_path( Path::new("./resources/test/fixtures/flake8_tidy_imports/TID252.py"), &Settings { - flake8_tidy_imports: flake8_tidy_imports::settings::Settings { + flake8_tidy_imports: super::settings::Settings { ban_relative_imports: Strictness::All, ..Default::default() }, @@ -51,7 +50,7 @@ mod tests { let diagnostics = test_path( Path::new("./resources/test/fixtures/flake8_tidy_imports/TID251.py"), &Settings { - flake8_tidy_imports: flake8_tidy_imports::settings::Settings { + flake8_tidy_imports: super::settings::Settings { banned_api: FxHashMap::from_iter([ ( "cgi".to_string(), diff --git a/src/flake8_tidy_imports/rules.rs b/src/rules/flake8_tidy_imports/rules.rs similarity index 96% rename from src/flake8_tidy_imports/rules.rs rename to src/rules/flake8_tidy_imports/rules.rs index a6047133c2..b39901d1f3 100644 --- a/src/flake8_tidy_imports/rules.rs +++ b/src/rules/flake8_tidy_imports/rules.rs @@ -1,10 +1,9 @@ use rustc_hash::FxHashMap; use rustpython_ast::{Alias, Expr, Located, Stmt}; -use super::settings::BannedApi; +use super::settings::{BannedApi, Strictness}; use crate::ast::types::Range; use crate::checkers::ast::Checker; -use crate::flake8_tidy_imports::settings::Strictness; use crate::registry::Diagnostic; use crate::violations; diff --git a/src/flake8_tidy_imports/settings.rs b/src/rules/flake8_tidy_imports/settings.rs similarity index 100% rename from src/flake8_tidy_imports/settings.rs rename to src/rules/flake8_tidy_imports/settings.rs diff --git a/src/flake8_tidy_imports/snapshots/ruff__flake8_tidy_imports__tests__ban_all_imports.snap b/src/rules/flake8_tidy_imports/snapshots/ruff__flake8_tidy_imports__tests__ban_all_imports.snap similarity index 100% rename from src/flake8_tidy_imports/snapshots/ruff__flake8_tidy_imports__tests__ban_all_imports.snap rename to src/rules/flake8_tidy_imports/snapshots/ruff__flake8_tidy_imports__tests__ban_all_imports.snap diff --git a/src/flake8_tidy_imports/snapshots/ruff__flake8_tidy_imports__tests__ban_parent_imports.snap b/src/rules/flake8_tidy_imports/snapshots/ruff__flake8_tidy_imports__tests__ban_parent_imports.snap similarity index 100% rename from src/flake8_tidy_imports/snapshots/ruff__flake8_tidy_imports__tests__ban_parent_imports.snap rename to src/rules/flake8_tidy_imports/snapshots/ruff__flake8_tidy_imports__tests__ban_parent_imports.snap diff --git a/src/flake8_tidy_imports/snapshots/ruff__flake8_tidy_imports__tests__banned_api_true_positives.snap b/src/rules/flake8_tidy_imports/snapshots/ruff__flake8_tidy_imports__tests__banned_api_true_positives.snap similarity index 100% rename from src/flake8_tidy_imports/snapshots/ruff__flake8_tidy_imports__tests__banned_api_true_positives.snap rename to src/rules/flake8_tidy_imports/snapshots/ruff__flake8_tidy_imports__tests__banned_api_true_positives.snap diff --git a/src/flake8_unused_arguments/helpers.rs b/src/rules/flake8_unused_arguments/helpers.rs similarity index 100% rename from src/flake8_unused_arguments/helpers.rs rename to src/rules/flake8_unused_arguments/helpers.rs diff --git a/src/flake8_unused_arguments/mod.rs b/src/rules/flake8_unused_arguments/mod.rs similarity index 91% rename from src/flake8_unused_arguments/mod.rs rename to src/rules/flake8_unused_arguments/mod.rs index 0e12331fb1..1e72723331 100644 --- a/src/flake8_unused_arguments/mod.rs +++ b/src/rules/flake8_unused_arguments/mod.rs @@ -13,7 +13,7 @@ mod tests { use crate::linter::test_path; use crate::registry::RuleCode; - use crate::{flake8_unused_arguments, settings}; + use crate::settings; #[test_case(RuleCode::ARG001, Path::new("ARG.py"); "ARG001")] #[test_case(RuleCode::ARG002, Path::new("ARG.py"); "ARG002")] @@ -37,7 +37,7 @@ mod tests { let diagnostics = test_path( Path::new("./resources/test/fixtures/flake8_unused_arguments/ignore_variadic_names.py"), &settings::Settings { - flake8_unused_arguments: flake8_unused_arguments::settings::Settings { + flake8_unused_arguments: super::settings::Settings { ignore_variadic_names: true, }, ..settings::Settings::for_rules(vec![ @@ -58,7 +58,7 @@ mod tests { let diagnostics = test_path( Path::new("./resources/test/fixtures/flake8_unused_arguments/ignore_variadic_names.py"), &settings::Settings { - flake8_unused_arguments: flake8_unused_arguments::settings::Settings { + flake8_unused_arguments: super::settings::Settings { ignore_variadic_names: false, }, ..settings::Settings::for_rules(vec![ diff --git a/src/flake8_unused_arguments/rules.rs b/src/rules/flake8_unused_arguments/rules.rs similarity index 98% rename from src/flake8_unused_arguments/rules.rs rename to src/rules/flake8_unused_arguments/rules.rs index f3a87ab464..1cbcd17e8f 100644 --- a/src/flake8_unused_arguments/rules.rs +++ b/src/rules/flake8_unused_arguments/rules.rs @@ -4,12 +4,12 @@ use regex::Regex; use rustc_hash::FxHashMap; use rustpython_ast::{Arg, Arguments}; +use super::helpers; +use super::types::Argumentable; use crate::ast::function_type; use crate::ast::function_type::FunctionType; use crate::ast::types::{Binding, BindingKind, FunctionDef, Lambda, Scope, ScopeKind}; use crate::checkers::ast::Checker; -use crate::flake8_unused_arguments::helpers; -use crate::flake8_unused_arguments::types::Argumentable; use crate::registry::Diagnostic; use crate::visibility; diff --git a/src/flake8_unused_arguments/settings.rs b/src/rules/flake8_unused_arguments/settings.rs similarity index 100% rename from src/flake8_unused_arguments/settings.rs rename to src/rules/flake8_unused_arguments/settings.rs diff --git a/src/flake8_unused_arguments/snapshots/ruff__flake8_unused_arguments__tests__ARG001_ARG.py.snap b/src/rules/flake8_unused_arguments/snapshots/ruff__flake8_unused_arguments__tests__ARG001_ARG.py.snap similarity index 100% rename from src/flake8_unused_arguments/snapshots/ruff__flake8_unused_arguments__tests__ARG001_ARG.py.snap rename to src/rules/flake8_unused_arguments/snapshots/ruff__flake8_unused_arguments__tests__ARG001_ARG.py.snap diff --git a/src/flake8_unused_arguments/snapshots/ruff__flake8_unused_arguments__tests__ARG002_ARG.py.snap b/src/rules/flake8_unused_arguments/snapshots/ruff__flake8_unused_arguments__tests__ARG002_ARG.py.snap similarity index 100% rename from src/flake8_unused_arguments/snapshots/ruff__flake8_unused_arguments__tests__ARG002_ARG.py.snap rename to src/rules/flake8_unused_arguments/snapshots/ruff__flake8_unused_arguments__tests__ARG002_ARG.py.snap diff --git a/src/flake8_unused_arguments/snapshots/ruff__flake8_unused_arguments__tests__ARG003_ARG.py.snap b/src/rules/flake8_unused_arguments/snapshots/ruff__flake8_unused_arguments__tests__ARG003_ARG.py.snap similarity index 100% rename from src/flake8_unused_arguments/snapshots/ruff__flake8_unused_arguments__tests__ARG003_ARG.py.snap rename to src/rules/flake8_unused_arguments/snapshots/ruff__flake8_unused_arguments__tests__ARG003_ARG.py.snap diff --git a/src/flake8_unused_arguments/snapshots/ruff__flake8_unused_arguments__tests__ARG004_ARG.py.snap b/src/rules/flake8_unused_arguments/snapshots/ruff__flake8_unused_arguments__tests__ARG004_ARG.py.snap similarity index 100% rename from src/flake8_unused_arguments/snapshots/ruff__flake8_unused_arguments__tests__ARG004_ARG.py.snap rename to src/rules/flake8_unused_arguments/snapshots/ruff__flake8_unused_arguments__tests__ARG004_ARG.py.snap diff --git a/src/flake8_unused_arguments/snapshots/ruff__flake8_unused_arguments__tests__ARG005_ARG.py.snap b/src/rules/flake8_unused_arguments/snapshots/ruff__flake8_unused_arguments__tests__ARG005_ARG.py.snap similarity index 100% rename from src/flake8_unused_arguments/snapshots/ruff__flake8_unused_arguments__tests__ARG005_ARG.py.snap rename to src/rules/flake8_unused_arguments/snapshots/ruff__flake8_unused_arguments__tests__ARG005_ARG.py.snap diff --git a/src/flake8_unused_arguments/snapshots/ruff__flake8_unused_arguments__tests__enforce_variadic_names.snap b/src/rules/flake8_unused_arguments/snapshots/ruff__flake8_unused_arguments__tests__enforce_variadic_names.snap similarity index 100% rename from src/flake8_unused_arguments/snapshots/ruff__flake8_unused_arguments__tests__enforce_variadic_names.snap rename to src/rules/flake8_unused_arguments/snapshots/ruff__flake8_unused_arguments__tests__enforce_variadic_names.snap diff --git a/src/flake8_unused_arguments/snapshots/ruff__flake8_unused_arguments__tests__ignore_variadic_names.snap b/src/rules/flake8_unused_arguments/snapshots/ruff__flake8_unused_arguments__tests__ignore_variadic_names.snap similarity index 100% rename from src/flake8_unused_arguments/snapshots/ruff__flake8_unused_arguments__tests__ignore_variadic_names.snap rename to src/rules/flake8_unused_arguments/snapshots/ruff__flake8_unused_arguments__tests__ignore_variadic_names.snap diff --git a/src/flake8_unused_arguments/types.rs b/src/rules/flake8_unused_arguments/types.rs similarity index 100% rename from src/flake8_unused_arguments/types.rs rename to src/rules/flake8_unused_arguments/types.rs diff --git a/src/isort/categorize.rs b/src/rules/isort/categorize.rs similarity index 100% rename from src/isort/categorize.rs rename to src/rules/isort/categorize.rs diff --git a/src/isort/comments.rs b/src/rules/isort/comments.rs similarity index 100% rename from src/isort/comments.rs rename to src/rules/isort/comments.rs diff --git a/src/isort/format.rs b/src/rules/isort/format.rs similarity index 98% rename from src/isort/format.rs rename to src/rules/isort/format.rs index 6d10c5a0bc..cfa1054556 100644 --- a/src/isort/format.rs +++ b/src/rules/isort/format.rs @@ -1,4 +1,4 @@ -use crate::isort::types::{AliasData, CommentSet, ImportFromData, Importable}; +use super::types::{AliasData, CommentSet, ImportFromData, Importable}; use crate::source_code::Stylist; // Hard-code four-space indentation for the imports themselves, to match Black. diff --git a/src/isort/helpers.rs b/src/rules/isort/helpers.rs similarity index 98% rename from src/isort/helpers.rs rename to src/rules/isort/helpers.rs index 727f578003..e0761c4fb8 100644 --- a/src/isort/helpers.rs +++ b/src/rules/isort/helpers.rs @@ -2,9 +2,9 @@ use rustpython_ast::{Location, Stmt}; use rustpython_parser::lexer; use rustpython_parser::lexer::Tok; +use super::types::TrailingComma; use crate::ast::helpers::is_docstring_stmt; use crate::ast::types::Range; -use crate::isort::types::TrailingComma; use crate::source_code::Locator; /// Return `true` if a `StmtKind::ImportFrom` statement ends with a magic @@ -131,7 +131,7 @@ mod tests { use rustpython_ast::Location; use rustpython_parser::parser; - use crate::isort::helpers::find_splice_location; + use super::find_splice_location; use crate::source_code::Locator; fn splice_contents(contents: &str) -> Result { diff --git a/src/isort/mod.rs b/src/rules/isort/mod.rs similarity index 95% rename from src/isort/mod.rs rename to src/rules/isort/mod.rs index 404f8e33fb..0b9cc378fe 100644 --- a/src/isort/mod.rs +++ b/src/rules/isort/mod.rs @@ -2,23 +2,23 @@ use std::cmp::Ordering; use std::collections::{BTreeMap, BTreeSet}; use std::path::{Path, PathBuf}; +use categorize::{categorize, ImportType}; +use comments::Comment; +use helpers::trailing_comma; use itertools::Either::{Left, Right}; use itertools::Itertools; use ropey::RopeBuilder; use rustc_hash::FxHashMap; use rustpython_ast::{Stmt, StmtKind}; - -use crate::isort::categorize::{categorize, ImportType}; -use crate::isort::comments::Comment; -use crate::isort::helpers::trailing_comma; -use crate::isort::settings::RelatveImportsOrder; -use crate::isort::sorting::{cmp_either_import, cmp_import_from, cmp_members, cmp_modules}; -use crate::isort::track::{Block, Trailer}; -use crate::isort::types::EitherImport::{Import, ImportFrom}; -use crate::isort::types::{ +use settings::RelatveImportsOrder; +use sorting::{cmp_either_import, cmp_import_from, cmp_members, cmp_modules}; +use track::{Block, Trailer}; +use types::EitherImport::{Import, ImportFrom}; +use types::{ AliasData, CommentSet, EitherImport, ImportBlock, ImportFromData, Importable, OrderedImportBlock, TrailingComma, }; + use crate::source_code::{Locator, Stylist}; mod categorize; @@ -657,8 +657,7 @@ mod tests { use anyhow::Result; use test_case::test_case; - use crate::isort; - use crate::isort::settings::RelatveImportsOrder; + use super::settings::RelatveImportsOrder; use crate::linter::test_path; use crate::registry::RuleCode; use crate::settings::Settings; @@ -725,9 +724,9 @@ mod tests { .join(path) .as_path(), &Settings { - isort: isort::settings::Settings { + isort: super::settings::Settings { combine_as_imports: true, - ..isort::settings::Settings::default() + ..super::settings::Settings::default() }, src: vec![Path::new("resources/test/fixtures/isort").to_path_buf()], ..Settings::for_rule(RuleCode::I001) @@ -745,10 +744,10 @@ mod tests { .join(path) .as_path(), &Settings { - isort: isort::settings::Settings { + isort: super::settings::Settings { force_wrap_aliases: true, combine_as_imports: true, - ..isort::settings::Settings::default() + ..super::settings::Settings::default() }, src: vec![Path::new("resources/test/fixtures/isort").to_path_buf()], ..Settings::for_rule(RuleCode::I001) @@ -766,9 +765,9 @@ mod tests { .join(path) .as_path(), &Settings { - isort: isort::settings::Settings { + isort: super::settings::Settings { split_on_trailing_comma: false, - ..isort::settings::Settings::default() + ..super::settings::Settings::default() }, src: vec![Path::new("resources/test/fixtures/isort").to_path_buf()], ..Settings::for_rule(RuleCode::I001) @@ -786,12 +785,12 @@ mod tests { .join(path) .as_path(), &Settings { - isort: isort::settings::Settings { + isort: super::settings::Settings { force_single_line: true, single_line_exclusions: vec!["os".to_string(), "logging.handlers".to_string()] .into_iter() .collect::>(), - ..isort::settings::Settings::default() + ..super::settings::Settings::default() }, src: vec![Path::new("resources/test/fixtures/isort").to_path_buf()], ..Settings::for_rule(RuleCode::I001) @@ -809,9 +808,9 @@ mod tests { .join(path) .as_path(), &Settings { - isort: isort::settings::Settings { + isort: super::settings::Settings { order_by_type: false, - ..isort::settings::Settings::default() + ..super::settings::Settings::default() }, src: vec![Path::new("resources/test/fixtures/isort").to_path_buf()], ..Settings::for_rule(RuleCode::I001) @@ -833,7 +832,7 @@ mod tests { .join(path) .as_path(), &Settings { - isort: isort::settings::Settings { + isort: super::settings::Settings { order_by_type: true, classes: BTreeSet::from([ "SVC".to_string(), @@ -841,7 +840,7 @@ mod tests { "N_CLASS".to_string(), "CLASS".to_string(), ]), - ..isort::settings::Settings::default() + ..super::settings::Settings::default() }, src: vec![Path::new("resources/test/fixtures/isort").to_path_buf()], ..Settings::for_rule(RuleCode::I001) @@ -860,9 +859,9 @@ mod tests { .join(path) .as_path(), &Settings { - isort: isort::settings::Settings { + isort: super::settings::Settings { force_sort_within_sections: true, - ..isort::settings::Settings::default() + ..super::settings::Settings::default() }, src: vec![Path::new("resources/test/fixtures/isort").to_path_buf()], ..Settings::for_rule(RuleCode::I001) @@ -884,11 +883,11 @@ mod tests { .as_path(), &Settings { src: vec![Path::new("resources/test/fixtures/isort").to_path_buf()], - isort: isort::settings::Settings { + isort: super::settings::Settings { required_imports: BTreeSet::from([ "from __future__ import annotations".to_string() ]), - ..isort::settings::Settings::default() + ..super::settings::Settings::default() }, ..Settings::for_rule(RuleCode::I002) }, @@ -908,12 +907,12 @@ mod tests { .as_path(), &Settings { src: vec![Path::new("resources/test/fixtures/isort").to_path_buf()], - isort: isort::settings::Settings { + isort: super::settings::Settings { required_imports: BTreeSet::from([ "from __future__ import annotations".to_string(), "from __future__ import generator_stop".to_string(), ]), - ..isort::settings::Settings::default() + ..super::settings::Settings::default() }, ..Settings::for_rule(RuleCode::I002) }, @@ -933,11 +932,11 @@ mod tests { .as_path(), &Settings { src: vec![Path::new("resources/test/fixtures/isort").to_path_buf()], - isort: isort::settings::Settings { + isort: super::settings::Settings { required_imports: BTreeSet::from(["from __future__ import annotations, \ generator_stop" .to_string()]), - ..isort::settings::Settings::default() + ..super::settings::Settings::default() }, ..Settings::for_rule(RuleCode::I002) }, @@ -957,9 +956,9 @@ mod tests { .as_path(), &Settings { src: vec![Path::new("resources/test/fixtures/isort").to_path_buf()], - isort: isort::settings::Settings { + isort: super::settings::Settings { required_imports: BTreeSet::from(["import os".to_string()]), - ..isort::settings::Settings::default() + ..super::settings::Settings::default() }, ..Settings::for_rule(RuleCode::I002) }, @@ -976,9 +975,9 @@ mod tests { .join(path) .as_path(), &Settings { - isort: isort::settings::Settings { + isort: super::settings::Settings { relative_imports_order: RelatveImportsOrder::ClosestToFurthest, - ..isort::settings::Settings::default() + ..super::settings::Settings::default() }, src: vec![Path::new("resources/test/fixtures/isort").to_path_buf()], ..Settings::for_rule(RuleCode::I001) diff --git a/src/isort/rules/add_required_imports.rs b/src/rules/isort/rules/add_required_imports.rs similarity index 99% rename from src/isort/rules/add_required_imports.rs rename to src/rules/isort/rules/add_required_imports.rs index bfe175158d..08f33db722 100644 --- a/src/isort/rules/add_required_imports.rs +++ b/src/rules/isort/rules/add_required_imports.rs @@ -3,11 +3,11 @@ use std::fmt; use log::error; use rustpython_ast::{Location, StmtKind, Suite}; +use super::super::helpers; +use super::super::track::Block; use crate::ast::helpers::is_docstring_stmt; use crate::ast::types::Range; use crate::fix::Fix; -use crate::isort::helpers; -use crate::isort::track::Block; use crate::registry::{Diagnostic, RuleCode}; use crate::settings::{flags, Settings}; use crate::source_code::Locator; diff --git a/src/isort/rules/mod.rs b/src/rules/isort/rules/mod.rs similarity index 100% rename from src/isort/rules/mod.rs rename to src/rules/isort/rules/mod.rs diff --git a/src/isort/rules/organize_imports.rs b/src/rules/isort/rules/organize_imports.rs similarity index 97% rename from src/isort/rules/organize_imports.rs rename to src/rules/isort/rules/organize_imports.rs index 33d3dcf6b6..8b19d7fe00 100644 --- a/src/isort/rules/organize_imports.rs +++ b/src/rules/isort/rules/organize_imports.rs @@ -3,14 +3,14 @@ use std::path::Path; use rustpython_ast::{Location, Stmt}; use textwrap::{dedent, indent}; +use super::super::track::Block; +use super::super::{comments, format_imports}; use crate::ast::helpers::{ count_trailing_lines, followed_by_multi_statement_line, preceded_by_multi_statement_line, }; use crate::ast::types::Range; use crate::ast::whitespace::leading_space; use crate::fix::Fix; -use crate::isort::track::Block; -use crate::isort::{comments, format_imports}; use crate::registry::Diagnostic; use crate::settings::{flags, Settings}; use crate::source_code::{Locator, Stylist}; diff --git a/src/isort/settings.rs b/src/rules/isort/settings.rs similarity index 100% rename from src/isort/settings.rs rename to src/rules/isort/settings.rs diff --git a/src/isort/snapshots/ruff__isort__tests__add_newline_before_comments.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__add_newline_before_comments.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__add_newline_before_comments.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__add_newline_before_comments.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__closest_to_furthest_relative_imports_order.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__closest_to_furthest_relative_imports_order.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__closest_to_furthest_relative_imports_order.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__closest_to_furthest_relative_imports_order.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__combine_as_imports.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__combine_as_imports.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__combine_as_imports.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__combine_as_imports.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__combine_as_imports_combine_as_imports.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__combine_as_imports_combine_as_imports.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__combine_as_imports_combine_as_imports.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__combine_as_imports_combine_as_imports.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__combine_import_from.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__combine_import_from.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__combine_import_from.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__combine_import_from.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__combined_required_imports_docstring.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__combined_required_imports_docstring.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__combined_required_imports_docstring.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__combined_required_imports_docstring.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__combined_required_imports_docstring_only.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__combined_required_imports_docstring_only.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__combined_required_imports_docstring_only.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__combined_required_imports_docstring_only.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__combined_required_imports_empty.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__combined_required_imports_empty.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__combined_required_imports_empty.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__combined_required_imports_empty.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__comments.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__comments.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__comments.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__comments.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__deduplicate_imports.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__deduplicate_imports.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__deduplicate_imports.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__deduplicate_imports.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__fit_line_length.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__fit_line_length.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__fit_line_length.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__fit_line_length.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__fit_line_length_comment.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__fit_line_length_comment.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__fit_line_length_comment.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__fit_line_length_comment.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__force_single_line_force_single_line.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__force_single_line_force_single_line.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__force_single_line_force_single_line.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__force_single_line_force_single_line.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__force_sort_within_sections.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__force_sort_within_sections.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__force_sort_within_sections.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__force_sort_within_sections.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__force_sort_within_sections_force_sort_within_sections.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__force_sort_within_sections_force_sort_within_sections.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__force_sort_within_sections_force_sort_within_sections.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__force_sort_within_sections_force_sort_within_sections.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__force_wrap_aliases.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__force_wrap_aliases.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__force_wrap_aliases.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__force_wrap_aliases.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__force_wrap_aliases_force_wrap_aliases.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__force_wrap_aliases_force_wrap_aliases.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__force_wrap_aliases_force_wrap_aliases.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__force_wrap_aliases_force_wrap_aliases.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__import_from_after_import.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__import_from_after_import.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__import_from_after_import.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__import_from_after_import.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__inline_comments.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__inline_comments.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__inline_comments.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__inline_comments.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__insert_empty_lines.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__insert_empty_lines.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__insert_empty_lines.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__insert_empty_lines.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__insert_empty_lines.pyi.snap b/src/rules/isort/snapshots/ruff__isort__tests__insert_empty_lines.pyi.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__insert_empty_lines.pyi.snap rename to src/rules/isort/snapshots/ruff__isort__tests__insert_empty_lines.pyi.snap diff --git a/src/isort/snapshots/ruff__isort__tests__leading_prefix.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__leading_prefix.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__leading_prefix.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__leading_prefix.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__line_ending_cr.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__line_ending_cr.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__line_ending_cr.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__line_ending_cr.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__line_ending_crlf.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__line_ending_crlf.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__line_ending_crlf.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__line_ending_crlf.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__line_ending_lf.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__line_ending_lf.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__line_ending_lf.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__line_ending_lf.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__magic_trailing_comma.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__magic_trailing_comma.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__magic_trailing_comma.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__magic_trailing_comma.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__natural_order.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__natural_order.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__natural_order.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__natural_order.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__no_reorder_within_section.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__no_reorder_within_section.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__no_reorder_within_section.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__no_reorder_within_section.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__no_wrap_star.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__no_wrap_star.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__no_wrap_star.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__no_wrap_star.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__order_by_type.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__order_by_type.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__order_by_type.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__order_by_type.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__order_by_type_false_order_by_type.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__order_by_type_false_order_by_type.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__order_by_type_false_order_by_type.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__order_by_type_false_order_by_type.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__order_by_type_with_custom_classes.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__order_by_type_with_custom_classes.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__order_by_type_with_custom_classes.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__order_by_type_with_custom_classes.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__order_by_type_with_custom_classes_order_by_type_with_custom_classes.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__order_by_type_with_custom_classes_order_by_type_with_custom_classes.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__order_by_type_with_custom_classes_order_by_type_with_custom_classes.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__order_by_type_with_custom_classes_order_by_type_with_custom_classes.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__order_relative_imports_by_level.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__order_relative_imports_by_level.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__order_relative_imports_by_level.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__order_relative_imports_by_level.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__preserve_comment_order.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__preserve_comment_order.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__preserve_comment_order.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__preserve_comment_order.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__preserve_import_star.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__preserve_import_star.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__preserve_import_star.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__preserve_import_star.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__preserve_indentation.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__preserve_indentation.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__preserve_indentation.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__preserve_indentation.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__relative_imports_order.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__relative_imports_order.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__relative_imports_order.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__relative_imports_order.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__reorder_within_section.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__reorder_within_section.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__reorder_within_section.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__reorder_within_section.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__required_import_docstring.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__required_import_docstring.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__required_import_docstring.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__required_import_docstring.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__required_import_docstring_only.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__required_import_docstring_only.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__required_import_docstring_only.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__required_import_docstring_only.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__required_import_empty.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__required_import_empty.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__required_import_empty.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__required_import_empty.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__required_imports_docstring.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__required_imports_docstring.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__required_imports_docstring.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__required_imports_docstring.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__required_imports_docstring_only.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__required_imports_docstring_only.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__required_imports_docstring_only.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__required_imports_docstring_only.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__required_imports_empty.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__required_imports_empty.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__required_imports_empty.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__required_imports_empty.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__separate_first_party_imports.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__separate_first_party_imports.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__separate_first_party_imports.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__separate_first_party_imports.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__separate_future_imports.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__separate_future_imports.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__separate_future_imports.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__separate_future_imports.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__separate_local_folder_imports.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__separate_local_folder_imports.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__separate_local_folder_imports.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__separate_local_folder_imports.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__separate_third_party_imports.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__separate_third_party_imports.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__separate_third_party_imports.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__separate_third_party_imports.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__skip.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__skip.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__skip.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__skip.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__skip_file.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__skip_file.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__skip_file.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__skip_file.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__sort_similar_imports.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__sort_similar_imports.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__sort_similar_imports.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__sort_similar_imports.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__split.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__split.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__split.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__split.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__split_on_trailing_comma_magic_trailing_comma.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__split_on_trailing_comma_magic_trailing_comma.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__split_on_trailing_comma_magic_trailing_comma.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__split_on_trailing_comma_magic_trailing_comma.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__straight_required_import_docstring.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__straight_required_import_docstring.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__straight_required_import_docstring.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__straight_required_import_docstring.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__straight_required_import_docstring_only.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__straight_required_import_docstring_only.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__straight_required_import_docstring_only.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__straight_required_import_docstring_only.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__straight_required_import_empty.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__straight_required_import_empty.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__straight_required_import_empty.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__straight_required_import_empty.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__trailing_suffix.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__trailing_suffix.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__trailing_suffix.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__trailing_suffix.py.snap diff --git a/src/isort/snapshots/ruff__isort__tests__type_comments.py.snap b/src/rules/isort/snapshots/ruff__isort__tests__type_comments.py.snap similarity index 100% rename from src/isort/snapshots/ruff__isort__tests__type_comments.py.snap rename to src/rules/isort/snapshots/ruff__isort__tests__type_comments.py.snap diff --git a/src/isort/sorting.rs b/src/rules/isort/sorting.rs similarity index 95% rename from src/isort/sorting.rs rename to src/rules/isort/sorting.rs index 3d0b5a1842..9b3f3a62f5 100644 --- a/src/isort/sorting.rs +++ b/src/rules/isort/sorting.rs @@ -2,9 +2,9 @@ use std::cmp::Ordering; use std::collections::BTreeSet; -use crate::isort::settings::RelatveImportsOrder; -use crate::isort::types::EitherImport::{Import, ImportFrom}; -use crate::isort::types::{AliasData, EitherImport, ImportFromData}; +use super::settings::RelatveImportsOrder; +use super::types::EitherImport::{Import, ImportFrom}; +use super::types::{AliasData, EitherImport, ImportFromData}; use crate::python::string; #[derive(PartialOrd, Ord, PartialEq, Eq)] diff --git a/src/isort/track.rs b/src/rules/isort/track.rs similarity index 99% rename from src/isort/track.rs rename to src/rules/isort/track.rs index daf4fe0fac..cf820ff723 100644 --- a/src/isort/track.rs +++ b/src/rules/isort/track.rs @@ -6,9 +6,9 @@ use rustpython_ast::{ Unaryop, Withitem, }; +use super::helpers; use crate::ast::visitor::Visitor; use crate::directives::IsortDirectives; -use crate::isort::helpers; use crate::source_code::Locator; #[derive(Debug)] diff --git a/src/isort/types.rs b/src/rules/isort/types.rs similarity index 100% rename from src/isort/types.rs rename to src/rules/isort/types.rs diff --git a/src/mccabe/mod.rs b/src/rules/mccabe/mod.rs similarity index 88% rename from src/mccabe/mod.rs rename to src/rules/mccabe/mod.rs index d0b1de08e0..12ffd243de 100644 --- a/src/mccabe/mod.rs +++ b/src/rules/mccabe/mod.rs @@ -9,7 +9,6 @@ mod tests { use test_case::test_case; use crate::linter::test_path; - use crate::mccabe; use crate::registry::RuleCode; use crate::settings::Settings; @@ -21,7 +20,7 @@ mod tests { let diagnostics = test_path( Path::new("./resources/test/fixtures/mccabe/C901.py"), &Settings { - mccabe: mccabe::settings::Settings { max_complexity }, + mccabe: super::settings::Settings { max_complexity }, ..Settings::for_rules(vec![RuleCode::C901]) }, )?; diff --git a/src/mccabe/rules.rs b/src/rules/mccabe/rules.rs similarity index 99% rename from src/mccabe/rules.rs rename to src/rules/mccabe/rules.rs index 09ed45594e..c2ea90f3f1 100644 --- a/src/mccabe/rules.rs +++ b/src/rules/mccabe/rules.rs @@ -79,7 +79,7 @@ mod tests { use anyhow::Result; use rustpython_parser::parser; - use crate::mccabe::rules::get_complexity_number; + use super::get_complexity_number; #[test] fn trivial() -> Result<()> { diff --git a/src/mccabe/settings.rs b/src/rules/mccabe/settings.rs similarity index 100% rename from src/mccabe/settings.rs rename to src/rules/mccabe/settings.rs diff --git a/src/mccabe/snapshots/ruff__mccabe__tests__max_complexity_0.snap b/src/rules/mccabe/snapshots/ruff__mccabe__tests__max_complexity_0.snap similarity index 100% rename from src/mccabe/snapshots/ruff__mccabe__tests__max_complexity_0.snap rename to src/rules/mccabe/snapshots/ruff__mccabe__tests__max_complexity_0.snap diff --git a/src/mccabe/snapshots/ruff__mccabe__tests__max_complexity_10.snap b/src/rules/mccabe/snapshots/ruff__mccabe__tests__max_complexity_10.snap similarity index 100% rename from src/mccabe/snapshots/ruff__mccabe__tests__max_complexity_10.snap rename to src/rules/mccabe/snapshots/ruff__mccabe__tests__max_complexity_10.snap diff --git a/src/mccabe/snapshots/ruff__mccabe__tests__max_complexity_3.snap b/src/rules/mccabe/snapshots/ruff__mccabe__tests__max_complexity_3.snap similarity index 100% rename from src/mccabe/snapshots/ruff__mccabe__tests__max_complexity_3.snap rename to src/rules/mccabe/snapshots/ruff__mccabe__tests__max_complexity_3.snap diff --git a/src/rules/mod.rs b/src/rules/mod.rs new file mode 100644 index 0000000000..3c6be79253 --- /dev/null +++ b/src/rules/mod.rs @@ -0,0 +1,33 @@ +pub(crate) mod eradicate; +pub(crate) mod flake8_2020; +pub mod flake8_annotations; +pub mod flake8_bandit; +pub(crate) mod flake8_blind_except; +pub mod flake8_boolean_trap; +pub mod flake8_bugbear; +pub(crate) mod flake8_builtins; +pub(crate) mod flake8_comprehensions; +pub(crate) mod flake8_datetimez; +pub(crate) mod flake8_debugger; +pub mod flake8_errmsg; +pub(crate) mod flake8_implicit_str_concat; +pub(crate) mod flake8_import_conventions; +pub mod flake8_pie; +pub(crate) mod flake8_print; +pub mod flake8_pytest_style; +pub mod flake8_quotes; +pub(crate) mod flake8_return; +pub(crate) mod flake8_simplify; +pub mod flake8_tidy_imports; +pub(crate) mod flake8_unused_arguments; +pub(crate) mod isort; +pub mod mccabe; +pub(crate) mod pandas_vet; +pub mod pep8_naming; +pub(crate) mod pycodestyle; +pub mod pydocstyle; +pub(crate) mod pyflakes; +pub(crate) mod pygrep_hooks; +pub(crate) mod pylint; +pub(crate) mod pyupgrade; +pub(crate) mod ruff; diff --git a/src/pandas_vet/helpers.rs b/src/rules/pandas_vet/helpers.rs similarity index 100% rename from src/pandas_vet/helpers.rs rename to src/rules/pandas_vet/helpers.rs diff --git a/src/pandas_vet/mod.rs b/src/rules/pandas_vet/mod.rs similarity index 100% rename from src/pandas_vet/mod.rs rename to src/rules/pandas_vet/mod.rs diff --git a/src/pandas_vet/rules.rs b/src/rules/pandas_vet/rules.rs similarity index 100% rename from src/pandas_vet/rules.rs rename to src/rules/pandas_vet/rules.rs diff --git a/src/pep8_naming/helpers.rs b/src/rules/pep8_naming/helpers.rs similarity index 95% rename from src/pep8_naming/helpers.rs rename to src/rules/pep8_naming/helpers.rs index bb49cc4978..58a0df0cd6 100644 --- a/src/pep8_naming/helpers.rs +++ b/src/rules/pep8_naming/helpers.rs @@ -33,7 +33,7 @@ pub fn is_namedtuple_assignment(checker: &Checker, stmt: &Stmt) -> bool { #[cfg(test)] mod tests { - use crate::pep8_naming::helpers::{is_acronym, is_camelcase, is_mixed_case}; + use super::{is_acronym, is_camelcase, is_mixed_case}; #[test] fn test_is_camelcase() { diff --git a/src/pep8_naming/mod.rs b/src/rules/pep8_naming/mod.rs similarity index 100% rename from src/pep8_naming/mod.rs rename to src/rules/pep8_naming/mod.rs diff --git a/src/pep8_naming/rules.rs b/src/rules/pep8_naming/rules.rs similarity index 99% rename from src/pep8_naming/rules.rs rename to src/rules/pep8_naming/rules.rs index e2d07bb42d..38c432b0de 100644 --- a/src/pep8_naming/rules.rs +++ b/src/rules/pep8_naming/rules.rs @@ -1,10 +1,10 @@ use rustpython_ast::{Arg, Arguments, Expr, ExprKind, Stmt}; +use super::helpers; use crate::ast::function_type; use crate::ast::helpers::identifier_range; use crate::ast::types::{Range, Scope, ScopeKind}; use crate::checkers::ast::Checker; -use crate::pep8_naming::helpers; use crate::python::string::{self}; use crate::registry::Diagnostic; use crate::source_code::Locator; diff --git a/src/pep8_naming/settings.rs b/src/rules/pep8_naming/settings.rs similarity index 100% rename from src/pep8_naming/settings.rs rename to src/rules/pep8_naming/settings.rs diff --git a/src/pep8_naming/snapshots/ruff__pep8_naming__tests__N801_N801.py.snap b/src/rules/pep8_naming/snapshots/ruff__pep8_naming__tests__N801_N801.py.snap similarity index 100% rename from src/pep8_naming/snapshots/ruff__pep8_naming__tests__N801_N801.py.snap rename to src/rules/pep8_naming/snapshots/ruff__pep8_naming__tests__N801_N801.py.snap diff --git a/src/pep8_naming/snapshots/ruff__pep8_naming__tests__N802_N802.py.snap b/src/rules/pep8_naming/snapshots/ruff__pep8_naming__tests__N802_N802.py.snap similarity index 100% rename from src/pep8_naming/snapshots/ruff__pep8_naming__tests__N802_N802.py.snap rename to src/rules/pep8_naming/snapshots/ruff__pep8_naming__tests__N802_N802.py.snap diff --git a/src/pep8_naming/snapshots/ruff__pep8_naming__tests__N803_N803.py.snap b/src/rules/pep8_naming/snapshots/ruff__pep8_naming__tests__N803_N803.py.snap similarity index 100% rename from src/pep8_naming/snapshots/ruff__pep8_naming__tests__N803_N803.py.snap rename to src/rules/pep8_naming/snapshots/ruff__pep8_naming__tests__N803_N803.py.snap diff --git a/src/pep8_naming/snapshots/ruff__pep8_naming__tests__N804_N804.py.snap b/src/rules/pep8_naming/snapshots/ruff__pep8_naming__tests__N804_N804.py.snap similarity index 100% rename from src/pep8_naming/snapshots/ruff__pep8_naming__tests__N804_N804.py.snap rename to src/rules/pep8_naming/snapshots/ruff__pep8_naming__tests__N804_N804.py.snap diff --git a/src/pep8_naming/snapshots/ruff__pep8_naming__tests__N805_N805.py.snap b/src/rules/pep8_naming/snapshots/ruff__pep8_naming__tests__N805_N805.py.snap similarity index 100% rename from src/pep8_naming/snapshots/ruff__pep8_naming__tests__N805_N805.py.snap rename to src/rules/pep8_naming/snapshots/ruff__pep8_naming__tests__N805_N805.py.snap diff --git a/src/pep8_naming/snapshots/ruff__pep8_naming__tests__N806_N806.py.snap b/src/rules/pep8_naming/snapshots/ruff__pep8_naming__tests__N806_N806.py.snap similarity index 100% rename from src/pep8_naming/snapshots/ruff__pep8_naming__tests__N806_N806.py.snap rename to src/rules/pep8_naming/snapshots/ruff__pep8_naming__tests__N806_N806.py.snap diff --git a/src/pep8_naming/snapshots/ruff__pep8_naming__tests__N807_N807.py.snap b/src/rules/pep8_naming/snapshots/ruff__pep8_naming__tests__N807_N807.py.snap similarity index 100% rename from src/pep8_naming/snapshots/ruff__pep8_naming__tests__N807_N807.py.snap rename to src/rules/pep8_naming/snapshots/ruff__pep8_naming__tests__N807_N807.py.snap diff --git a/src/pep8_naming/snapshots/ruff__pep8_naming__tests__N811_N811.py.snap b/src/rules/pep8_naming/snapshots/ruff__pep8_naming__tests__N811_N811.py.snap similarity index 100% rename from src/pep8_naming/snapshots/ruff__pep8_naming__tests__N811_N811.py.snap rename to src/rules/pep8_naming/snapshots/ruff__pep8_naming__tests__N811_N811.py.snap diff --git a/src/pep8_naming/snapshots/ruff__pep8_naming__tests__N812_N812.py.snap b/src/rules/pep8_naming/snapshots/ruff__pep8_naming__tests__N812_N812.py.snap similarity index 100% rename from src/pep8_naming/snapshots/ruff__pep8_naming__tests__N812_N812.py.snap rename to src/rules/pep8_naming/snapshots/ruff__pep8_naming__tests__N812_N812.py.snap diff --git a/src/pep8_naming/snapshots/ruff__pep8_naming__tests__N813_N813.py.snap b/src/rules/pep8_naming/snapshots/ruff__pep8_naming__tests__N813_N813.py.snap similarity index 100% rename from src/pep8_naming/snapshots/ruff__pep8_naming__tests__N813_N813.py.snap rename to src/rules/pep8_naming/snapshots/ruff__pep8_naming__tests__N813_N813.py.snap diff --git a/src/pep8_naming/snapshots/ruff__pep8_naming__tests__N814_N814.py.snap b/src/rules/pep8_naming/snapshots/ruff__pep8_naming__tests__N814_N814.py.snap similarity index 100% rename from src/pep8_naming/snapshots/ruff__pep8_naming__tests__N814_N814.py.snap rename to src/rules/pep8_naming/snapshots/ruff__pep8_naming__tests__N814_N814.py.snap diff --git a/src/pep8_naming/snapshots/ruff__pep8_naming__tests__N815_N815.py.snap b/src/rules/pep8_naming/snapshots/ruff__pep8_naming__tests__N815_N815.py.snap similarity index 100% rename from src/pep8_naming/snapshots/ruff__pep8_naming__tests__N815_N815.py.snap rename to src/rules/pep8_naming/snapshots/ruff__pep8_naming__tests__N815_N815.py.snap diff --git a/src/pep8_naming/snapshots/ruff__pep8_naming__tests__N816_N816.py.snap b/src/rules/pep8_naming/snapshots/ruff__pep8_naming__tests__N816_N816.py.snap similarity index 100% rename from src/pep8_naming/snapshots/ruff__pep8_naming__tests__N816_N816.py.snap rename to src/rules/pep8_naming/snapshots/ruff__pep8_naming__tests__N816_N816.py.snap diff --git a/src/pep8_naming/snapshots/ruff__pep8_naming__tests__N817_N817.py.snap b/src/rules/pep8_naming/snapshots/ruff__pep8_naming__tests__N817_N817.py.snap similarity index 100% rename from src/pep8_naming/snapshots/ruff__pep8_naming__tests__N817_N817.py.snap rename to src/rules/pep8_naming/snapshots/ruff__pep8_naming__tests__N817_N817.py.snap diff --git a/src/pep8_naming/snapshots/ruff__pep8_naming__tests__N818_N818.py.snap b/src/rules/pep8_naming/snapshots/ruff__pep8_naming__tests__N818_N818.py.snap similarity index 100% rename from src/pep8_naming/snapshots/ruff__pep8_naming__tests__N818_N818.py.snap rename to src/rules/pep8_naming/snapshots/ruff__pep8_naming__tests__N818_N818.py.snap diff --git a/src/pycodestyle/mod.rs b/src/rules/pycodestyle/mod.rs similarity index 100% rename from src/pycodestyle/mod.rs rename to src/rules/pycodestyle/mod.rs diff --git a/src/pycodestyle/rules.rs b/src/rules/pycodestyle/rules.rs similarity index 100% rename from src/pycodestyle/rules.rs rename to src/rules/pycodestyle/rules.rs diff --git a/src/pycodestyle/settings.rs b/src/rules/pycodestyle/settings.rs similarity index 100% rename from src/pycodestyle/settings.rs rename to src/rules/pycodestyle/settings.rs diff --git a/src/pycodestyle/snapshots/ruff__pycodestyle__tests__E401_E40.py.snap b/src/rules/pycodestyle/snapshots/ruff__pycodestyle__tests__E401_E40.py.snap similarity index 100% rename from src/pycodestyle/snapshots/ruff__pycodestyle__tests__E401_E40.py.snap rename to src/rules/pycodestyle/snapshots/ruff__pycodestyle__tests__E401_E40.py.snap diff --git a/src/pycodestyle/snapshots/ruff__pycodestyle__tests__E402_E40.py.snap b/src/rules/pycodestyle/snapshots/ruff__pycodestyle__tests__E402_E40.py.snap similarity index 100% rename from src/pycodestyle/snapshots/ruff__pycodestyle__tests__E402_E40.py.snap rename to src/rules/pycodestyle/snapshots/ruff__pycodestyle__tests__E402_E40.py.snap diff --git a/src/pycodestyle/snapshots/ruff__pycodestyle__tests__E402_E402.py.snap b/src/rules/pycodestyle/snapshots/ruff__pycodestyle__tests__E402_E402.py.snap similarity index 100% rename from src/pycodestyle/snapshots/ruff__pycodestyle__tests__E402_E402.py.snap rename to src/rules/pycodestyle/snapshots/ruff__pycodestyle__tests__E402_E402.py.snap diff --git a/src/pycodestyle/snapshots/ruff__pycodestyle__tests__E501_E501.py.snap b/src/rules/pycodestyle/snapshots/ruff__pycodestyle__tests__E501_E501.py.snap similarity index 100% rename from src/pycodestyle/snapshots/ruff__pycodestyle__tests__E501_E501.py.snap rename to src/rules/pycodestyle/snapshots/ruff__pycodestyle__tests__E501_E501.py.snap diff --git a/src/pycodestyle/snapshots/ruff__pycodestyle__tests__E711_E711.py.snap b/src/rules/pycodestyle/snapshots/ruff__pycodestyle__tests__E711_E711.py.snap similarity index 100% rename from src/pycodestyle/snapshots/ruff__pycodestyle__tests__E711_E711.py.snap rename to src/rules/pycodestyle/snapshots/ruff__pycodestyle__tests__E711_E711.py.snap diff --git a/src/pycodestyle/snapshots/ruff__pycodestyle__tests__E712_E712.py.snap b/src/rules/pycodestyle/snapshots/ruff__pycodestyle__tests__E712_E712.py.snap similarity index 100% rename from src/pycodestyle/snapshots/ruff__pycodestyle__tests__E712_E712.py.snap rename to src/rules/pycodestyle/snapshots/ruff__pycodestyle__tests__E712_E712.py.snap diff --git a/src/pycodestyle/snapshots/ruff__pycodestyle__tests__E713_E713.py.snap b/src/rules/pycodestyle/snapshots/ruff__pycodestyle__tests__E713_E713.py.snap similarity index 100% rename from src/pycodestyle/snapshots/ruff__pycodestyle__tests__E713_E713.py.snap rename to src/rules/pycodestyle/snapshots/ruff__pycodestyle__tests__E713_E713.py.snap diff --git a/src/pycodestyle/snapshots/ruff__pycodestyle__tests__E714_E714.py.snap b/src/rules/pycodestyle/snapshots/ruff__pycodestyle__tests__E714_E714.py.snap similarity index 100% rename from src/pycodestyle/snapshots/ruff__pycodestyle__tests__E714_E714.py.snap rename to src/rules/pycodestyle/snapshots/ruff__pycodestyle__tests__E714_E714.py.snap diff --git a/src/pycodestyle/snapshots/ruff__pycodestyle__tests__E721_E721.py.snap b/src/rules/pycodestyle/snapshots/ruff__pycodestyle__tests__E721_E721.py.snap similarity index 100% rename from src/pycodestyle/snapshots/ruff__pycodestyle__tests__E721_E721.py.snap rename to src/rules/pycodestyle/snapshots/ruff__pycodestyle__tests__E721_E721.py.snap diff --git a/src/pycodestyle/snapshots/ruff__pycodestyle__tests__E722_E722.py.snap b/src/rules/pycodestyle/snapshots/ruff__pycodestyle__tests__E722_E722.py.snap similarity index 100% rename from src/pycodestyle/snapshots/ruff__pycodestyle__tests__E722_E722.py.snap rename to src/rules/pycodestyle/snapshots/ruff__pycodestyle__tests__E722_E722.py.snap diff --git a/src/pycodestyle/snapshots/ruff__pycodestyle__tests__E731_E731.py.snap b/src/rules/pycodestyle/snapshots/ruff__pycodestyle__tests__E731_E731.py.snap similarity index 100% rename from src/pycodestyle/snapshots/ruff__pycodestyle__tests__E731_E731.py.snap rename to src/rules/pycodestyle/snapshots/ruff__pycodestyle__tests__E731_E731.py.snap diff --git a/src/pycodestyle/snapshots/ruff__pycodestyle__tests__E741_E741.py.snap b/src/rules/pycodestyle/snapshots/ruff__pycodestyle__tests__E741_E741.py.snap similarity index 100% rename from src/pycodestyle/snapshots/ruff__pycodestyle__tests__E741_E741.py.snap rename to src/rules/pycodestyle/snapshots/ruff__pycodestyle__tests__E741_E741.py.snap diff --git a/src/pycodestyle/snapshots/ruff__pycodestyle__tests__E742_E742.py.snap b/src/rules/pycodestyle/snapshots/ruff__pycodestyle__tests__E742_E742.py.snap similarity index 100% rename from src/pycodestyle/snapshots/ruff__pycodestyle__tests__E742_E742.py.snap rename to src/rules/pycodestyle/snapshots/ruff__pycodestyle__tests__E742_E742.py.snap diff --git a/src/pycodestyle/snapshots/ruff__pycodestyle__tests__E743_E743.py.snap b/src/rules/pycodestyle/snapshots/ruff__pycodestyle__tests__E743_E743.py.snap similarity index 100% rename from src/pycodestyle/snapshots/ruff__pycodestyle__tests__E743_E743.py.snap rename to src/rules/pycodestyle/snapshots/ruff__pycodestyle__tests__E743_E743.py.snap diff --git a/src/pycodestyle/snapshots/ruff__pycodestyle__tests__E999_E999.py.snap b/src/rules/pycodestyle/snapshots/ruff__pycodestyle__tests__E999_E999.py.snap similarity index 100% rename from src/pycodestyle/snapshots/ruff__pycodestyle__tests__E999_E999.py.snap rename to src/rules/pycodestyle/snapshots/ruff__pycodestyle__tests__E999_E999.py.snap diff --git a/src/pycodestyle/snapshots/ruff__pycodestyle__tests__W292_W292_0.py.snap b/src/rules/pycodestyle/snapshots/ruff__pycodestyle__tests__W292_W292_0.py.snap similarity index 100% rename from src/pycodestyle/snapshots/ruff__pycodestyle__tests__W292_W292_0.py.snap rename to src/rules/pycodestyle/snapshots/ruff__pycodestyle__tests__W292_W292_0.py.snap diff --git a/src/pycodestyle/snapshots/ruff__pycodestyle__tests__W292_W292_1.py.snap b/src/rules/pycodestyle/snapshots/ruff__pycodestyle__tests__W292_W292_1.py.snap similarity index 100% rename from src/pycodestyle/snapshots/ruff__pycodestyle__tests__W292_W292_1.py.snap rename to src/rules/pycodestyle/snapshots/ruff__pycodestyle__tests__W292_W292_1.py.snap diff --git a/src/pycodestyle/snapshots/ruff__pycodestyle__tests__W292_W292_2.py.snap b/src/rules/pycodestyle/snapshots/ruff__pycodestyle__tests__W292_W292_2.py.snap similarity index 100% rename from src/pycodestyle/snapshots/ruff__pycodestyle__tests__W292_W292_2.py.snap rename to src/rules/pycodestyle/snapshots/ruff__pycodestyle__tests__W292_W292_2.py.snap diff --git a/src/pycodestyle/snapshots/ruff__pycodestyle__tests__W292_W292_3.py.snap b/src/rules/pycodestyle/snapshots/ruff__pycodestyle__tests__W292_W292_3.py.snap similarity index 100% rename from src/pycodestyle/snapshots/ruff__pycodestyle__tests__W292_W292_3.py.snap rename to src/rules/pycodestyle/snapshots/ruff__pycodestyle__tests__W292_W292_3.py.snap diff --git a/src/pycodestyle/snapshots/ruff__pycodestyle__tests__W292_W292_4.py.snap b/src/rules/pycodestyle/snapshots/ruff__pycodestyle__tests__W292_W292_4.py.snap similarity index 100% rename from src/pycodestyle/snapshots/ruff__pycodestyle__tests__W292_W292_4.py.snap rename to src/rules/pycodestyle/snapshots/ruff__pycodestyle__tests__W292_W292_4.py.snap diff --git a/src/pycodestyle/snapshots/ruff__pycodestyle__tests__W605_W605_0.py.snap b/src/rules/pycodestyle/snapshots/ruff__pycodestyle__tests__W605_W605_0.py.snap similarity index 100% rename from src/pycodestyle/snapshots/ruff__pycodestyle__tests__W605_W605_0.py.snap rename to src/rules/pycodestyle/snapshots/ruff__pycodestyle__tests__W605_W605_0.py.snap diff --git a/src/pycodestyle/snapshots/ruff__pycodestyle__tests__W605_W605_1.py.snap b/src/rules/pycodestyle/snapshots/ruff__pycodestyle__tests__W605_W605_1.py.snap similarity index 100% rename from src/pycodestyle/snapshots/ruff__pycodestyle__tests__W605_W605_1.py.snap rename to src/rules/pycodestyle/snapshots/ruff__pycodestyle__tests__W605_W605_1.py.snap diff --git a/src/pycodestyle/snapshots/ruff__pycodestyle__tests__constant_literals.snap b/src/rules/pycodestyle/snapshots/ruff__pycodestyle__tests__constant_literals.snap similarity index 100% rename from src/pycodestyle/snapshots/ruff__pycodestyle__tests__constant_literals.snap rename to src/rules/pycodestyle/snapshots/ruff__pycodestyle__tests__constant_literals.snap diff --git a/src/pycodestyle/snapshots/ruff__pycodestyle__tests__max_doc_length.snap b/src/rules/pycodestyle/snapshots/ruff__pycodestyle__tests__max_doc_length.snap similarity index 100% rename from src/pycodestyle/snapshots/ruff__pycodestyle__tests__max_doc_length.snap rename to src/rules/pycodestyle/snapshots/ruff__pycodestyle__tests__max_doc_length.snap diff --git a/src/pycodestyle/snapshots/ruff__pycodestyle__tests__task_tags_false.snap b/src/rules/pycodestyle/snapshots/ruff__pycodestyle__tests__task_tags_false.snap similarity index 100% rename from src/pycodestyle/snapshots/ruff__pycodestyle__tests__task_tags_false.snap rename to src/rules/pycodestyle/snapshots/ruff__pycodestyle__tests__task_tags_false.snap diff --git a/src/pycodestyle/snapshots/ruff__pycodestyle__tests__task_tags_true.snap b/src/rules/pycodestyle/snapshots/ruff__pycodestyle__tests__task_tags_true.snap similarity index 100% rename from src/pycodestyle/snapshots/ruff__pycodestyle__tests__task_tags_true.snap rename to src/rules/pycodestyle/snapshots/ruff__pycodestyle__tests__task_tags_true.snap diff --git a/src/pydocstyle/helpers.rs b/src/rules/pydocstyle/helpers.rs similarity index 100% rename from src/pydocstyle/helpers.rs rename to src/rules/pydocstyle/helpers.rs diff --git a/src/pydocstyle/mod.rs b/src/rules/pydocstyle/mod.rs similarity index 98% rename from src/pydocstyle/mod.rs rename to src/rules/pydocstyle/mod.rs index 85d004193c..1a7edb5848 100644 --- a/src/pydocstyle/mod.rs +++ b/src/rules/pydocstyle/mod.rs @@ -10,8 +10,8 @@ mod tests { use anyhow::Result; use test_case::test_case; + use super::settings::{Convention, Settings}; use crate::linter::test_path; - use crate::pydocstyle::settings::{Convention, Settings}; use crate::registry::RuleCode; use crate::settings; diff --git a/src/pydocstyle/rules.rs b/src/rules/pydocstyle/rules.rs similarity index 99% rename from src/pydocstyle/rules.rs rename to src/rules/pydocstyle/rules.rs index df57f75abf..05af25d8f1 100644 --- a/src/pydocstyle/rules.rs +++ b/src/rules/pydocstyle/rules.rs @@ -4,6 +4,8 @@ use regex::Regex; use rustc_hash::FxHashSet; use rustpython_ast::{Location, StmtKind}; +use super::helpers::{leading_quote, logical_line}; +use super::settings::Convention; use crate::ast::helpers::identifier_range; use crate::ast::types::Range; use crate::ast::whitespace::LinesWithTrailingNewline; @@ -14,8 +16,6 @@ use crate::docstrings::definition::{Definition, DefinitionKind, Docstring}; use crate::docstrings::sections::{section_contexts, SectionContext}; use crate::docstrings::styles::SectionStyle; use crate::fix::Fix; -use crate::pydocstyle::helpers::{leading_quote, logical_line}; -use crate::pydocstyle::settings::Convention; use crate::registry::{Diagnostic, RuleCode}; use crate::violations; use crate::visibility::{ diff --git a/src/pydocstyle/settings.rs b/src/rules/pydocstyle/settings.rs similarity index 100% rename from src/pydocstyle/settings.rs rename to src/rules/pydocstyle/settings.rs diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D100_D.py.snap b/src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D100_D.py.snap similarity index 100% rename from src/pydocstyle/snapshots/ruff__pydocstyle__tests__D100_D.py.snap rename to src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D100_D.py.snap diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D101_D.py.snap b/src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D101_D.py.snap similarity index 100% rename from src/pydocstyle/snapshots/ruff__pydocstyle__tests__D101_D.py.snap rename to src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D101_D.py.snap diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D102_D.py.snap b/src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D102_D.py.snap similarity index 100% rename from src/pydocstyle/snapshots/ruff__pydocstyle__tests__D102_D.py.snap rename to src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D102_D.py.snap diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D103_D.py.snap b/src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D103_D.py.snap similarity index 100% rename from src/pydocstyle/snapshots/ruff__pydocstyle__tests__D103_D.py.snap rename to src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D103_D.py.snap diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D104_D.py.snap b/src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D104_D.py.snap similarity index 100% rename from src/pydocstyle/snapshots/ruff__pydocstyle__tests__D104_D.py.snap rename to src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D104_D.py.snap diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D104_D104____init__.py.snap b/src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D104_D104____init__.py.snap similarity index 100% rename from src/pydocstyle/snapshots/ruff__pydocstyle__tests__D104_D104____init__.py.snap rename to src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D104_D104____init__.py.snap diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D105_D.py.snap b/src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D105_D.py.snap similarity index 100% rename from src/pydocstyle/snapshots/ruff__pydocstyle__tests__D105_D.py.snap rename to src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D105_D.py.snap diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D106_D.py.snap b/src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D106_D.py.snap similarity index 100% rename from src/pydocstyle/snapshots/ruff__pydocstyle__tests__D106_D.py.snap rename to src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D106_D.py.snap diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D107_D.py.snap b/src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D107_D.py.snap similarity index 100% rename from src/pydocstyle/snapshots/ruff__pydocstyle__tests__D107_D.py.snap rename to src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D107_D.py.snap diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D201_D.py.snap b/src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D201_D.py.snap similarity index 100% rename from src/pydocstyle/snapshots/ruff__pydocstyle__tests__D201_D.py.snap rename to src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D201_D.py.snap diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D202_D.py.snap b/src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D202_D.py.snap similarity index 100% rename from src/pydocstyle/snapshots/ruff__pydocstyle__tests__D202_D.py.snap rename to src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D202_D.py.snap diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D203_D.py.snap b/src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D203_D.py.snap similarity index 100% rename from src/pydocstyle/snapshots/ruff__pydocstyle__tests__D203_D.py.snap rename to src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D203_D.py.snap diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D204_D.py.snap b/src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D204_D.py.snap similarity index 100% rename from src/pydocstyle/snapshots/ruff__pydocstyle__tests__D204_D.py.snap rename to src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D204_D.py.snap diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D205_D.py.snap b/src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D205_D.py.snap similarity index 100% rename from src/pydocstyle/snapshots/ruff__pydocstyle__tests__D205_D.py.snap rename to src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D205_D.py.snap diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D206_D.py.snap b/src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D206_D.py.snap similarity index 100% rename from src/pydocstyle/snapshots/ruff__pydocstyle__tests__D206_D.py.snap rename to src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D206_D.py.snap diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D207_D.py.snap b/src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D207_D.py.snap similarity index 100% rename from src/pydocstyle/snapshots/ruff__pydocstyle__tests__D207_D.py.snap rename to src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D207_D.py.snap diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D208_D.py.snap b/src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D208_D.py.snap similarity index 100% rename from src/pydocstyle/snapshots/ruff__pydocstyle__tests__D208_D.py.snap rename to src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D208_D.py.snap diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D209_D.py.snap b/src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D209_D.py.snap similarity index 100% rename from src/pydocstyle/snapshots/ruff__pydocstyle__tests__D209_D.py.snap rename to src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D209_D.py.snap diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D210_D.py.snap b/src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D210_D.py.snap similarity index 100% rename from src/pydocstyle/snapshots/ruff__pydocstyle__tests__D210_D.py.snap rename to src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D210_D.py.snap diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D211_D.py.snap b/src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D211_D.py.snap similarity index 100% rename from src/pydocstyle/snapshots/ruff__pydocstyle__tests__D211_D.py.snap rename to src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D211_D.py.snap diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D212_D.py.snap b/src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D212_D.py.snap similarity index 100% rename from src/pydocstyle/snapshots/ruff__pydocstyle__tests__D212_D.py.snap rename to src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D212_D.py.snap diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D213_D.py.snap b/src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D213_D.py.snap similarity index 100% rename from src/pydocstyle/snapshots/ruff__pydocstyle__tests__D213_D.py.snap rename to src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D213_D.py.snap diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D214_sections.py.snap b/src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D214_sections.py.snap similarity index 100% rename from src/pydocstyle/snapshots/ruff__pydocstyle__tests__D214_sections.py.snap rename to src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D214_sections.py.snap diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D215_sections.py.snap b/src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D215_sections.py.snap similarity index 100% rename from src/pydocstyle/snapshots/ruff__pydocstyle__tests__D215_sections.py.snap rename to src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D215_sections.py.snap diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D300_D.py.snap b/src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D300_D.py.snap similarity index 100% rename from src/pydocstyle/snapshots/ruff__pydocstyle__tests__D300_D.py.snap rename to src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D300_D.py.snap diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D301_D.py.snap b/src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D301_D.py.snap similarity index 100% rename from src/pydocstyle/snapshots/ruff__pydocstyle__tests__D301_D.py.snap rename to src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D301_D.py.snap diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D400_D.py.snap b/src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D400_D.py.snap similarity index 100% rename from src/pydocstyle/snapshots/ruff__pydocstyle__tests__D400_D.py.snap rename to src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D400_D.py.snap diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D400_D400.py.snap b/src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D400_D400.py.snap similarity index 100% rename from src/pydocstyle/snapshots/ruff__pydocstyle__tests__D400_D400.py.snap rename to src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D400_D400.py.snap diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D402_D.py.snap b/src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D402_D.py.snap similarity index 100% rename from src/pydocstyle/snapshots/ruff__pydocstyle__tests__D402_D.py.snap rename to src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D402_D.py.snap diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D403_D.py.snap b/src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D403_D.py.snap similarity index 100% rename from src/pydocstyle/snapshots/ruff__pydocstyle__tests__D403_D.py.snap rename to src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D403_D.py.snap diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D404_D.py.snap b/src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D404_D.py.snap similarity index 100% rename from src/pydocstyle/snapshots/ruff__pydocstyle__tests__D404_D.py.snap rename to src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D404_D.py.snap diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D405_sections.py.snap b/src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D405_sections.py.snap similarity index 100% rename from src/pydocstyle/snapshots/ruff__pydocstyle__tests__D405_sections.py.snap rename to src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D405_sections.py.snap diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D406_sections.py.snap b/src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D406_sections.py.snap similarity index 100% rename from src/pydocstyle/snapshots/ruff__pydocstyle__tests__D406_sections.py.snap rename to src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D406_sections.py.snap diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D407_sections.py.snap b/src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D407_sections.py.snap similarity index 100% rename from src/pydocstyle/snapshots/ruff__pydocstyle__tests__D407_sections.py.snap rename to src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D407_sections.py.snap diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D408_sections.py.snap b/src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D408_sections.py.snap similarity index 100% rename from src/pydocstyle/snapshots/ruff__pydocstyle__tests__D408_sections.py.snap rename to src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D408_sections.py.snap diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D409_sections.py.snap b/src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D409_sections.py.snap similarity index 100% rename from src/pydocstyle/snapshots/ruff__pydocstyle__tests__D409_sections.py.snap rename to src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D409_sections.py.snap diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D410_sections.py.snap b/src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D410_sections.py.snap similarity index 100% rename from src/pydocstyle/snapshots/ruff__pydocstyle__tests__D410_sections.py.snap rename to src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D410_sections.py.snap diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D411_sections.py.snap b/src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D411_sections.py.snap similarity index 100% rename from src/pydocstyle/snapshots/ruff__pydocstyle__tests__D411_sections.py.snap rename to src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D411_sections.py.snap diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D412_sections.py.snap b/src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D412_sections.py.snap similarity index 100% rename from src/pydocstyle/snapshots/ruff__pydocstyle__tests__D412_sections.py.snap rename to src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D412_sections.py.snap diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D413_sections.py.snap b/src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D413_sections.py.snap similarity index 100% rename from src/pydocstyle/snapshots/ruff__pydocstyle__tests__D413_sections.py.snap rename to src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D413_sections.py.snap diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D414_sections.py.snap b/src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D414_sections.py.snap similarity index 100% rename from src/pydocstyle/snapshots/ruff__pydocstyle__tests__D414_sections.py.snap rename to src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D414_sections.py.snap diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D415_D.py.snap b/src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D415_D.py.snap similarity index 100% rename from src/pydocstyle/snapshots/ruff__pydocstyle__tests__D415_D.py.snap rename to src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D415_D.py.snap diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D416_D.py.snap b/src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D416_D.py.snap similarity index 100% rename from src/pydocstyle/snapshots/ruff__pydocstyle__tests__D416_D.py.snap rename to src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D416_D.py.snap diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D417_canonical_google_examples.py.snap b/src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D417_canonical_google_examples.py.snap similarity index 100% rename from src/pydocstyle/snapshots/ruff__pydocstyle__tests__D417_canonical_google_examples.py.snap rename to src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D417_canonical_google_examples.py.snap diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D417_canonical_numpy_examples.py.snap b/src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D417_canonical_numpy_examples.py.snap similarity index 100% rename from src/pydocstyle/snapshots/ruff__pydocstyle__tests__D417_canonical_numpy_examples.py.snap rename to src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D417_canonical_numpy_examples.py.snap diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D417_sections.py.snap b/src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D417_sections.py.snap similarity index 100% rename from src/pydocstyle/snapshots/ruff__pydocstyle__tests__D417_sections.py.snap rename to src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D417_sections.py.snap diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D418_D.py.snap b/src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D418_D.py.snap similarity index 100% rename from src/pydocstyle/snapshots/ruff__pydocstyle__tests__D418_D.py.snap rename to src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D418_D.py.snap diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__D419_D.py.snap b/src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D419_D.py.snap similarity index 100% rename from src/pydocstyle/snapshots/ruff__pydocstyle__tests__D419_D.py.snap rename to src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__D419_D.py.snap diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__d417_google.snap b/src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__d417_google.snap similarity index 100% rename from src/pydocstyle/snapshots/ruff__pydocstyle__tests__d417_google.snap rename to src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__d417_google.snap diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__d417_numpy.snap b/src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__d417_numpy.snap similarity index 100% rename from src/pydocstyle/snapshots/ruff__pydocstyle__tests__d417_numpy.snap rename to src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__d417_numpy.snap diff --git a/src/pydocstyle/snapshots/ruff__pydocstyle__tests__d417_unspecified.snap b/src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__d417_unspecified.snap similarity index 100% rename from src/pydocstyle/snapshots/ruff__pydocstyle__tests__d417_unspecified.snap rename to src/rules/pydocstyle/snapshots/ruff__pydocstyle__tests__d417_unspecified.snap diff --git a/src/pyflakes/cformat.rs b/src/rules/pyflakes/cformat.rs similarity index 100% rename from src/pyflakes/cformat.rs rename to src/rules/pyflakes/cformat.rs diff --git a/src/pyflakes/fixes.rs b/src/rules/pyflakes/fixes.rs similarity index 100% rename from src/pyflakes/fixes.rs rename to src/rules/pyflakes/fixes.rs diff --git a/src/pyflakes/format.rs b/src/rules/pyflakes/format.rs similarity index 100% rename from src/pyflakes/format.rs rename to src/rules/pyflakes/format.rs diff --git a/src/pyflakes/mod.rs b/src/rules/pyflakes/mod.rs similarity index 100% rename from src/pyflakes/mod.rs rename to src/rules/pyflakes/mod.rs diff --git a/src/pyflakes/rules/assert_tuple.rs b/src/rules/pyflakes/rules/assert_tuple.rs similarity index 100% rename from src/pyflakes/rules/assert_tuple.rs rename to src/rules/pyflakes/rules/assert_tuple.rs diff --git a/src/pyflakes/rules/f_string_missing_placeholders.rs b/src/rules/pyflakes/rules/f_string_missing_placeholders.rs similarity index 100% rename from src/pyflakes/rules/f_string_missing_placeholders.rs rename to src/rules/pyflakes/rules/f_string_missing_placeholders.rs diff --git a/src/pyflakes/rules/if_tuple.rs b/src/rules/pyflakes/rules/if_tuple.rs similarity index 100% rename from src/pyflakes/rules/if_tuple.rs rename to src/rules/pyflakes/rules/if_tuple.rs diff --git a/src/pyflakes/rules/invalid_literal_comparisons.rs b/src/rules/pyflakes/rules/invalid_literal_comparisons.rs similarity index 100% rename from src/pyflakes/rules/invalid_literal_comparisons.rs rename to src/rules/pyflakes/rules/invalid_literal_comparisons.rs diff --git a/src/pyflakes/rules/invalid_print_syntax.rs b/src/rules/pyflakes/rules/invalid_print_syntax.rs similarity index 100% rename from src/pyflakes/rules/invalid_print_syntax.rs rename to src/rules/pyflakes/rules/invalid_print_syntax.rs diff --git a/src/pyflakes/rules/mod.rs b/src/rules/pyflakes/rules/mod.rs similarity index 100% rename from src/pyflakes/rules/mod.rs rename to src/rules/pyflakes/rules/mod.rs diff --git a/src/pyflakes/rules/raise_not_implemented.rs b/src/rules/pyflakes/rules/raise_not_implemented.rs similarity index 100% rename from src/pyflakes/rules/raise_not_implemented.rs rename to src/rules/pyflakes/rules/raise_not_implemented.rs diff --git a/src/pyflakes/rules/repeated_keys.rs b/src/rules/pyflakes/rules/repeated_keys.rs similarity index 100% rename from src/pyflakes/rules/repeated_keys.rs rename to src/rules/pyflakes/rules/repeated_keys.rs diff --git a/src/pyflakes/rules/strings.rs b/src/rules/pyflakes/rules/strings.rs similarity index 98% rename from src/pyflakes/rules/strings.rs rename to src/rules/pyflakes/rules/strings.rs index 5e0145e5d2..e7b6ad58ab 100644 --- a/src/pyflakes/rules/strings.rs +++ b/src/rules/pyflakes/rules/strings.rs @@ -5,13 +5,13 @@ use rustc_hash::FxHashSet; use rustpython_ast::{Keyword, KeywordData}; use rustpython_parser::ast::{Constant, Expr, ExprKind}; -use crate::ast::types::Range; -use crate::checkers::ast::Checker; -use crate::pyflakes::cformat::CFormatSummary; -use crate::pyflakes::fixes::{ +use super::super::cformat::CFormatSummary; +use super::super::fixes::{ remove_unused_format_arguments_from_dict, remove_unused_keyword_arguments_from_format_call, }; -use crate::pyflakes::format::FormatSummary; +use super::super::format::FormatSummary; +use crate::ast::types::Range; +use crate::checkers::ast::Checker; use crate::registry::Diagnostic; use crate::violations; diff --git a/src/pyflakes/rules/unused_annotation.rs b/src/rules/pyflakes/rules/unused_annotation.rs similarity index 100% rename from src/pyflakes/rules/unused_annotation.rs rename to src/rules/pyflakes/rules/unused_annotation.rs diff --git a/src/pyflakes/rules/unused_variable.rs b/src/rules/pyflakes/rules/unused_variable.rs similarity index 100% rename from src/pyflakes/rules/unused_variable.rs rename to src/rules/pyflakes/rules/unused_variable.rs diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_0.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_0.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_0.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_0.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_1.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_1.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_1.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_1.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_2.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_2.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_2.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_2.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_3.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_3.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_3.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_3.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_4.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_4.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_4.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_4.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_5.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_5.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_5.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_5.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_6.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_6.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_6.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_6.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_7.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_7.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_7.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F401_F401_7.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F402_F402.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F402_F402.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F402_F402.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F402_F402.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F403_F403.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F403_F403.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F403_F403.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F403_F403.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F404_F404.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F404_F404.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F404_F404.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F404_F404.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F405_F405.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F405_F405.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F405_F405.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F405_F405.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F406_F406.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F406_F406.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F406_F406.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F406_F406.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F407_F407.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F407_F407.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F407_F407.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F407_F407.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F501_F50x.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F501_F50x.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F501_F50x.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F501_F50x.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F502_F502.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F502_F502.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F502_F502.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F502_F502.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F502_F50x.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F502_F50x.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F502_F50x.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F502_F50x.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F503_F503.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F503_F503.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F503_F503.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F503_F503.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F503_F50x.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F503_F50x.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F503_F50x.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F503_F50x.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F504_F504.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F504_F504.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F504_F504.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F504_F504.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F504_F50x.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F504_F50x.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F504_F50x.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F504_F50x.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F505_F504.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F505_F504.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F505_F504.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F505_F504.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F505_F50x.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F505_F50x.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F505_F50x.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F505_F50x.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F506_F50x.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F506_F50x.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F506_F50x.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F506_F50x.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F507_F50x.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F507_F50x.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F507_F50x.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F507_F50x.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F508_F50x.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F508_F50x.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F508_F50x.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F508_F50x.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F509_F50x.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F509_F50x.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F509_F50x.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F509_F50x.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F521_F521.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F521_F521.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F521_F521.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F521_F521.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F522_F522.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F522_F522.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F522_F522.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F522_F522.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F523_F523.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F523_F523.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F523_F523.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F523_F523.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F524_F524.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F524_F524.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F524_F524.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F524_F524.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F525_F525.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F525_F525.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F525_F525.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F525_F525.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F541_F541.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F541_F541.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F541_F541.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F541_F541.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F601_F601.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F601_F601.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F601_F601.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F601_F601.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F602_F602.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F602_F602.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F602_F602.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F602_F602.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F622_F622.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F622_F622.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F622_F622.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F622_F622.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F631_F631.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F631_F631.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F631_F631.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F631_F631.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F632_F632.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F632_F632.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F632_F632.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F632_F632.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F633_F633.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F633_F633.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F633_F633.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F633_F633.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F634_F634.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F634_F634.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F634_F634.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F634_F634.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F701_F701.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F701_F701.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F701_F701.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F701_F701.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F702_F702.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F702_F702.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F702_F702.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F702_F702.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F704_F704.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F704_F704.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F704_F704.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F704_F704.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F706_F706.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F706_F706.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F706_F706.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F706_F706.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F707_F707.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F707_F707.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F707_F707.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F707_F707.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F722_F722.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F722_F722.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F722_F722.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F722_F722.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_0.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_0.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_0.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_0.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_1.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_1.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_1.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_1.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_10.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_10.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_10.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_10.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_11.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_11.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_11.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_11.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_12.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_12.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_12.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_12.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_13.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_13.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_13.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_13.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_14.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_14.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_14.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_14.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_15.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_15.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_15.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_15.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_16.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_16.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_16.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_16.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_17.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_17.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_17.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_17.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_18.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_18.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_18.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_18.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_19.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_19.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_19.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_19.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_2.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_2.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_2.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_2.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_20.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_20.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_20.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_20.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_3.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_3.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_3.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_3.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_4.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_4.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_4.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_4.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_5.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_5.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_5.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_5.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_6.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_6.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_6.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_6.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_7.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_7.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_7.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_7.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_8.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_8.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_8.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_8.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_9.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_9.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_9.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F811_F811_9.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_0.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_0.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_0.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_0.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_1.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_1.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_1.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_1.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_2.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_2.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_2.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_2.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_3.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_3.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_3.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_3.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_4.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_4.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_4.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_4.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_5.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_5.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_5.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_5.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_6.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_6.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_6.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_6.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_7.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_7.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_7.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_7.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_8.pyi.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_8.pyi.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_8.pyi.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F821_F821_8.pyi.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F822_F822.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F822_F822.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F822_F822.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F822_F822.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F823_F823.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F823_F823.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F823_F823.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F823_F823.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F841_F841_0.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F841_F841_0.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F841_F841_0.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F841_F841_0.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F841_F841_1.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F841_F841_1.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F841_F841_1.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F841_F841_1.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F841_F841_2.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F841_F841_2.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F841_F841_2.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F841_F841_2.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F841_F841_3.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F841_F841_3.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F841_F841_3.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F841_F841_3.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F842_F842.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F842_F842.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F842_F842.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F842_F842.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__F901_F901.py.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F901_F901.py.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__F901_F901.py.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__F901_F901.py.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__default_builtins.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__default_builtins.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__default_builtins.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__default_builtins.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__default_typing_modules.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__default_typing_modules.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__default_typing_modules.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__default_typing_modules.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__extra_builtins.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__extra_builtins.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__extra_builtins.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__extra_builtins.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__extra_typing_modules.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__extra_typing_modules.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__extra_typing_modules.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__extra_typing_modules.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__f841_dummy_variable_rgx.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__f841_dummy_variable_rgx.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__f841_dummy_variable_rgx.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__f841_dummy_variable_rgx.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__future_annotations.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__future_annotations.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__future_annotations.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__future_annotations.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__init.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__init.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__init.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__init.snap diff --git a/src/pyflakes/snapshots/ruff__pyflakes__tests__multi_statement_lines.snap b/src/rules/pyflakes/snapshots/ruff__pyflakes__tests__multi_statement_lines.snap similarity index 100% rename from src/pyflakes/snapshots/ruff__pyflakes__tests__multi_statement_lines.snap rename to src/rules/pyflakes/snapshots/ruff__pyflakes__tests__multi_statement_lines.snap diff --git a/src/pygrep_hooks/mod.rs b/src/rules/pygrep_hooks/mod.rs similarity index 100% rename from src/pygrep_hooks/mod.rs rename to src/rules/pygrep_hooks/mod.rs diff --git a/src/pygrep_hooks/rules/blanket_noqa.rs b/src/rules/pygrep_hooks/rules/blanket_noqa.rs similarity index 100% rename from src/pygrep_hooks/rules/blanket_noqa.rs rename to src/rules/pygrep_hooks/rules/blanket_noqa.rs diff --git a/src/pygrep_hooks/rules/blanket_type_ignore.rs b/src/rules/pygrep_hooks/rules/blanket_type_ignore.rs similarity index 100% rename from src/pygrep_hooks/rules/blanket_type_ignore.rs rename to src/rules/pygrep_hooks/rules/blanket_type_ignore.rs diff --git a/src/pygrep_hooks/rules/deprecated_log_warn.rs b/src/rules/pygrep_hooks/rules/deprecated_log_warn.rs similarity index 100% rename from src/pygrep_hooks/rules/deprecated_log_warn.rs rename to src/rules/pygrep_hooks/rules/deprecated_log_warn.rs diff --git a/src/pygrep_hooks/rules/mod.rs b/src/rules/pygrep_hooks/rules/mod.rs similarity index 100% rename from src/pygrep_hooks/rules/mod.rs rename to src/rules/pygrep_hooks/rules/mod.rs diff --git a/src/pygrep_hooks/rules/no_eval.rs b/src/rules/pygrep_hooks/rules/no_eval.rs similarity index 100% rename from src/pygrep_hooks/rules/no_eval.rs rename to src/rules/pygrep_hooks/rules/no_eval.rs diff --git a/src/pygrep_hooks/snapshots/ruff__pygrep_hooks__tests__PGH001_PGH001_0.py.snap b/src/rules/pygrep_hooks/snapshots/ruff__pygrep_hooks__tests__PGH001_PGH001_0.py.snap similarity index 100% rename from src/pygrep_hooks/snapshots/ruff__pygrep_hooks__tests__PGH001_PGH001_0.py.snap rename to src/rules/pygrep_hooks/snapshots/ruff__pygrep_hooks__tests__PGH001_PGH001_0.py.snap diff --git a/src/pygrep_hooks/snapshots/ruff__pygrep_hooks__tests__PGH001_PGH001_1.py.snap b/src/rules/pygrep_hooks/snapshots/ruff__pygrep_hooks__tests__PGH001_PGH001_1.py.snap similarity index 100% rename from src/pygrep_hooks/snapshots/ruff__pygrep_hooks__tests__PGH001_PGH001_1.py.snap rename to src/rules/pygrep_hooks/snapshots/ruff__pygrep_hooks__tests__PGH001_PGH001_1.py.snap diff --git a/src/pygrep_hooks/snapshots/ruff__pygrep_hooks__tests__PGH002_PGH002_0.py.snap b/src/rules/pygrep_hooks/snapshots/ruff__pygrep_hooks__tests__PGH002_PGH002_0.py.snap similarity index 100% rename from src/pygrep_hooks/snapshots/ruff__pygrep_hooks__tests__PGH002_PGH002_0.py.snap rename to src/rules/pygrep_hooks/snapshots/ruff__pygrep_hooks__tests__PGH002_PGH002_0.py.snap diff --git a/src/pygrep_hooks/snapshots/ruff__pygrep_hooks__tests__PGH002_PGH002_1.py.snap b/src/rules/pygrep_hooks/snapshots/ruff__pygrep_hooks__tests__PGH002_PGH002_1.py.snap similarity index 100% rename from src/pygrep_hooks/snapshots/ruff__pygrep_hooks__tests__PGH002_PGH002_1.py.snap rename to src/rules/pygrep_hooks/snapshots/ruff__pygrep_hooks__tests__PGH002_PGH002_1.py.snap diff --git a/src/pygrep_hooks/snapshots/ruff__pygrep_hooks__tests__PGH003_PGH003_0.py.snap b/src/rules/pygrep_hooks/snapshots/ruff__pygrep_hooks__tests__PGH003_PGH003_0.py.snap similarity index 100% rename from src/pygrep_hooks/snapshots/ruff__pygrep_hooks__tests__PGH003_PGH003_0.py.snap rename to src/rules/pygrep_hooks/snapshots/ruff__pygrep_hooks__tests__PGH003_PGH003_0.py.snap diff --git a/src/pygrep_hooks/snapshots/ruff__pygrep_hooks__tests__PGH004_PGH004_0.py.snap b/src/rules/pygrep_hooks/snapshots/ruff__pygrep_hooks__tests__PGH004_PGH004_0.py.snap similarity index 100% rename from src/pygrep_hooks/snapshots/ruff__pygrep_hooks__tests__PGH004_PGH004_0.py.snap rename to src/rules/pygrep_hooks/snapshots/ruff__pygrep_hooks__tests__PGH004_PGH004_0.py.snap diff --git a/src/pylint/mod.rs b/src/rules/pylint/mod.rs similarity index 100% rename from src/pylint/mod.rs rename to src/rules/pylint/mod.rs diff --git a/src/pylint/rules/await_outside_async.rs b/src/rules/pylint/rules/await_outside_async.rs similarity index 100% rename from src/pylint/rules/await_outside_async.rs rename to src/rules/pylint/rules/await_outside_async.rs diff --git a/src/pylint/rules/constant_comparison.rs b/src/rules/pylint/rules/constant_comparison.rs similarity index 100% rename from src/pylint/rules/constant_comparison.rs rename to src/rules/pylint/rules/constant_comparison.rs diff --git a/src/pylint/rules/magic_value_comparison.rs b/src/rules/pylint/rules/magic_value_comparison.rs similarity index 100% rename from src/pylint/rules/magic_value_comparison.rs rename to src/rules/pylint/rules/magic_value_comparison.rs diff --git a/src/pylint/rules/merge_isinstance.rs b/src/rules/pylint/rules/merge_isinstance.rs similarity index 100% rename from src/pylint/rules/merge_isinstance.rs rename to src/rules/pylint/rules/merge_isinstance.rs diff --git a/src/pylint/rules/misplaced_comparison_constant.rs b/src/rules/pylint/rules/misplaced_comparison_constant.rs similarity index 100% rename from src/pylint/rules/misplaced_comparison_constant.rs rename to src/rules/pylint/rules/misplaced_comparison_constant.rs diff --git a/src/pylint/rules/mod.rs b/src/rules/pylint/rules/mod.rs similarity index 100% rename from src/pylint/rules/mod.rs rename to src/rules/pylint/rules/mod.rs diff --git a/src/pylint/rules/property_with_parameters.rs b/src/rules/pylint/rules/property_with_parameters.rs similarity index 100% rename from src/pylint/rules/property_with_parameters.rs rename to src/rules/pylint/rules/property_with_parameters.rs diff --git a/src/pylint/rules/unnecessary_direct_lambda_call.rs b/src/rules/pylint/rules/unnecessary_direct_lambda_call.rs similarity index 100% rename from src/pylint/rules/unnecessary_direct_lambda_call.rs rename to src/rules/pylint/rules/unnecessary_direct_lambda_call.rs diff --git a/src/pylint/rules/use_from_import.rs b/src/rules/pylint/rules/use_from_import.rs similarity index 100% rename from src/pylint/rules/use_from_import.rs rename to src/rules/pylint/rules/use_from_import.rs diff --git a/src/pylint/rules/use_sys_exit.rs b/src/rules/pylint/rules/use_sys_exit.rs similarity index 100% rename from src/pylint/rules/use_sys_exit.rs rename to src/rules/pylint/rules/use_sys_exit.rs diff --git a/src/pylint/rules/used_prior_global_declaration.rs b/src/rules/pylint/rules/used_prior_global_declaration.rs similarity index 100% rename from src/pylint/rules/used_prior_global_declaration.rs rename to src/rules/pylint/rules/used_prior_global_declaration.rs diff --git a/src/pylint/rules/useless_else_on_loop.rs b/src/rules/pylint/rules/useless_else_on_loop.rs similarity index 100% rename from src/pylint/rules/useless_else_on_loop.rs rename to src/rules/pylint/rules/useless_else_on_loop.rs diff --git a/src/pylint/rules/useless_import_alias.rs b/src/rules/pylint/rules/useless_import_alias.rs similarity index 100% rename from src/pylint/rules/useless_import_alias.rs rename to src/rules/pylint/rules/useless_import_alias.rs diff --git a/src/pylint/snapshots/ruff__pylint__tests__PLC0414_import_aliasing.py.snap b/src/rules/pylint/snapshots/ruff__pylint__tests__PLC0414_import_aliasing.py.snap similarity index 100% rename from src/pylint/snapshots/ruff__pylint__tests__PLC0414_import_aliasing.py.snap rename to src/rules/pylint/snapshots/ruff__pylint__tests__PLC0414_import_aliasing.py.snap diff --git a/src/pylint/snapshots/ruff__pylint__tests__PLC2201_misplaced_comparison_constant.py.snap b/src/rules/pylint/snapshots/ruff__pylint__tests__PLC2201_misplaced_comparison_constant.py.snap similarity index 100% rename from src/pylint/snapshots/ruff__pylint__tests__PLC2201_misplaced_comparison_constant.py.snap rename to src/rules/pylint/snapshots/ruff__pylint__tests__PLC2201_misplaced_comparison_constant.py.snap diff --git a/src/pylint/snapshots/ruff__pylint__tests__PLC3002_unnecessary_direct_lambda_call.py.snap b/src/rules/pylint/snapshots/ruff__pylint__tests__PLC3002_unnecessary_direct_lambda_call.py.snap similarity index 100% rename from src/pylint/snapshots/ruff__pylint__tests__PLC3002_unnecessary_direct_lambda_call.py.snap rename to src/rules/pylint/snapshots/ruff__pylint__tests__PLC3002_unnecessary_direct_lambda_call.py.snap diff --git a/src/pylint/snapshots/ruff__pylint__tests__PLE0117_nonlocal_without_binding.py.snap b/src/rules/pylint/snapshots/ruff__pylint__tests__PLE0117_nonlocal_without_binding.py.snap similarity index 100% rename from src/pylint/snapshots/ruff__pylint__tests__PLE0117_nonlocal_without_binding.py.snap rename to src/rules/pylint/snapshots/ruff__pylint__tests__PLE0117_nonlocal_without_binding.py.snap diff --git a/src/pylint/snapshots/ruff__pylint__tests__PLE0118_used_prior_global_declaration.py.snap b/src/rules/pylint/snapshots/ruff__pylint__tests__PLE0118_used_prior_global_declaration.py.snap similarity index 100% rename from src/pylint/snapshots/ruff__pylint__tests__PLE0118_used_prior_global_declaration.py.snap rename to src/rules/pylint/snapshots/ruff__pylint__tests__PLE0118_used_prior_global_declaration.py.snap diff --git a/src/pylint/snapshots/ruff__pylint__tests__PLE1142_await_outside_async.py.snap b/src/rules/pylint/snapshots/ruff__pylint__tests__PLE1142_await_outside_async.py.snap similarity index 100% rename from src/pylint/snapshots/ruff__pylint__tests__PLE1142_await_outside_async.py.snap rename to src/rules/pylint/snapshots/ruff__pylint__tests__PLE1142_await_outside_async.py.snap diff --git a/src/pylint/snapshots/ruff__pylint__tests__PLR0133_constant_comparison.py.snap b/src/rules/pylint/snapshots/ruff__pylint__tests__PLR0133_constant_comparison.py.snap similarity index 100% rename from src/pylint/snapshots/ruff__pylint__tests__PLR0133_constant_comparison.py.snap rename to src/rules/pylint/snapshots/ruff__pylint__tests__PLR0133_constant_comparison.py.snap diff --git a/src/pylint/snapshots/ruff__pylint__tests__PLR0206_property_with_parameters.py.snap b/src/rules/pylint/snapshots/ruff__pylint__tests__PLR0206_property_with_parameters.py.snap similarity index 100% rename from src/pylint/snapshots/ruff__pylint__tests__PLR0206_property_with_parameters.py.snap rename to src/rules/pylint/snapshots/ruff__pylint__tests__PLR0206_property_with_parameters.py.snap diff --git a/src/pylint/snapshots/ruff__pylint__tests__PLR0402_import_aliasing.py.snap b/src/rules/pylint/snapshots/ruff__pylint__tests__PLR0402_import_aliasing.py.snap similarity index 100% rename from src/pylint/snapshots/ruff__pylint__tests__PLR0402_import_aliasing.py.snap rename to src/rules/pylint/snapshots/ruff__pylint__tests__PLR0402_import_aliasing.py.snap diff --git a/src/pylint/snapshots/ruff__pylint__tests__PLR1701_consider_merging_isinstance.py.snap b/src/rules/pylint/snapshots/ruff__pylint__tests__PLR1701_consider_merging_isinstance.py.snap similarity index 100% rename from src/pylint/snapshots/ruff__pylint__tests__PLR1701_consider_merging_isinstance.py.snap rename to src/rules/pylint/snapshots/ruff__pylint__tests__PLR1701_consider_merging_isinstance.py.snap diff --git a/src/pylint/snapshots/ruff__pylint__tests__PLR1722_consider_using_sys_exit_0.py.snap b/src/rules/pylint/snapshots/ruff__pylint__tests__PLR1722_consider_using_sys_exit_0.py.snap similarity index 100% rename from src/pylint/snapshots/ruff__pylint__tests__PLR1722_consider_using_sys_exit_0.py.snap rename to src/rules/pylint/snapshots/ruff__pylint__tests__PLR1722_consider_using_sys_exit_0.py.snap diff --git a/src/pylint/snapshots/ruff__pylint__tests__PLR1722_consider_using_sys_exit_1.py.snap b/src/rules/pylint/snapshots/ruff__pylint__tests__PLR1722_consider_using_sys_exit_1.py.snap similarity index 100% rename from src/pylint/snapshots/ruff__pylint__tests__PLR1722_consider_using_sys_exit_1.py.snap rename to src/rules/pylint/snapshots/ruff__pylint__tests__PLR1722_consider_using_sys_exit_1.py.snap diff --git a/src/pylint/snapshots/ruff__pylint__tests__PLR1722_consider_using_sys_exit_2.py.snap b/src/rules/pylint/snapshots/ruff__pylint__tests__PLR1722_consider_using_sys_exit_2.py.snap similarity index 100% rename from src/pylint/snapshots/ruff__pylint__tests__PLR1722_consider_using_sys_exit_2.py.snap rename to src/rules/pylint/snapshots/ruff__pylint__tests__PLR1722_consider_using_sys_exit_2.py.snap diff --git a/src/pylint/snapshots/ruff__pylint__tests__PLR1722_consider_using_sys_exit_3.py.snap b/src/rules/pylint/snapshots/ruff__pylint__tests__PLR1722_consider_using_sys_exit_3.py.snap similarity index 100% rename from src/pylint/snapshots/ruff__pylint__tests__PLR1722_consider_using_sys_exit_3.py.snap rename to src/rules/pylint/snapshots/ruff__pylint__tests__PLR1722_consider_using_sys_exit_3.py.snap diff --git a/src/pylint/snapshots/ruff__pylint__tests__PLR1722_consider_using_sys_exit_4.py.snap b/src/rules/pylint/snapshots/ruff__pylint__tests__PLR1722_consider_using_sys_exit_4.py.snap similarity index 100% rename from src/pylint/snapshots/ruff__pylint__tests__PLR1722_consider_using_sys_exit_4.py.snap rename to src/rules/pylint/snapshots/ruff__pylint__tests__PLR1722_consider_using_sys_exit_4.py.snap diff --git a/src/pylint/snapshots/ruff__pylint__tests__PLR1722_consider_using_sys_exit_5.py.snap b/src/rules/pylint/snapshots/ruff__pylint__tests__PLR1722_consider_using_sys_exit_5.py.snap similarity index 100% rename from src/pylint/snapshots/ruff__pylint__tests__PLR1722_consider_using_sys_exit_5.py.snap rename to src/rules/pylint/snapshots/ruff__pylint__tests__PLR1722_consider_using_sys_exit_5.py.snap diff --git a/src/pylint/snapshots/ruff__pylint__tests__PLR1722_consider_using_sys_exit_6.py.snap b/src/rules/pylint/snapshots/ruff__pylint__tests__PLR1722_consider_using_sys_exit_6.py.snap similarity index 100% rename from src/pylint/snapshots/ruff__pylint__tests__PLR1722_consider_using_sys_exit_6.py.snap rename to src/rules/pylint/snapshots/ruff__pylint__tests__PLR1722_consider_using_sys_exit_6.py.snap diff --git a/src/pylint/snapshots/ruff__pylint__tests__PLR2004_magic_value_comparison.py.snap b/src/rules/pylint/snapshots/ruff__pylint__tests__PLR2004_magic_value_comparison.py.snap similarity index 100% rename from src/pylint/snapshots/ruff__pylint__tests__PLR2004_magic_value_comparison.py.snap rename to src/rules/pylint/snapshots/ruff__pylint__tests__PLR2004_magic_value_comparison.py.snap diff --git a/src/pylint/snapshots/ruff__pylint__tests__PLW0120_useless_else_on_loop.py.snap b/src/rules/pylint/snapshots/ruff__pylint__tests__PLW0120_useless_else_on_loop.py.snap similarity index 100% rename from src/pylint/snapshots/ruff__pylint__tests__PLW0120_useless_else_on_loop.py.snap rename to src/rules/pylint/snapshots/ruff__pylint__tests__PLW0120_useless_else_on_loop.py.snap diff --git a/src/pylint/snapshots/ruff__pylint__tests__PLW0602_global_variable_not_assigned.py.snap b/src/rules/pylint/snapshots/ruff__pylint__tests__PLW0602_global_variable_not_assigned.py.snap similarity index 100% rename from src/pylint/snapshots/ruff__pylint__tests__PLW0602_global_variable_not_assigned.py.snap rename to src/rules/pylint/snapshots/ruff__pylint__tests__PLW0602_global_variable_not_assigned.py.snap diff --git a/src/pyupgrade/fixes.rs b/src/rules/pyupgrade/fixes.rs similarity index 100% rename from src/pyupgrade/fixes.rs rename to src/rules/pyupgrade/fixes.rs diff --git a/src/pyupgrade/mod.rs b/src/rules/pyupgrade/mod.rs similarity index 100% rename from src/pyupgrade/mod.rs rename to src/rules/pyupgrade/mod.rs diff --git a/src/pyupgrade/rules/convert_named_tuple_functional_to_class.rs b/src/rules/pyupgrade/rules/convert_named_tuple_functional_to_class.rs similarity index 100% rename from src/pyupgrade/rules/convert_named_tuple_functional_to_class.rs rename to src/rules/pyupgrade/rules/convert_named_tuple_functional_to_class.rs diff --git a/src/pyupgrade/rules/convert_typed_dict_functional_to_class.rs b/src/rules/pyupgrade/rules/convert_typed_dict_functional_to_class.rs similarity index 100% rename from src/pyupgrade/rules/convert_typed_dict_functional_to_class.rs rename to src/rules/pyupgrade/rules/convert_typed_dict_functional_to_class.rs diff --git a/src/pyupgrade/rules/datetime_utc_alias.rs b/src/rules/pyupgrade/rules/datetime_utc_alias.rs similarity index 100% rename from src/pyupgrade/rules/datetime_utc_alias.rs rename to src/rules/pyupgrade/rules/datetime_utc_alias.rs diff --git a/src/pyupgrade/rules/deprecated_unittest_alias.rs b/src/rules/pyupgrade/rules/deprecated_unittest_alias.rs similarity index 100% rename from src/pyupgrade/rules/deprecated_unittest_alias.rs rename to src/rules/pyupgrade/rules/deprecated_unittest_alias.rs diff --git a/src/pyupgrade/rules/format_literals.rs b/src/rules/pyupgrade/rules/format_literals.rs similarity index 98% rename from src/pyupgrade/rules/format_literals.rs rename to src/rules/pyupgrade/rules/format_literals.rs index f11d0cb750..95c0779222 100644 --- a/src/pyupgrade/rules/format_literals.rs +++ b/src/rules/pyupgrade/rules/format_literals.rs @@ -8,8 +8,8 @@ use crate::ast::types::Range; use crate::checkers::ast::Checker; use crate::cst::matchers::{match_call, match_expression}; use crate::fix::Fix; -use crate::pyflakes::format::FormatSummary; use crate::registry::Diagnostic; +use crate::rules::pyflakes::format::FormatSummary; use crate::violations; // An opening curly brace, followed by any integer, followed by any text, diff --git a/src/pyupgrade/rules/mod.rs b/src/rules/pyupgrade/rules/mod.rs similarity index 100% rename from src/pyupgrade/rules/mod.rs rename to src/rules/pyupgrade/rules/mod.rs diff --git a/src/pyupgrade/rules/native_literals.rs b/src/rules/pyupgrade/rules/native_literals.rs similarity index 100% rename from src/pyupgrade/rules/native_literals.rs rename to src/rules/pyupgrade/rules/native_literals.rs diff --git a/src/pyupgrade/rules/open_alias.rs b/src/rules/pyupgrade/rules/open_alias.rs similarity index 100% rename from src/pyupgrade/rules/open_alias.rs rename to src/rules/pyupgrade/rules/open_alias.rs diff --git a/src/pyupgrade/rules/os_error_alias.rs b/src/rules/pyupgrade/rules/os_error_alias.rs similarity index 100% rename from src/pyupgrade/rules/os_error_alias.rs rename to src/rules/pyupgrade/rules/os_error_alias.rs diff --git a/src/pyupgrade/rules/redundant_open_modes.rs b/src/rules/pyupgrade/rules/redundant_open_modes.rs similarity index 100% rename from src/pyupgrade/rules/redundant_open_modes.rs rename to src/rules/pyupgrade/rules/redundant_open_modes.rs diff --git a/src/pyupgrade/rules/remove_six_compat.rs b/src/rules/pyupgrade/rules/remove_six_compat.rs similarity index 100% rename from src/pyupgrade/rules/remove_six_compat.rs rename to src/rules/pyupgrade/rules/remove_six_compat.rs diff --git a/src/pyupgrade/rules/replace_stdout_stderr.rs b/src/rules/pyupgrade/rules/replace_stdout_stderr.rs similarity index 100% rename from src/pyupgrade/rules/replace_stdout_stderr.rs rename to src/rules/pyupgrade/rules/replace_stdout_stderr.rs diff --git a/src/pyupgrade/rules/replace_universal_newlines.rs b/src/rules/pyupgrade/rules/replace_universal_newlines.rs similarity index 100% rename from src/pyupgrade/rules/replace_universal_newlines.rs rename to src/rules/pyupgrade/rules/replace_universal_newlines.rs diff --git a/src/pyupgrade/rules/rewrite_c_element_tree.rs b/src/rules/pyupgrade/rules/rewrite_c_element_tree.rs similarity index 100% rename from src/pyupgrade/rules/rewrite_c_element_tree.rs rename to src/rules/pyupgrade/rules/rewrite_c_element_tree.rs diff --git a/src/pyupgrade/rules/rewrite_mock_import.rs b/src/rules/pyupgrade/rules/rewrite_mock_import.rs similarity index 100% rename from src/pyupgrade/rules/rewrite_mock_import.rs rename to src/rules/pyupgrade/rules/rewrite_mock_import.rs diff --git a/src/pyupgrade/rules/rewrite_unicode_literal.rs b/src/rules/pyupgrade/rules/rewrite_unicode_literal.rs similarity index 100% rename from src/pyupgrade/rules/rewrite_unicode_literal.rs rename to src/rules/pyupgrade/rules/rewrite_unicode_literal.rs diff --git a/src/pyupgrade/rules/rewrite_yield_from.rs b/src/rules/pyupgrade/rules/rewrite_yield_from.rs similarity index 100% rename from src/pyupgrade/rules/rewrite_yield_from.rs rename to src/rules/pyupgrade/rules/rewrite_yield_from.rs diff --git a/src/pyupgrade/rules/super_call_with_parameters.rs b/src/rules/pyupgrade/rules/super_call_with_parameters.rs similarity index 79% rename from src/pyupgrade/rules/super_call_with_parameters.rs rename to src/rules/pyupgrade/rules/super_call_with_parameters.rs index ea9792031f..bbab60bb05 100644 --- a/src/pyupgrade/rules/super_call_with_parameters.rs +++ b/src/rules/pyupgrade/rules/super_call_with_parameters.rs @@ -1,9 +1,8 @@ use rustpython_ast::{Expr, Stmt}; +use super::super::fixes; use crate::ast::helpers; use crate::checkers::ast::Checker; -use crate::pyupgrade; -use crate::pyupgrade::rules; /// UP008 pub fn super_call_with_parameters(checker: &mut Checker, expr: &Expr, func: &Expr, args: &[Expr]) { @@ -18,11 +17,11 @@ pub fn super_call_with_parameters(checker: &mut Checker, expr: &Expr, func: &Exp .iter() .map(std::convert::Into::into) .collect(); - let Some(mut diagnostic) = rules::super_args(scope, &parents, expr, func, args) else { + let Some(mut diagnostic) = super::super_args(scope, &parents, expr, func, args) else { return; }; if checker.patch(diagnostic.kind.code()) { - if let Some(fix) = pyupgrade::fixes::remove_super_arguments(checker.locator, expr) { + if let Some(fix) = fixes::remove_super_arguments(checker.locator, expr) { diagnostic.amend(fix); } } diff --git a/src/pyupgrade/rules/type_of_primitive.rs b/src/rules/pyupgrade/rules/type_of_primitive.rs similarity index 97% rename from src/pyupgrade/rules/type_of_primitive.rs rename to src/rules/pyupgrade/rules/type_of_primitive.rs index c71bf47d2c..d71d024115 100644 --- a/src/pyupgrade/rules/type_of_primitive.rs +++ b/src/rules/pyupgrade/rules/type_of_primitive.rs @@ -1,9 +1,9 @@ use rustpython_ast::{Expr, ExprKind}; +use super::super::types::Primitive; use crate::ast::types::Range; use crate::checkers::ast::Checker; use crate::fix::Fix; -use crate::pyupgrade::types::Primitive; use crate::registry::{Diagnostic, DiagnosticKind}; use crate::violations; diff --git a/src/pyupgrade/rules/typing_text_str_alias.rs b/src/rules/pyupgrade/rules/typing_text_str_alias.rs similarity index 100% rename from src/pyupgrade/rules/typing_text_str_alias.rs rename to src/rules/pyupgrade/rules/typing_text_str_alias.rs diff --git a/src/pyupgrade/rules/unnecessary_builtin_import.rs b/src/rules/pyupgrade/rules/unnecessary_builtin_import.rs similarity index 100% rename from src/pyupgrade/rules/unnecessary_builtin_import.rs rename to src/rules/pyupgrade/rules/unnecessary_builtin_import.rs diff --git a/src/pyupgrade/rules/unnecessary_encode_utf8.rs b/src/rules/pyupgrade/rules/unnecessary_encode_utf8.rs similarity index 100% rename from src/pyupgrade/rules/unnecessary_encode_utf8.rs rename to src/rules/pyupgrade/rules/unnecessary_encode_utf8.rs diff --git a/src/pyupgrade/rules/unnecessary_future_import.rs b/src/rules/pyupgrade/rules/unnecessary_future_import.rs similarity index 100% rename from src/pyupgrade/rules/unnecessary_future_import.rs rename to src/rules/pyupgrade/rules/unnecessary_future_import.rs diff --git a/src/pyupgrade/rules/unnecessary_lru_cache_params.rs b/src/rules/pyupgrade/rules/unnecessary_lru_cache_params.rs similarity index 100% rename from src/pyupgrade/rules/unnecessary_lru_cache_params.rs rename to src/rules/pyupgrade/rules/unnecessary_lru_cache_params.rs diff --git a/src/pyupgrade/rules/unpack_list_comprehension.rs b/src/rules/pyupgrade/rules/unpack_list_comprehension.rs similarity index 100% rename from src/pyupgrade/rules/unpack_list_comprehension.rs rename to src/rules/pyupgrade/rules/unpack_list_comprehension.rs diff --git a/src/pyupgrade/rules/use_pep585_annotation.rs b/src/rules/pyupgrade/rules/use_pep585_annotation.rs similarity index 100% rename from src/pyupgrade/rules/use_pep585_annotation.rs rename to src/rules/pyupgrade/rules/use_pep585_annotation.rs diff --git a/src/pyupgrade/rules/use_pep604_annotation.rs b/src/rules/pyupgrade/rules/use_pep604_annotation.rs similarity index 100% rename from src/pyupgrade/rules/use_pep604_annotation.rs rename to src/rules/pyupgrade/rules/use_pep604_annotation.rs diff --git a/src/pyupgrade/rules/useless_metaclass_type.rs b/src/rules/pyupgrade/rules/useless_metaclass_type.rs similarity index 100% rename from src/pyupgrade/rules/useless_metaclass_type.rs rename to src/rules/pyupgrade/rules/useless_metaclass_type.rs diff --git a/src/pyupgrade/rules/useless_object_inheritance.rs b/src/rules/pyupgrade/rules/useless_object_inheritance.rs similarity index 93% rename from src/pyupgrade/rules/useless_object_inheritance.rs rename to src/rules/pyupgrade/rules/useless_object_inheritance.rs index 0f85edd1c8..bd5f589b4c 100644 --- a/src/pyupgrade/rules/useless_object_inheritance.rs +++ b/src/rules/pyupgrade/rules/useless_object_inheritance.rs @@ -1,9 +1,10 @@ use rustpython_ast::{Expr, ExprKind, Keyword, Stmt}; +use super::super::fixes; use crate::ast::types::{Binding, BindingKind, Range, Scope}; use crate::checkers::ast::Checker; use crate::registry::Diagnostic; -use crate::{pyupgrade, violations}; +use crate::violations; fn rule(name: &str, bases: &[Expr], scope: &Scope, bindings: &[Binding]) -> Option { for expr in bases { @@ -46,7 +47,7 @@ pub fn useless_object_inheritance( return; }; if checker.patch(diagnostic.kind.code()) { - if let Some(fix) = pyupgrade::fixes::remove_class_def_base( + if let Some(fix) = fixes::remove_class_def_base( checker.locator, stmt.location, diagnostic.location, diff --git a/src/pyupgrade/settings.rs b/src/rules/pyupgrade/settings.rs similarity index 100% rename from src/pyupgrade/settings.rs rename to src/rules/pyupgrade/settings.rs diff --git a/src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP001_UP001.py.snap b/src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP001_UP001.py.snap similarity index 100% rename from src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP001_UP001.py.snap rename to src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP001_UP001.py.snap diff --git a/src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP003_UP003.py.snap b/src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP003_UP003.py.snap similarity index 100% rename from src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP003_UP003.py.snap rename to src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP003_UP003.py.snap diff --git a/src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP004_UP004.py.snap b/src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP004_UP004.py.snap similarity index 100% rename from src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP004_UP004.py.snap rename to src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP004_UP004.py.snap diff --git a/src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP005_UP005.py.snap b/src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP005_UP005.py.snap similarity index 100% rename from src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP005_UP005.py.snap rename to src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP005_UP005.py.snap diff --git a/src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP006_UP006.py.snap b/src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP006_UP006.py.snap similarity index 100% rename from src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP006_UP006.py.snap rename to src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP006_UP006.py.snap diff --git a/src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP007_UP007.py.snap b/src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP007_UP007.py.snap similarity index 100% rename from src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP007_UP007.py.snap rename to src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP007_UP007.py.snap diff --git a/src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP008_UP008.py.snap b/src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP008_UP008.py.snap similarity index 100% rename from src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP008_UP008.py.snap rename to src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP008_UP008.py.snap diff --git a/src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP009_UP009_0.py.snap b/src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP009_UP009_0.py.snap similarity index 100% rename from src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP009_UP009_0.py.snap rename to src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP009_UP009_0.py.snap diff --git a/src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP009_UP009_1.py.snap b/src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP009_UP009_1.py.snap similarity index 100% rename from src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP009_UP009_1.py.snap rename to src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP009_UP009_1.py.snap diff --git a/src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP009_UP009_2.py.snap b/src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP009_UP009_2.py.snap similarity index 100% rename from src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP009_UP009_2.py.snap rename to src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP009_UP009_2.py.snap diff --git a/src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP009_UP009_3.py.snap b/src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP009_UP009_3.py.snap similarity index 100% rename from src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP009_UP009_3.py.snap rename to src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP009_UP009_3.py.snap diff --git a/src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP009_UP009_4.py.snap b/src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP009_UP009_4.py.snap similarity index 100% rename from src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP009_UP009_4.py.snap rename to src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP009_UP009_4.py.snap diff --git a/src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP010_UP010.py.snap b/src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP010_UP010.py.snap similarity index 100% rename from src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP010_UP010.py.snap rename to src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP010_UP010.py.snap diff --git a/src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP011_UP011_0.py.snap b/src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP011_UP011_0.py.snap similarity index 100% rename from src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP011_UP011_0.py.snap rename to src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP011_UP011_0.py.snap diff --git a/src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP011_UP011_1.py.snap b/src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP011_UP011_1.py.snap similarity index 100% rename from src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP011_UP011_1.py.snap rename to src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP011_UP011_1.py.snap diff --git a/src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP012_UP012.py.snap b/src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP012_UP012.py.snap similarity index 100% rename from src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP012_UP012.py.snap rename to src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP012_UP012.py.snap diff --git a/src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP013_UP013.py.snap b/src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP013_UP013.py.snap similarity index 100% rename from src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP013_UP013.py.snap rename to src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP013_UP013.py.snap diff --git a/src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP014_UP014.py.snap b/src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP014_UP014.py.snap similarity index 100% rename from src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP014_UP014.py.snap rename to src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP014_UP014.py.snap diff --git a/src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP015_UP015.py.snap b/src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP015_UP015.py.snap similarity index 100% rename from src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP015_UP015.py.snap rename to src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP015_UP015.py.snap diff --git a/src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP016_UP016.py.snap b/src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP016_UP016.py.snap similarity index 100% rename from src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP016_UP016.py.snap rename to src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP016_UP016.py.snap diff --git a/src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP018_UP018.py.snap b/src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP018_UP018.py.snap similarity index 100% rename from src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP018_UP018.py.snap rename to src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP018_UP018.py.snap diff --git a/src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP019_UP019.py.snap b/src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP019_UP019.py.snap similarity index 100% rename from src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP019_UP019.py.snap rename to src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP019_UP019.py.snap diff --git a/src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP021_UP021.py.snap b/src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP021_UP021.py.snap similarity index 100% rename from src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP021_UP021.py.snap rename to src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP021_UP021.py.snap diff --git a/src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP022_UP022.py.snap b/src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP022_UP022.py.snap similarity index 100% rename from src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP022_UP022.py.snap rename to src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP022_UP022.py.snap diff --git a/src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP023_UP023.py.snap b/src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP023_UP023.py.snap similarity index 100% rename from src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP023_UP023.py.snap rename to src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP023_UP023.py.snap diff --git a/src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP024_UP024_0.py.snap b/src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP024_UP024_0.py.snap similarity index 100% rename from src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP024_UP024_0.py.snap rename to src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP024_UP024_0.py.snap diff --git a/src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP024_UP024_1.py.snap b/src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP024_UP024_1.py.snap similarity index 100% rename from src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP024_UP024_1.py.snap rename to src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP024_UP024_1.py.snap diff --git a/src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP024_UP024_2.py.snap b/src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP024_UP024_2.py.snap similarity index 100% rename from src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP024_UP024_2.py.snap rename to src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP024_UP024_2.py.snap diff --git a/src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP024_UP024_3.py.snap b/src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP024_UP024_3.py.snap similarity index 100% rename from src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP024_UP024_3.py.snap rename to src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP024_UP024_3.py.snap diff --git a/src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP025_UP025.py.snap b/src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP025_UP025.py.snap similarity index 100% rename from src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP025_UP025.py.snap rename to src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP025_UP025.py.snap diff --git a/src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP026_UP026.py.snap b/src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP026_UP026.py.snap similarity index 100% rename from src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP026_UP026.py.snap rename to src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP026_UP026.py.snap diff --git a/src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP027_UP027.py.snap b/src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP027_UP027.py.snap similarity index 100% rename from src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP027_UP027.py.snap rename to src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP027_UP027.py.snap diff --git a/src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP028_UP028_0.py.snap b/src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP028_UP028_0.py.snap similarity index 100% rename from src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP028_UP028_0.py.snap rename to src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP028_UP028_0.py.snap diff --git a/src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP028_UP028_1.py.snap b/src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP028_UP028_1.py.snap similarity index 100% rename from src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP028_UP028_1.py.snap rename to src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP028_UP028_1.py.snap diff --git a/src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP029_UP029.py.snap b/src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP029_UP029.py.snap similarity index 100% rename from src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP029_UP029.py.snap rename to src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP029_UP029.py.snap diff --git a/src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP030_UP030_0.py.snap b/src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP030_UP030_0.py.snap similarity index 100% rename from src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP030_UP030_0.py.snap rename to src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP030_UP030_0.py.snap diff --git a/src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP030_UP030_1.py.snap b/src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP030_UP030_1.py.snap similarity index 100% rename from src/pyupgrade/snapshots/ruff__pyupgrade__tests__UP030_UP030_1.py.snap rename to src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__UP030_UP030_1.py.snap diff --git a/src/pyupgrade/snapshots/ruff__pyupgrade__tests__datetime_utc_alias_py311.snap b/src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__datetime_utc_alias_py311.snap similarity index 100% rename from src/pyupgrade/snapshots/ruff__pyupgrade__tests__datetime_utc_alias_py311.snap rename to src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__datetime_utc_alias_py311.snap diff --git a/src/pyupgrade/snapshots/ruff__pyupgrade__tests__future_annotations_pep_585_p37.snap b/src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__future_annotations_pep_585_p37.snap similarity index 100% rename from src/pyupgrade/snapshots/ruff__pyupgrade__tests__future_annotations_pep_585_p37.snap rename to src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__future_annotations_pep_585_p37.snap diff --git a/src/pyupgrade/snapshots/ruff__pyupgrade__tests__future_annotations_pep_585_py310.snap b/src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__future_annotations_pep_585_py310.snap similarity index 100% rename from src/pyupgrade/snapshots/ruff__pyupgrade__tests__future_annotations_pep_585_py310.snap rename to src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__future_annotations_pep_585_py310.snap diff --git a/src/pyupgrade/snapshots/ruff__pyupgrade__tests__future_annotations_pep_604_p37.snap b/src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__future_annotations_pep_604_p37.snap similarity index 100% rename from src/pyupgrade/snapshots/ruff__pyupgrade__tests__future_annotations_pep_604_p37.snap rename to src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__future_annotations_pep_604_p37.snap diff --git a/src/pyupgrade/snapshots/ruff__pyupgrade__tests__future_annotations_pep_604_py310.snap b/src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__future_annotations_pep_604_py310.snap similarity index 100% rename from src/pyupgrade/snapshots/ruff__pyupgrade__tests__future_annotations_pep_604_py310.snap rename to src/rules/pyupgrade/snapshots/ruff__pyupgrade__tests__future_annotations_pep_604_py310.snap diff --git a/src/pyupgrade/types.rs b/src/rules/pyupgrade/types.rs similarity index 100% rename from src/pyupgrade/types.rs rename to src/rules/pyupgrade/types.rs diff --git a/src/ruff/mod.rs b/src/rules/ruff/mod.rs similarity index 100% rename from src/ruff/mod.rs rename to src/rules/ruff/mod.rs diff --git a/src/ruff/rules.rs b/src/rules/ruff/rules.rs similarity index 100% rename from src/ruff/rules.rs rename to src/rules/ruff/rules.rs diff --git a/src/ruff/snapshots/ruff__ruff__tests__RUF004_RUF004.py.snap b/src/rules/ruff/snapshots/ruff__ruff__tests__RUF004_RUF004.py.snap similarity index 100% rename from src/ruff/snapshots/ruff__ruff__tests__RUF004_RUF004.py.snap rename to src/rules/ruff/snapshots/ruff__ruff__tests__RUF004_RUF004.py.snap diff --git a/src/ruff/snapshots/ruff__ruff__tests__confusables.snap b/src/rules/ruff/snapshots/ruff__ruff__tests__confusables.snap similarity index 100% rename from src/ruff/snapshots/ruff__ruff__tests__confusables.snap rename to src/rules/ruff/snapshots/ruff__ruff__tests__confusables.snap diff --git a/src/ruff/snapshots/ruff__ruff__tests__flake8_noqa.snap b/src/rules/ruff/snapshots/ruff__ruff__tests__flake8_noqa.snap similarity index 100% rename from src/ruff/snapshots/ruff__ruff__tests__flake8_noqa.snap rename to src/rules/ruff/snapshots/ruff__ruff__tests__flake8_noqa.snap diff --git a/src/ruff/snapshots/ruff__ruff__tests__redirects.snap b/src/rules/ruff/snapshots/ruff__ruff__tests__redirects.snap similarity index 100% rename from src/ruff/snapshots/ruff__ruff__tests__redirects.snap rename to src/rules/ruff/snapshots/ruff__ruff__tests__redirects.snap diff --git a/src/ruff/snapshots/ruff__ruff__tests__ruf100_0.snap b/src/rules/ruff/snapshots/ruff__ruff__tests__ruf100_0.snap similarity index 100% rename from src/ruff/snapshots/ruff__ruff__tests__ruf100_0.snap rename to src/rules/ruff/snapshots/ruff__ruff__tests__ruf100_0.snap diff --git a/src/ruff/snapshots/ruff__ruff__tests__ruf100_1.snap b/src/rules/ruff/snapshots/ruff__ruff__tests__ruf100_1.snap similarity index 100% rename from src/ruff/snapshots/ruff__ruff__tests__ruf100_1.snap rename to src/rules/ruff/snapshots/ruff__ruff__tests__ruf100_1.snap diff --git a/src/ruff/snapshots/ruff__ruff__tests__ruff_noqa.snap b/src/rules/ruff/snapshots/ruff__ruff__tests__ruff_noqa.snap similarity index 100% rename from src/ruff/snapshots/ruff__ruff__tests__ruff_noqa.snap rename to src/rules/ruff/snapshots/ruff__ruff__tests__ruff_noqa.snap diff --git a/src/settings/configuration.rs b/src/settings/configuration.rs index 2e24d9af10..01d91208f9 100644 --- a/src/settings/configuration.rs +++ b/src/settings/configuration.rs @@ -12,17 +12,18 @@ use regex::Regex; use shellexpand; use shellexpand::LookupError; +use crate::fs; use crate::registry::RuleCodePrefix; +use crate::rules::{ + flake8_annotations, flake8_bandit, flake8_bugbear, flake8_errmsg, flake8_import_conventions, + flake8_pytest_style, flake8_quotes, flake8_tidy_imports, flake8_unused_arguments, isort, + mccabe, pep8_naming, pycodestyle, pydocstyle, pyupgrade, +}; use crate::settings::options::Options; use crate::settings::pyproject::load_options; use crate::settings::types::{ FilePattern, PerFileIgnore, PythonVersion, SerializationFormat, Version, }; -use crate::{ - flake8_annotations, flake8_bandit, flake8_bugbear, flake8_errmsg, flake8_import_conventions, - flake8_pytest_style, flake8_quotes, flake8_tidy_imports, flake8_unused_arguments, fs, isort, - mccabe, pep8_naming, pycodestyle, pydocstyle, pyupgrade, -}; #[derive(Debug, Default)] pub struct Configuration { diff --git a/src/settings/mod.rs b/src/settings/mod.rs index cdadbba0c2..95ae21a688 100644 --- a/src/settings/mod.rs +++ b/src/settings/mod.rs @@ -18,15 +18,16 @@ use rustc_hash::FxHashSet; use crate::cache::cache_dir; use crate::registry::{RuleCode, RuleCodePrefix, SuffixLength, CATEGORIES, INCOMPATIBLE_CODES}; +use crate::rules::{ + flake8_annotations, flake8_bandit, flake8_bugbear, flake8_errmsg, flake8_import_conventions, + flake8_pytest_style, flake8_quotes, flake8_tidy_imports, flake8_unused_arguments, isort, + mccabe, pep8_naming, pycodestyle, pydocstyle, pyupgrade, +}; use crate::settings::configuration::Configuration; use crate::settings::types::{ FilePattern, PerFileIgnore, PythonVersion, SerializationFormat, Version, }; -use crate::{ - flake8_annotations, flake8_bandit, flake8_bugbear, flake8_errmsg, flake8_import_conventions, - flake8_pytest_style, flake8_quotes, flake8_tidy_imports, flake8_unused_arguments, isort, - mccabe, pep8_naming, pycodestyle, pydocstyle, pyupgrade, warn_user_once, -}; +use crate::warn_user_once; pub mod configuration; pub mod flags; diff --git a/src/settings/options.rs b/src/settings/options.rs index c6bb5c30c4..9acde76154 100644 --- a/src/settings/options.rs +++ b/src/settings/options.rs @@ -6,12 +6,12 @@ use schemars::JsonSchema; use serde::{Deserialize, Serialize}; use crate::registry::RuleCodePrefix; -use crate::settings::types::{PythonVersion, SerializationFormat, Version}; -use crate::{ +use crate::rules::{ flake8_annotations, flake8_bandit, flake8_bugbear, flake8_errmsg, flake8_import_conventions, flake8_pytest_style, flake8_quotes, flake8_tidy_imports, flake8_unused_arguments, isort, mccabe, pep8_naming, pycodestyle, pydocstyle, pyupgrade, }; +use crate::settings::types::{PythonVersion, SerializationFormat, Version}; #[derive( Debug, PartialEq, Eq, Serialize, Deserialize, Default, ConfigurationOptions, JsonSchema, diff --git a/src/settings/pyproject.rs b/src/settings/pyproject.rs index 786a3e9172..98700e1609 100644 --- a/src/settings/pyproject.rs +++ b/src/settings/pyproject.rs @@ -129,17 +129,17 @@ mod tests { use anyhow::Result; use rustc_hash::FxHashMap; - use crate::flake8_quotes::settings::Quote; - use crate::flake8_tidy_imports::settings::{BannedApi, Strictness}; use crate::registry::RuleCodePrefix; + use crate::rules::flake8_quotes::settings::Quote; + use crate::rules::flake8_tidy_imports::settings::{BannedApi, Strictness}; + use crate::rules::{ + flake8_bugbear, flake8_errmsg, flake8_import_conventions, flake8_pytest_style, + flake8_quotes, flake8_tidy_imports, mccabe, pep8_naming, + }; use crate::settings::pyproject::{ find_settings_toml, parse_pyproject_toml, Options, Pyproject, Tools, }; use crate::settings::types::PatternPrefixPair; - use crate::{ - flake8_bugbear, flake8_errmsg, flake8_import_conventions, flake8_pytest_style, - flake8_quotes, flake8_tidy_imports, mccabe, pep8_naming, - }; #[test] fn deserialize() -> Result<()> { diff --git a/src/source_code/stylist.rs b/src/source_code/stylist.rs index 081203033b..8d20da4ea7 100644 --- a/src/source_code/stylist.rs +++ b/src/source_code/stylist.rs @@ -9,7 +9,7 @@ use rustpython_parser::lexer; use rustpython_parser::lexer::Tok; use crate::ast::types::Range; -use crate::pydocstyle::helpers::leading_quote; +use crate::rules::pydocstyle::helpers::leading_quote; use crate::source_code::Locator; use crate::vendor; diff --git a/src/violations.rs b/src/violations.rs index 60e43f1689..acfc122e96 100644 --- a/src/violations.rs +++ b/src/violations.rs @@ -5,13 +5,13 @@ use rustpython_ast::Cmpop; use serde::{Deserialize, Serialize}; use crate::define_violation; -use crate::flake8_debugger::types::DebuggerUsingType; -use crate::flake8_pytest_style::types::{ +use crate::rules::flake8_debugger::types::DebuggerUsingType; +use crate::rules::flake8_pytest_style::types::{ ParametrizeNameType, ParametrizeValuesRowType, ParametrizeValuesType, }; -use crate::flake8_quotes::settings::Quote; -use crate::flake8_tidy_imports::settings::Strictness; -use crate::pyupgrade::types::Primitive; +use crate::rules::flake8_quotes::settings::Quote; +use crate::rules::flake8_tidy_imports::settings::Strictness; +use crate::rules::pyupgrade::types::Primitive; use crate::violation::{AlwaysAutofixableViolation, Violation}; // pycodestyle errors