sarj-python-lint 1.146.4__tar.gz → 1.148.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/PKG-INFO +1 -1
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/pyproject.toml +1 -1
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/_rule_descriptors.py +9 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_registry.py +2 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_store_writes.py +40 -5
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_bulk_upsert.py +207 -7
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_injected_service.py +19 -7
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_pytest_dependency_fixtures.py +73 -12
- sarj_python_lint-1.148.0/src/sarj_python_lint/rules/prefer_single_parametrize_contract.py +191 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/.gitignore +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/LICENSE +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/README.md +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/__init__.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/__main__.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/_analysis_session.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/_autofix.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/_autofix_aliases.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/_autofix_annotations.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/_autofix_comments.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/_autofix_declared_contracts.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/_autofix_declared_tests.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/_autofix_docs.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/_autofix_enums.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/_autofix_exhaustiveness.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/_autofix_inert.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/_autofix_parameters.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/_autofix_repeated.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/_autofix_security.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/_autofix_sql_projection.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/_autofix_tests.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/_closed_sql_literal.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/_file_context.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/_filesystem.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/_fixes.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/_parallel.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/_prepared_sources.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/_python_target.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/_ratchet_cli.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/_secret_names.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/_source.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/_version.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/application_logging.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/autofix.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/benchmark.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/cast_access.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/interpreter_argv.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/json_boundary.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/py.typed +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/ratchet.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rule_base.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rule_metadata.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/__init__.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_annotation_origins.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_annotation_semantics.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_ast_index.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_ast_names.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_ast_position.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_async_lifecycle.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_binding_inventory.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_closed_helpers.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_comment_narration.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_comments.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_contract_annotation.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_copy_on_write.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_data_union_discriminator.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_declared_contracts.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_dict_key_views.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_docstrings.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_exports.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_fastapi.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_fastapi_access.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_first_party.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_fixed_record.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_fixture_contracts.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_generic_payload.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_httpx_clients.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_imports.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_inert_model_annotation.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_inherited_contract.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_local_alias_fix.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_local_source.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_logging.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_loguru.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_mapping_shape_callbacks.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_namespace_access.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_native_namespace_capability.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_native_object_contracts.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_nominal_project.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_nullable_outcome.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_numeric_proof.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_opaque_contracts.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_paths.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_postgres.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_project_index.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_prose_budget.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_pydantic_field_contract.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_pytest.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_pytest_contract_parameters.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_resolved_operation_signature.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_resource_provenance.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_route_shapes.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_runtime_bindings.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_runtime_names.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_runtime_registry.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_sdk_metadata_fields.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_service_http_callbacks.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_set_fields.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_sql.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_static_json_alias.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_store_sql.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_suppression_comments.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_test_assertions.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_test_composition.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_test_provenance.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_transactional_sql.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_type_guard_symbols.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_value_models.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/async_cleanup_registered_synchronously.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/async_executor_shutdown.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/async_mock_call_without_await_assertion.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/async_subprocess_cancellation_cleanup.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/cancel_owned_task_without_join.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/complex_postgres_query_requires_architecture_review.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/defect_xfail_requires_explicit_strict.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/delete_route_returns_no_content.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/docstring_args_restate_signature.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/docstring_returns_restate_signature.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/duplicate_adjacent_exception_handler.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/duplicate_closed_pure_helper.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/duplicate_pytest_fixture_params.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/excessive_commentary.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/failed_probe_zero_threshold.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/fakes_in_shared_location.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/fastapi_class_router_contract.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/fastapi_explicit_openapi_contract.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/fastapi_route_declares_security.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/iac_source_coupled_test.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/invalid_pydantic_field_default.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/mock_without_spec.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/named_record_at_boundaries.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/nan_hidden_by_builtin_min.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/negative_only_http_status_assertion.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_analytical_aggregation_in_postgres_store.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_any_mapping_types.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_async_client_in_constructor.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_async_function_cache.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_before_validator_input_mutation.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_blanket_suppression.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_broad_keyword_capture.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_comment_cruft.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_conflicting_pydantic_alias_validation.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_conftest_test_module_import.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_contradictory_type_guard.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_copied_inherited_docstring.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_cors_wildcard_with_credentials.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_create_verb_in_post_path.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_custom_control_flow_exception.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_database_programmability.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_defaulted_environment_setting.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_delete_statement.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_discarded_tagged_outcome.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_discarded_validation_result.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_dual_shape_model_field_reader.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_dunder_all.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_duplicate_dunder_all_entry.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_duplicate_field_validator_body.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_dynamic_builtins.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_exception_text_in_500_detail.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_excessive_cognitive_complexity.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_fastapi_on_event.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_file_level_escape_hatch_suppression.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_first_party_private_import.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_fixed_sleep_before_assert.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_fixed_sleep_in_loop.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_folded_bad_request_not_found.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_frozen_after_validator_field_write.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_generic_json_parser.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_generic_single_export_module.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_hasattr.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_hidden_constructor_fallback.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_impossible_pydantic_field_bounds.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_injected_module_loader.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_input_model_mutation.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_interpreter_source_arguments.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_invalid_argument_name_suppression.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_invalid_pydantic_bypass.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_invalid_pydantic_validator_return.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_loguru_exc_info.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_loguru_printf_format.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_magic_arithmetic.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_mocked_pydantic_value_object.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_mutating_container_transform.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_mutating_input_with_result.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_nested_pydantic_field_validator.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_nonlocal_statement.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_nullable_dependency_fallback.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_offset_pagination.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_partial_type_is.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_positional_psycopg_row_escape.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_psycopg_execution_in_loop.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_psycopg_execution_outside_injected_owner.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_random_uuid_in_sql.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_raw_connection_in_tests.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_raw_source_text_test_oracle.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_recording_store.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_redundant_attribute_unpacking.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_redundant_literal_description.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_redundant_local_alias.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_redundant_module_alias_exports.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_redundant_sql_alias.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_repeated_string_literal.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_repeated_test_body.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_restated_comment.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_secret_in_log.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_select_star.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_service_behavior_in_settings.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_shallow_container_type_guard.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_shallow_record_type_guard.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_shared_mutable_default.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_slash_collection_root_under_prefix.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_string_concat_in_loop.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_swallowed_asyncio_cancellation.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_sys_path_mutation.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_tautological_expect.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_test_comments.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_test_method_grafting.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_typed_doc_sections.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_unique_violation_message_match.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_unknown_pydantic_validator_field.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_unnecessary_docstring.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_unobserved_task_exception.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_unscoped_async_client_factory.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_unused_copy_result.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_unused_underscored_keyword_parameter.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_unused_value_marker.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_vague_suppression_description.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_value_error_forwarder.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_whole_request_response_payload_in_log.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/no_work_verb_get_route.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/numeric_literal_separators.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/opaque_parametrize_case_needs_id.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/over_mocked_test.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/phase_label_comment.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_application_model_joins.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_autospec_for_callable_mock.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_class_row.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_collection_comprehension.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_configured_cloud_scope.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_constant_time_secret_compare.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_coordinated_state_owner.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_declarative_batch_validation.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_defaultdict.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_direct_import_module.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_discriminated_model_union.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_explicit_class_contract.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_explicit_value_model_construction.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_fstring_over_concat.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_grouped_settings.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_immutable_module_constant.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_injected_dependency_over_monkeypatch.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_library_fake.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_match_assert_never.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_match_exception_dispatch.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_match_type_dispatch.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_match_value_dispatch.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_module_level_constant.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_monkeypatch_for_process_state_in_test.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_monotonic_for_elapsed_time.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_namedtuple_over_tuple_return.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_native_string_check.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_nominal_id_types.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_nominal_mapping_keys.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_non_nullable_collection.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_optional_composite.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_or_pattern.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_outcome_variants.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_precise_object_contract.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_psycopg_executemany.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_pydantic_field_bounds.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_pydantic_json_value.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_pydantic_model_assertion.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_pytest_fixture_contract.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_pytest_fixture_injection.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_regex_fullmatch.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_required_constructor_parameters.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_runtime_validation.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_self_documenting_constant.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_self_type_annotation.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_semantic_temporal_types.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_set_isdisjoint.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_single_psycopg_cursor.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_str_enum.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_struct_over_namedtuple.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_typed_cli.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_typed_mapping_get.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_typed_settings_field.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_validated_uuid_comparison.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_walrus_awaited_none_guard.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_walrus_comprehension_filter.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_walrus_regex_match.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/prefer_walrus_stream_loop.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/production_derived_test_cases.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/psycopg_sql_format_field_mismatch.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/pytest_fixture_returns_bare_tuple.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/pytest_fixture_returns_closed_resource.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/redundant_class_docstring.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/redundant_docstring.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/redundant_module_docstring.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/redundant_test_constructor_forwarder.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/repeated_kwarg_heavy_call_in_test.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/repeated_static_call_cases.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/repeated_test_composition.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/repeated_unimplemented_test_contract.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/require_constrained_api_integer.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/require_exp_on_jwt_decode.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/require_explicit_contract_implementation.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/require_explicit_psycopg_transaction.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/require_explicit_service_contract.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/require_hidden_settings_input.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/require_injectable_retry_sleep.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/require_keyword_only_swap_prone_params.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/require_nodecode_for_splitting_settings_field.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/require_port_for_service.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/require_precise_factory_signature.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/require_public_dependency_contract.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/require_pydantic_for_external_json.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/require_pydantic_for_mapping_shape.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/require_pydantic_for_structured_payload.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/require_pydantic_ordinal_lower_bound.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/restated_test_docstring.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/service_singleton_delegates_to_bulk.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/shared_mutable_pydantic_factory.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/stepdown.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/store_field_update_reuses_upsert.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/store_get_delegates_to_bulk_read.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/store_insert_requires_explicit_conflict_policy.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/store_insert_requires_on_conflict.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/store_mutation_command_fanout.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/subprocess_kill_without_reap.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/test_without_explicit_oracle.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/timestamp_order_requires_tiebreaker.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/trailing_value_narration.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/typed_error_reasons.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/uncontrolled_randomness_in_test.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/unused_mock_setup.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/unused_test_factory_option.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/sql_literals.py +0 -0
- {sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/suppression_policy.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: sarj-python-lint
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.148.0
|
|
4
4
|
Summary: Custom Python lint rules — AST-based, pre-commit-friendly, hypermodern defaults
|
|
5
5
|
Project-URL: Homepage, https://code-standards.sarj.ai/rules/python/
|
|
6
6
|
Project-URL: Documentation, https://code-standards.sarj.ai/rules/python/
|
{sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/_rule_descriptors.py
RENAMED
|
@@ -8,6 +8,15 @@ from sarj_python_lint.rule_metadata import RuleDescriptor
|
|
|
8
8
|
|
|
9
9
|
SCHEMA_VERSION = 1
|
|
10
10
|
DESCRIPTORS: tuple[RuleDescriptor, ...] = (
|
|
11
|
+
RuleDescriptor(
|
|
12
|
+
rule_id=RuleId("prefer-single-parametrize-contract"),
|
|
13
|
+
module="sarj_python_lint.rules.prefer_single_parametrize_contract",
|
|
14
|
+
class_name="PreferSingleParametrizeContract",
|
|
15
|
+
code="SARJ583",
|
|
16
|
+
description="Prefer one explicit pytest parameter contract; preserve Cartesian products compactly.",
|
|
17
|
+
aliases=(),
|
|
18
|
+
enabled_by_default=True,
|
|
19
|
+
),
|
|
11
20
|
RuleDescriptor(
|
|
12
21
|
rule_id=RuleId("prefer-pydantic-field-bounds"),
|
|
13
22
|
module="sarj_python_lint.rules.prefer_pydantic_field_bounds",
|
{sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_registry.py
RENAMED
|
@@ -287,6 +287,7 @@ from sarj_python_lint.rules.prefer_pydantic_model_assertion import PreferPydanti
|
|
|
287
287
|
from sarj_python_lint.rules.prefer_pytest_dependency_fixtures import PreferPytestDependencyFixtures
|
|
288
288
|
from sarj_python_lint.rules.prefer_runtime_validation import PreferRuntimeValidation
|
|
289
289
|
from sarj_python_lint.rules.prefer_semantic_temporal_types import PreferSemanticTemporalTypes
|
|
290
|
+
from sarj_python_lint.rules.prefer_single_parametrize_contract import PreferSingleParametrizeContract
|
|
290
291
|
from sarj_python_lint.rules.prefer_single_psycopg_cursor import PreferSinglePsycopgCursor
|
|
291
292
|
from sarj_python_lint.rules.prefer_typed_cli import PreferTypedCli
|
|
292
293
|
from sarj_python_lint.rules.prefer_typed_mapping_get import PreferTypedMappingGet
|
|
@@ -308,6 +309,7 @@ from sarj_python_lint.rules.test_without_explicit_oracle import NoExplicitTestOr
|
|
|
308
309
|
|
|
309
310
|
_AUTHORING_REGISTRY: Mapping[str, type[Rule]] = MappingProxyType(
|
|
310
311
|
{
|
|
312
|
+
PreferSingleParametrizeContract.id: PreferSingleParametrizeContract,
|
|
311
313
|
PreferPydanticFieldBounds.id: PreferPydanticFieldBounds,
|
|
312
314
|
NoValueErrorForwarder.id: NoValueErrorForwarder,
|
|
313
315
|
PreferDefaultdict.id: PreferDefaultdict,
|
{sarj_python_lint-1.146.4 → sarj_python_lint-1.148.0}/src/sarj_python_lint/rules/_store_writes.py
RENAMED
|
@@ -348,6 +348,24 @@ def collection_item(annotation: ast.expr | None, imports: ImportIndex) -> ast.ex
|
|
|
348
348
|
return None
|
|
349
349
|
|
|
350
350
|
|
|
351
|
+
def collection_method(owner: ast.ClassDef, imports: ImportIndex, name: str) -> Function | None:
|
|
352
|
+
if owner.keywords or (method := methods(owner).get(name)) is None:
|
|
353
|
+
return None
|
|
354
|
+
if any(
|
|
355
|
+
decorator_name(decorator, method, owner, imports) not in _NEUTRAL_DECORATORS
|
|
356
|
+
for decorator in method.decorator_list
|
|
357
|
+
):
|
|
358
|
+
return None
|
|
359
|
+
parameters = method_parameters(method)
|
|
360
|
+
return (
|
|
361
|
+
method
|
|
362
|
+
if parameters is not None
|
|
363
|
+
and len(parameters) == 1
|
|
364
|
+
and collection_item(parameters[0].annotation, imports) is not None
|
|
365
|
+
else None
|
|
366
|
+
)
|
|
367
|
+
|
|
368
|
+
|
|
351
369
|
def same_type(left: ast.expr | None, right: ast.expr | None) -> bool:
|
|
352
370
|
left, right = AnnotationSemantics.parse(left), AnnotationSemantics.parse(right)
|
|
353
371
|
return (
|
|
@@ -469,11 +487,13 @@ class _ReceiverAliases:
|
|
|
469
487
|
pass
|
|
470
488
|
return frozenset(origins)
|
|
471
489
|
|
|
472
|
-
def replaced(
|
|
490
|
+
def replaced(
|
|
491
|
+
self, origin: _ReceiverOrigin, nodes: Iterable[ast.AST], *, members: frozenset[str] = _STORE_MEMBERS
|
|
492
|
+
) -> bool:
|
|
473
493
|
return any(
|
|
474
494
|
(origins := self.origins(target)) is None or origin in origins
|
|
475
495
|
for node in nodes
|
|
476
|
-
if (target := _replaced_receiver(node, self.context.imports)) is not None
|
|
496
|
+
if (target := _replaced_receiver(node, self.context.imports, members)) is not None
|
|
477
497
|
)
|
|
478
498
|
|
|
479
499
|
def _preceding_bindings(self, expression: ast.Name) -> tuple[ast.AST, ...]:
|
|
@@ -581,6 +601,21 @@ class StoreOwners:
|
|
|
581
601
|
def _receiver_method_replaced(self, binding: ast.arg) -> bool:
|
|
582
602
|
return self.aliases.replaced(_ReceiverOrigin(binding), self.context.nodes(ast.Attribute, ast.Call))
|
|
583
603
|
|
|
604
|
+
def instance_member_replaced(self, owner: ast.ClassDef, member: str) -> bool:
|
|
605
|
+
for method in owner.body:
|
|
606
|
+
if not isinstance(method, ast.FunctionDef | ast.AsyncFunctionDef):
|
|
607
|
+
continue
|
|
608
|
+
positional = [*method.args.posonlyargs, *method.args.args]
|
|
609
|
+
if (
|
|
610
|
+
positional
|
|
611
|
+
and positional[0].arg == "self"
|
|
612
|
+
and self.aliases.replaced(
|
|
613
|
+
_ReceiverOrigin(positional[0]), own_nodes(method), members=frozenset({member, "__class__"})
|
|
614
|
+
)
|
|
615
|
+
):
|
|
616
|
+
return True
|
|
617
|
+
return False
|
|
618
|
+
|
|
584
619
|
def _injected_annotation(self, attribute: str, at: ast.AST) -> ast.expr | None:
|
|
585
620
|
parent = self.context.parents.get(at)
|
|
586
621
|
while parent is not None and not isinstance(parent, ast.ClassDef):
|
|
@@ -677,8 +712,8 @@ def _constructor_injected_value(constructor: Function, assignment: ast.AST) -> a
|
|
|
677
712
|
return None
|
|
678
713
|
|
|
679
714
|
|
|
680
|
-
def _replaced_receiver(node: ast.AST, imports: ImportIndex) -> ast.expr | None:
|
|
681
|
-
if isinstance(node, ast.Attribute) and isinstance(node.ctx, ast.Store | ast.Del) and node.attr in
|
|
715
|
+
def _replaced_receiver(node: ast.AST, imports: ImportIndex, members: frozenset[str]) -> ast.expr | None:
|
|
716
|
+
if isinstance(node, ast.Attribute) and isinstance(node.ctx, ast.Store | ast.Del) and node.attr in members:
|
|
682
717
|
return node.value
|
|
683
718
|
if not isinstance(node, ast.Call) or node.keywords:
|
|
684
719
|
return None
|
|
@@ -689,7 +724,7 @@ def _replaced_receiver(node: ast.AST, imports: ImportIndex) -> ast.expr | None:
|
|
|
689
724
|
if required is None or len(node.args) != required:
|
|
690
725
|
return None
|
|
691
726
|
member = node.args[1]
|
|
692
|
-
return node.args[0] if isinstance(member, ast.Constant) and member.value in
|
|
727
|
+
return node.args[0] if isinstance(member, ast.Constant) and member.value in members else None
|
|
693
728
|
|
|
694
729
|
|
|
695
730
|
def _injected_parameter(constructor: Function, value: ast.Name, provenance: ResourceProvenance) -> ast.expr | None:
|
|
@@ -21,11 +21,14 @@ from sarj_python_lint.rules._ast_index import has_own_yield
|
|
|
21
21
|
from sarj_python_lint.rules._resource_provenance import import_name_for_binding
|
|
22
22
|
from sarj_python_lint.rules._store_writes import (
|
|
23
23
|
StoreOwners,
|
|
24
|
+
collection_method,
|
|
24
25
|
compatible_collection_pair,
|
|
25
26
|
depends_on_target,
|
|
26
27
|
discarded_call,
|
|
27
28
|
known_single_iteration,
|
|
28
29
|
method_parameters,
|
|
30
|
+
methods,
|
|
31
|
+
own_nodes,
|
|
29
32
|
read_pair,
|
|
30
33
|
)
|
|
31
34
|
|
|
@@ -43,6 +46,7 @@ _WRITE_PAIRS: Final[Mapping[str, str]] = MappingProxyType(
|
|
|
43
46
|
{name: name + "_many" for name in ("upsert", "create", "insert", "update", "delete")}
|
|
44
47
|
)
|
|
45
48
|
_READ_BULK_NAMES = ("get_many", "get_by_ids")
|
|
49
|
+
_BULK_NAMES = frozenset((*_WRITE_PAIRS.values(), *_READ_BULK_NAMES))
|
|
46
50
|
|
|
47
51
|
|
|
48
52
|
@dataclass(frozen=True, slots=True)
|
|
@@ -50,6 +54,7 @@ class _BulkCandidate:
|
|
|
50
54
|
call: ast.Call
|
|
51
55
|
bulk_name: str
|
|
52
56
|
fan_out: bool = False
|
|
57
|
+
singleton_batch: bool = False
|
|
53
58
|
|
|
54
59
|
|
|
55
60
|
@dataclass(frozen=True, slots=True)
|
|
@@ -76,9 +81,42 @@ class PreferBulkUpsert(ProjectRule):
|
|
|
76
81
|
"Receivers must resolve to typed parameters or constructor-injected attributes. Signatures require one required input and matching scalar/collection input types. Writes retain matching scalar/collection output types. Read output may be T or T | None/Optional[T] versus list/Sequence[T] or dict/Mapping[K, T], with K matching the input key type. Missing-row placeholders, duplicate keys, cardinality and request order require review.",
|
|
77
82
|
"Annotated first-party imports use the project index; unresolved, inherited, overloaded, decorated, rebound, reassigned and dynamic contracts are excluded, as are explicit metaclasses and class keywords. Unknown backend APIs and dictionary/cache joins do not prove a batch opportunity.",
|
|
78
83
|
"Other result-dependent loops, filtered/nested comprehensions, async streams, loop else clauses, extra effects and per-row exception or transaction blocks are excluded. Batch atomicity and tenant/auth or snapshot behavior require review; this remains a warning without an autofix.",
|
|
84
|
+
"An explicit one-item list/tuple passed to a declared CRUD/read bulk collection parameter is also checked in synchronous for loops, including result-dependent/effectful bodies and one directly awaited same-class private helper. Inputs must retain their loop-target or helper-parameter binding. Helpers are not followed recursively; deferred scopes, comprehensions, yielding/decorated/replaced helpers, terminal loops, unknown contracts and multiple context parameters are excluded. Intentional per-row transactions require an exact suppression at the bulk call.",
|
|
79
85
|
"Maintained tests are checked; generated/vendor sources are excluded. A bulk method is not invented when none is declared.",
|
|
80
86
|
),
|
|
81
87
|
examples=(
|
|
88
|
+
RuleExample(
|
|
89
|
+
example_id="singleton-bulk-input",
|
|
90
|
+
scenario="singleton-bulk-input",
|
|
91
|
+
title="A bulk method called with one item still repeats the backend operation",
|
|
92
|
+
outcome=ExampleOutcome.MATCH,
|
|
93
|
+
files=(
|
|
94
|
+
ExampleFile.python(
|
|
95
|
+
"app/service.py",
|
|
96
|
+
_CONTRACT
|
|
97
|
+
+ "async def save(store: UserStore, users):\n for user in users:\n saved = await store.upsert_many([user])\n record(saved)\n",
|
|
98
|
+
),
|
|
99
|
+
),
|
|
100
|
+
focus_path=PurePosixPath("app/service.py"),
|
|
101
|
+
expected_count=1,
|
|
102
|
+
public=True,
|
|
103
|
+
),
|
|
104
|
+
RuleExample(
|
|
105
|
+
example_id="collected-bulk-input",
|
|
106
|
+
scenario="singleton-bulk-input",
|
|
107
|
+
title="Collect inputs before the bulk call",
|
|
108
|
+
outcome=ExampleOutcome.NO_MATCH,
|
|
109
|
+
files=(
|
|
110
|
+
ExampleFile.python(
|
|
111
|
+
"app/service.py",
|
|
112
|
+
_CONTRACT
|
|
113
|
+
+ "async def save(store: UserStore, users):\n saved = await store.upsert_many(users)\n record(saved)\n",
|
|
114
|
+
),
|
|
115
|
+
),
|
|
116
|
+
focus_path=PurePosixPath("app/service.py"),
|
|
117
|
+
expected_count=0,
|
|
118
|
+
public=True,
|
|
119
|
+
),
|
|
82
120
|
RuleExample(
|
|
83
121
|
example_id="serial-upserts",
|
|
84
122
|
title="Collect writes for an available bulk command",
|
|
@@ -222,13 +260,17 @@ class PreferBulkUpsert(ProjectRule):
|
|
|
222
260
|
if owners.provenance.dynamic_namespace:
|
|
223
261
|
return []
|
|
224
262
|
findings: list[Diagnostic] = []
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
call, bulk_name = candidate.call, candidate.bulk_name
|
|
230
|
-
if context.suppressions.is_suppressed(call.lineno, self.code):
|
|
263
|
+
reported: set[ast.Call] = set()
|
|
264
|
+
for match in _bulk_candidates(owners):
|
|
265
|
+
call, bulk_name = match.call, match.bulk_name
|
|
266
|
+
if call in reported or context.suppressions.is_suppressed(call.lineno, self.code):
|
|
231
267
|
continue
|
|
268
|
+
reported.add(call)
|
|
269
|
+
detail = (
|
|
270
|
+
f"Repeated `{bulk_name}` receives one item per loop iteration"
|
|
271
|
+
if match.singleton_batch
|
|
272
|
+
else f"This {'fan-out' if match.fan_out else 'serial'} {call.func.attr if isinstance(call.func, ast.Attribute) else 'singleton call'} has a declared compatible `{bulk_name}`"
|
|
273
|
+
)
|
|
232
274
|
findings.append(
|
|
233
275
|
Diagnostic(
|
|
234
276
|
path=context.path,
|
|
@@ -236,12 +278,170 @@ class PreferBulkUpsert(ProjectRule):
|
|
|
236
278
|
col=call.col_offset + 1,
|
|
237
279
|
code=self.code,
|
|
238
280
|
severity=Severity.WARNING,
|
|
239
|
-
message=f"
|
|
281
|
+
message=f"{detail}; review bounded batching while preserving missing rows, cardinality, order, duplicate-key, atomicity, concurrency, failure, cancellation, backpressure, tenant, and transaction semantics.",
|
|
240
282
|
)
|
|
241
283
|
)
|
|
242
284
|
return findings
|
|
243
285
|
|
|
244
286
|
|
|
287
|
+
def _bulk_candidates(owners: StoreOwners) -> list[_BulkCandidate]:
|
|
288
|
+
candidates: list[_BulkCandidate] = []
|
|
289
|
+
for node in owners.context.nodes(ast.For, ast.ListComp, ast.DictComp, ast.Await):
|
|
290
|
+
if candidate := _bulk_candidate(node, owners):
|
|
291
|
+
candidates.append(candidate)
|
|
292
|
+
if isinstance(node, ast.For):
|
|
293
|
+
candidates.extend(_singleton_bulk_calls(node, owners))
|
|
294
|
+
return candidates
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
def _singleton_bulk_calls(loop: ast.For, owners: StoreOwners) -> list[_BulkCandidate]:
|
|
298
|
+
if (
|
|
299
|
+
loop.orelse
|
|
300
|
+
or known_single_iteration(loop.iter)
|
|
301
|
+
or any(isinstance(node, ast.Break | ast.Return | ast.Raise) for node in own_nodes(loop))
|
|
302
|
+
):
|
|
303
|
+
return []
|
|
304
|
+
inputs = {
|
|
305
|
+
node.id: node
|
|
306
|
+
for node in ast.walk(loop.target)
|
|
307
|
+
if isinstance(node, ast.Name) and isinstance(node.ctx, ast.Store)
|
|
308
|
+
}
|
|
309
|
+
candidates: list[_BulkCandidate] = []
|
|
310
|
+
for call in _eager_calls(loop):
|
|
311
|
+
if candidate := _singleton_bulk_call(call, inputs, owners):
|
|
312
|
+
candidates.append(candidate)
|
|
313
|
+
candidates.extend(_helper_bulk_calls(call, inputs, owners))
|
|
314
|
+
return candidates
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
def _helper_bulk_calls(
|
|
318
|
+
call: ast.Call, inputs: Mapping[str, ast.Name | ast.arg], owners: StoreOwners
|
|
319
|
+
) -> list[_BulkCandidate]:
|
|
320
|
+
helper = _private_helper(call, owners)
|
|
321
|
+
if helper is None or (arguments := _method_arguments(call, helper)) is None:
|
|
322
|
+
return []
|
|
323
|
+
parameters = {parameter.arg: parameter for parameter in method_parameters(helper) or ()}
|
|
324
|
+
dependent = {
|
|
325
|
+
name: parameters[name] for name, argument in arguments.items() if _reads_inputs(argument, inputs, owners)
|
|
326
|
+
}
|
|
327
|
+
if not dependent:
|
|
328
|
+
return []
|
|
329
|
+
return [
|
|
330
|
+
candidate
|
|
331
|
+
for inner in _eager_calls(helper)
|
|
332
|
+
if (candidate := _singleton_bulk_call(inner, dependent, owners)) is not None
|
|
333
|
+
]
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
def _eager_calls(root: ast.AST) -> list[ast.Call]:
|
|
337
|
+
pending = list(ast.iter_child_nodes(root))
|
|
338
|
+
calls: list[ast.Call] = []
|
|
339
|
+
while pending:
|
|
340
|
+
node = pending.pop()
|
|
341
|
+
if isinstance(
|
|
342
|
+
node,
|
|
343
|
+
ast.FunctionDef
|
|
344
|
+
| ast.AsyncFunctionDef
|
|
345
|
+
| ast.ClassDef
|
|
346
|
+
| ast.Lambda
|
|
347
|
+
| ast.GeneratorExp
|
|
348
|
+
| ast.ListComp
|
|
349
|
+
| ast.SetComp
|
|
350
|
+
| ast.DictComp,
|
|
351
|
+
):
|
|
352
|
+
continue
|
|
353
|
+
if isinstance(node, ast.Call):
|
|
354
|
+
calls.append(node)
|
|
355
|
+
pending.extend(ast.iter_child_nodes(node))
|
|
356
|
+
return calls
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
def _reads_inputs(expression: ast.expr, inputs: Mapping[str, ast.Name | ast.arg], owners: StoreOwners) -> bool:
|
|
360
|
+
return any(
|
|
361
|
+
isinstance(node, ast.Name)
|
|
362
|
+
and isinstance(node.ctx, ast.Load)
|
|
363
|
+
and node.id in inputs
|
|
364
|
+
and owners.provenance.binding(node.id, node) is inputs[node.id]
|
|
365
|
+
for node in own_nodes(expression)
|
|
366
|
+
)
|
|
367
|
+
|
|
368
|
+
|
|
369
|
+
def _singleton_bulk_call(
|
|
370
|
+
call: ast.Call, inputs: Mapping[str, ast.Name | ast.arg], owners: StoreOwners
|
|
371
|
+
) -> _BulkCandidate | None:
|
|
372
|
+
if not isinstance(call.func, ast.Attribute) or call.func.attr not in _BULK_NAMES:
|
|
373
|
+
return None
|
|
374
|
+
owner = owners.receiver(call.func.value, call)
|
|
375
|
+
method = collection_method(*owner, call.func.attr) if owner is not None else None
|
|
376
|
+
if method is None or has_own_yield(method):
|
|
377
|
+
return None
|
|
378
|
+
if isinstance(method, ast.AsyncFunctionDef) != isinstance(owners.context.parents.get(call), ast.Await):
|
|
379
|
+
return None
|
|
380
|
+
arguments = _method_arguments(call, method)
|
|
381
|
+
argument = next(iter(arguments.values())) if arguments else None
|
|
382
|
+
if not isinstance(argument, ast.List | ast.Tuple) or len(argument.elts) != 1:
|
|
383
|
+
return None
|
|
384
|
+
item = argument.elts[0]
|
|
385
|
+
if isinstance(item, ast.Starred) or not _reads_inputs(item, inputs, owners):
|
|
386
|
+
return None
|
|
387
|
+
return _BulkCandidate(call, call.func.attr, singleton_batch=True)
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
def _private_helper(call: ast.Call, owners: StoreOwners) -> Function | None:
|
|
391
|
+
function = call.func
|
|
392
|
+
if (
|
|
393
|
+
not isinstance(function, ast.Attribute)
|
|
394
|
+
or not isinstance(function.value, ast.Name)
|
|
395
|
+
or function.value.id != "self"
|
|
396
|
+
):
|
|
397
|
+
return None
|
|
398
|
+
if not function.attr.startswith("_") or function.attr.startswith("__"):
|
|
399
|
+
return None
|
|
400
|
+
binding = owners.provenance.binding("self", function.value)
|
|
401
|
+
arguments = owners.context.parents.get(binding) if binding is not None else None
|
|
402
|
+
method = owners.context.parents.get(arguments) if arguments is not None else None
|
|
403
|
+
owner = owners.context.parents.get(method) if method is not None else None
|
|
404
|
+
if (
|
|
405
|
+
not isinstance(binding, ast.arg)
|
|
406
|
+
or not isinstance(method, ast.FunctionDef | ast.AsyncFunctionDef)
|
|
407
|
+
or not isinstance(owner, ast.ClassDef)
|
|
408
|
+
):
|
|
409
|
+
return None
|
|
410
|
+
if (
|
|
411
|
+
[*method.args.posonlyargs, *method.args.args][:1] != [binding]
|
|
412
|
+
or owner.keywords
|
|
413
|
+
or owner.decorator_list
|
|
414
|
+
or owner.name in owners.provenance.mutated
|
|
415
|
+
):
|
|
416
|
+
return None
|
|
417
|
+
helper = methods(owner).get(function.attr)
|
|
418
|
+
if (
|
|
419
|
+
helper is None
|
|
420
|
+
or helper.decorator_list
|
|
421
|
+
or has_own_yield(helper)
|
|
422
|
+
or owners.instance_member_replaced(owner, function.attr)
|
|
423
|
+
):
|
|
424
|
+
return None
|
|
425
|
+
if isinstance(helper, ast.AsyncFunctionDef) != isinstance(owners.context.parents.get(call), ast.Await):
|
|
426
|
+
return None
|
|
427
|
+
return helper
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
def _method_arguments(call: ast.Call, helper: Function) -> dict[str, ast.expr] | None:
|
|
431
|
+
parameters = method_parameters(helper)
|
|
432
|
+
positional = [*helper.args.posonlyargs, *helper.args.args][1:]
|
|
433
|
+
if parameters is None or len(call.args) > len(positional) or any(isinstance(arg, ast.Starred) for arg in call.args):
|
|
434
|
+
return None
|
|
435
|
+
values = {parameter.arg: value for parameter, value in zip(positional, call.args, strict=False)}
|
|
436
|
+
names = {parameter.arg for parameter in parameters}
|
|
437
|
+
positional_only = {parameter.arg for parameter in helper.args.posonlyargs}
|
|
438
|
+
for keyword in call.keywords:
|
|
439
|
+
if keyword.arg is None or keyword.arg not in names or keyword.arg in values or keyword.arg in positional_only:
|
|
440
|
+
return None
|
|
441
|
+
values[keyword.arg] = keyword.value
|
|
442
|
+
return values if values.keys() == names else None
|
|
443
|
+
|
|
444
|
+
|
|
245
445
|
def _bulk_candidate(
|
|
246
446
|
node: ast.For | ast.ListComp | ast.DictComp | ast.Await, owners: StoreOwners
|
|
247
447
|
) -> _BulkCandidate | None:
|
|
@@ -92,12 +92,13 @@ class PreferInjectedService(ProjectRule):
|
|
|
92
92
|
return []
|
|
93
93
|
contracts: DeclaredContracts | None = None
|
|
94
94
|
diagnostics: list[Diagnostic] = []
|
|
95
|
+
changed_fields: dict[ast.ClassDef, frozenset[str]] = {}
|
|
95
96
|
for call in context.nodes(ast.Call):
|
|
96
97
|
method = _enclosing_method(call, context)
|
|
97
98
|
owner = context.parents.get(method) if method is not None else None
|
|
98
99
|
if method is None or not isinstance(owner, ast.ClassDef):
|
|
99
100
|
continue
|
|
100
|
-
if not _stable_arguments(call, method, owner, context):
|
|
101
|
+
if not _stable_arguments(call, method, owner, context, changed_fields):
|
|
101
102
|
continue
|
|
102
103
|
if contracts is None:
|
|
103
104
|
contracts = DeclaredContracts(context)
|
|
@@ -159,7 +160,11 @@ def _self_field(expression: ast.AST) -> str | None:
|
|
|
159
160
|
|
|
160
161
|
|
|
161
162
|
def _stable_arguments(
|
|
162
|
-
call: ast.Call,
|
|
163
|
+
call: ast.Call,
|
|
164
|
+
method: ast.FunctionDef | ast.AsyncFunctionDef,
|
|
165
|
+
owner: ast.ClassDef,
|
|
166
|
+
context: PythonFileContext,
|
|
167
|
+
changed_fields: dict[ast.ClassDef, frozenset[str]],
|
|
163
168
|
) -> bool:
|
|
164
169
|
values = [*call.args, *(keyword.value for keyword in call.keywords)]
|
|
165
170
|
if not values or any(keyword.arg is None for keyword in call.keywords):
|
|
@@ -171,11 +176,10 @@ def _stable_arguments(
|
|
|
171
176
|
parameters = set(arguments[1:])
|
|
172
177
|
stored = self_stored_parameters(constructor, context.imports)
|
|
173
178
|
fields = frozenset(field for names in stored.fields_by_parameter.values() for field in names)
|
|
174
|
-
changed
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
changed.update(_written_fields(item))
|
|
179
|
+
changed = changed_fields.get(owner)
|
|
180
|
+
if changed is None:
|
|
181
|
+
changed = _nonconstructor_written_fields(owner, constructor)
|
|
182
|
+
changed_fields[owner] = changed
|
|
179
183
|
provenance = context.static_resource_provenance
|
|
180
184
|
receiver = (method.args.posonlyargs + method.args.args)[0]
|
|
181
185
|
return all(
|
|
@@ -189,6 +193,14 @@ def _stable_arguments(
|
|
|
189
193
|
)
|
|
190
194
|
|
|
191
195
|
|
|
196
|
+
def _nonconstructor_written_fields(
|
|
197
|
+
owner: ast.ClassDef, constructor: ast.FunctionDef | ast.AsyncFunctionDef
|
|
198
|
+
) -> frozenset[str]:
|
|
199
|
+
return frozenset(
|
|
200
|
+
field for method in class_methods(owner) if method is not constructor for field in _written_fields(method)
|
|
201
|
+
)
|
|
202
|
+
|
|
203
|
+
|
|
192
204
|
def _written_fields(method: ast.FunctionDef | ast.AsyncFunctionDef) -> frozenset[str]:
|
|
193
205
|
return frozenset(
|
|
194
206
|
field
|
|
@@ -71,9 +71,40 @@ class PreferPytestDependencyFixtures(ProjectRule):
|
|
|
71
71
|
"A source-owned function parameter is also a collaborator when its ABC/Protocol declares a method actually invoked on that exact parameter. Explicit positional/keyword binding is required; decorated, generic, variadic, reassigned, patched and unresolved functions abstain. Undecorated private module helpers are checked only when their unique binding has nonempty references that are all direct calls from eligible collected tests, outside pytest.raises. Public, unreferenced, exported, escaped, nested or indirectly called helpers and dynamic namespaces abstain. The private visibility gate does not infer collaborator types; this one-hop local ownership proof cannot detect another module importing a private test helper. Helper findings have no automatic fix.",
|
|
72
72
|
"Native HTTPX Client/AsyncClient constructors also enter through fixtures, including managed clients and runtime-import aliases; source definitions are not required. Opaque constructor factories and reassigned or patched providers are excluded. No transport or teardown is synthesized.",
|
|
73
73
|
"Also reports source-resolved constructors whose class matches a supplied fixture annotation or implements its ABC/Protocol. Parametrized values, shadowed constructors and unresolved types are excluded. A different configuration needs a typed factory fixture; the rule never replaces an instance automatically.",
|
|
74
|
+
"Native pytest collected-parameter facts distinguish requested instances and factories from default arguments, module/class parameter data and visible generation hooks. A requested factory annotated with the unshadowed builtin type[SourceOwnedClass] also establishes that exact collaborator contract. Direct construction bypasses that requested factory and produces a manual warning; calling the supplied factory, construction inside pytest.raises, parametrized factories, shadowed type and unresolved class annotations abstain. No fix changes constructor arguments, borrowed connections, resource acquisition or lifetime.",
|
|
74
75
|
"Also recognizes an unrequested function-scoped provider in the test module, ancestor conftest or a literal pytest_plugins registration when a source-owned ABC implementation borrows an attribute of a typed requested fixture. Its single assigned instance must perform an operation before a later assertion directly observes the original fixture; constructor-only and direct-subject observations abstain. Only direct one-input providers are supported; factories, variants, broader lifetimes, class-local providers, unexplained overrides and nested/dynamic registration abstain. Parametrized owner data, unresolved marks and visible generation hooks abstain. Ambient marks need direct module/class declarations; imported, read/escaped, augmented or indirectly assigned pytestmark bindings abstain. Provider class matching does not prove resource or lifecycle equivalence; these findings require manual fixture/factory selection and have no automatic fix.",
|
|
75
76
|
),
|
|
76
77
|
examples=(
|
|
78
|
+
RuleExample(
|
|
79
|
+
example_id="bypassed-probe-factory",
|
|
80
|
+
scenario="requested-constructor-factory",
|
|
81
|
+
title="Direct construction bypasses the requested typed factory",
|
|
82
|
+
outcome=ExampleOutcome.MATCH,
|
|
83
|
+
files=(
|
|
84
|
+
ExampleFile.python(
|
|
85
|
+
"tests/test_probe.py",
|
|
86
|
+
"import pytest\nclass Probe:\n def __init__(self, connection): self.connection = connection\n@pytest.fixture\ndef probe_factory() -> type[Probe]:\n return Probe\ndef test_connection(probe_factory: type[Probe], connection):\n probe = Probe(connection)\n assert probe.connection is connection\n",
|
|
87
|
+
),
|
|
88
|
+
),
|
|
89
|
+
focus_path=PurePosixPath("tests/test_probe.py"),
|
|
90
|
+
expected_count=1,
|
|
91
|
+
public=True,
|
|
92
|
+
),
|
|
93
|
+
RuleExample(
|
|
94
|
+
example_id="requested-probe-factory",
|
|
95
|
+
scenario="requested-constructor-factory",
|
|
96
|
+
title="The fixture factory receives the same borrowed connection",
|
|
97
|
+
outcome=ExampleOutcome.NO_MATCH,
|
|
98
|
+
files=(
|
|
99
|
+
ExampleFile.python(
|
|
100
|
+
"tests/test_probe.py",
|
|
101
|
+
"import pytest\nclass Probe:\n def __init__(self, connection): self.connection = connection\n@pytest.fixture\ndef probe_factory() -> type[Probe]:\n return Probe\ndef test_connection(probe_factory: type[Probe], connection):\n probe = probe_factory(connection)\n assert probe.connection is connection\n",
|
|
102
|
+
),
|
|
103
|
+
),
|
|
104
|
+
focus_path=PurePosixPath("tests/test_probe.py"),
|
|
105
|
+
expected_count=0,
|
|
106
|
+
public=True,
|
|
107
|
+
),
|
|
77
108
|
RuleExample(
|
|
78
109
|
example_id="helper-function-collaborator",
|
|
79
110
|
scenario="helper-function-collaborator",
|
|
@@ -243,16 +274,17 @@ class PreferPytestDependencyFixtures(ProjectRule):
|
|
|
243
274
|
functions = tuple(
|
|
244
275
|
function for function in collected_tests(context.tree.body) if ordinary_pytest_test(function, context)
|
|
245
276
|
)
|
|
277
|
+
fixture_parameters = _requested_fixture_parameters(functions, context, contracts)
|
|
246
278
|
consumers: dict[SymbolRef, _FunctionConsumer | None] = {}
|
|
247
279
|
for function in functions:
|
|
248
|
-
hits.update(_constructed_dependencies(function, context, contracts, consumers))
|
|
280
|
+
hits.update(_constructed_dependencies(function, context, contracts, consumers, fixture_parameters))
|
|
249
281
|
borrowed.update(_borrowed_fixture_constructors(function, context, contracts))
|
|
250
282
|
for helper in _test_owned_helpers(context, functions):
|
|
251
283
|
aliases = bindings(helper)
|
|
252
284
|
for call in (node for node in direct_nodes(helper) if isinstance(node, ast.Call)):
|
|
253
285
|
if not _inside_raises(context, call, helper):
|
|
254
286
|
hits.update(_call_dependencies(call, context, contracts, aliases, consumers))
|
|
255
|
-
hits.update(_borrowed_fixture_hits(borrowed, context, contracts))
|
|
287
|
+
hits.update(_borrowed_fixture_hits(borrowed, context, contracts, fixture_parameters))
|
|
256
288
|
return [
|
|
257
289
|
Diagnostic(
|
|
258
290
|
context.path,
|
|
@@ -268,7 +300,10 @@ class PreferPytestDependencyFixtures(ProjectRule):
|
|
|
268
300
|
|
|
269
301
|
|
|
270
302
|
def _borrowed_fixture_hits(
|
|
271
|
-
borrowed: Mapping[ast.Call, DeclaredClass],
|
|
303
|
+
borrowed: Mapping[ast.Call, DeclaredClass],
|
|
304
|
+
context: PythonFileContext,
|
|
305
|
+
contracts: DeclaredContracts,
|
|
306
|
+
requested: frozenset[ast.arg],
|
|
272
307
|
) -> Iterator[ast.Call]:
|
|
273
308
|
if not borrowed:
|
|
274
309
|
return
|
|
@@ -276,11 +311,6 @@ def _borrowed_fixture_hits(
|
|
|
276
311
|
eligible = {call for call, model in borrowed.items() if model.declaration in available}
|
|
277
312
|
if not eligible or not _stable_ambient_marks(context):
|
|
278
313
|
return
|
|
279
|
-
requested = frozenset(
|
|
280
|
-
argument
|
|
281
|
-
for _, arguments in FixtureContractParameters(context, contracts, ()).parameters
|
|
282
|
-
for argument in arguments
|
|
283
|
-
)
|
|
284
314
|
yield from (
|
|
285
315
|
call for call in eligible if _borrowed_fixture_owner(call, context, contracts, requested, set()) is not None
|
|
286
316
|
)
|
|
@@ -551,9 +581,10 @@ def _constructed_dependencies(
|
|
|
551
581
|
context: PythonFileContext,
|
|
552
582
|
contracts: DeclaredContracts,
|
|
553
583
|
consumers: dict[SymbolRef, _FunctionConsumer | None],
|
|
584
|
+
fixture_parameters: frozenset[ast.arg],
|
|
554
585
|
) -> Iterator[ast.expr]:
|
|
555
586
|
aliases = bindings(function)
|
|
556
|
-
fixture_types = _supplied_types(function, context, contracts)
|
|
587
|
+
fixture_types = _supplied_types(function, context, contracts, fixture_parameters)
|
|
557
588
|
for call in (node for node in direct_nodes(function) if isinstance(node, ast.Call)):
|
|
558
589
|
if _inside_raises(context, call, function):
|
|
559
590
|
continue
|
|
@@ -566,7 +597,10 @@ def _constructed_dependencies(
|
|
|
566
597
|
|
|
567
598
|
|
|
568
599
|
def _supplied_types(
|
|
569
|
-
function: ast.FunctionDef | ast.AsyncFunctionDef,
|
|
600
|
+
function: ast.FunctionDef | ast.AsyncFunctionDef,
|
|
601
|
+
context: PythonFileContext,
|
|
602
|
+
contracts: DeclaredContracts,
|
|
603
|
+
fixture_parameters: frozenset[ast.arg],
|
|
570
604
|
) -> tuple[DeclaredClass, ...]:
|
|
571
605
|
parametrized = _parametrized_names(function, context)
|
|
572
606
|
if parametrized is None:
|
|
@@ -574,14 +608,41 @@ def _supplied_types(
|
|
|
574
608
|
arguments = (*function.args.posonlyargs, *function.args.args, *function.args.kwonlyargs)
|
|
575
609
|
models: list[DeclaredClass] = []
|
|
576
610
|
for argument in arguments:
|
|
577
|
-
if argument.arg in parametrized or argument.annotation is None:
|
|
611
|
+
if argument not in fixture_parameters or argument.arg in parametrized or argument.annotation is None:
|
|
578
612
|
continue
|
|
579
|
-
|
|
613
|
+
annotation = argument.annotation
|
|
614
|
+
if (
|
|
615
|
+
isinstance(annotation, ast.Subscript)
|
|
616
|
+
and isinstance(annotation.value, ast.Name)
|
|
617
|
+
and annotation.value.id == "type"
|
|
618
|
+
and context.static_resource_provenance.builtin_namespace_untouched
|
|
619
|
+
and context.static_resource_provenance.binding("type", annotation) is None
|
|
620
|
+
):
|
|
621
|
+
annotation = annotation.slice
|
|
622
|
+
model = contracts.annotation(annotation)
|
|
580
623
|
if model is not None:
|
|
581
624
|
models.append(model)
|
|
582
625
|
return tuple(models)
|
|
583
626
|
|
|
584
627
|
|
|
628
|
+
def _requested_fixture_parameters(
|
|
629
|
+
functions: tuple[ast.FunctionDef | ast.AsyncFunctionDef, ...],
|
|
630
|
+
context: PythonFileContext,
|
|
631
|
+
contracts: DeclaredContracts,
|
|
632
|
+
) -> frozenset[ast.arg]:
|
|
633
|
+
if not any(
|
|
634
|
+
argument.annotation is not None
|
|
635
|
+
for function in functions
|
|
636
|
+
for argument in (*function.args.posonlyargs, *function.args.args, *function.args.kwonlyargs)
|
|
637
|
+
) or not _stable_ambient_marks(context):
|
|
638
|
+
return frozenset()
|
|
639
|
+
return frozenset(
|
|
640
|
+
argument
|
|
641
|
+
for _, parameters in FixtureContractParameters(context, contracts, ()).parameters
|
|
642
|
+
for argument in parameters
|
|
643
|
+
)
|
|
644
|
+
|
|
645
|
+
|
|
585
646
|
def _parametrized_names(
|
|
586
647
|
function: ast.FunctionDef | ast.AsyncFunctionDef, context: PythonFileContext
|
|
587
648
|
) -> set[str] | None:
|