sarj-python-lint 1.131.0__tar.gz → 1.131.1__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.
Files changed (329) hide show
  1. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/PKG-INFO +1 -1
  2. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/pyproject.toml +1 -1
  3. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_project_index.py +2 -0
  4. sarj_python_lint-1.131.1/src/sarj_python_lint/rules/prefer_pytest_dependency_fixtures.py +616 -0
  5. sarj_python_lint-1.131.0/src/sarj_python_lint/rules/prefer_pytest_dependency_fixtures.py +0 -286
  6. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/.gitignore +0 -0
  7. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/LICENSE +0 -0
  8. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/README.md +0 -0
  9. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/__init__.py +0 -0
  10. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/__main__.py +0 -0
  11. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/_analysis_session.py +0 -0
  12. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/_autofix.py +0 -0
  13. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/_autofix_aliases.py +0 -0
  14. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/_autofix_annotations.py +0 -0
  15. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/_autofix_comments.py +0 -0
  16. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/_autofix_declared_contracts.py +0 -0
  17. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/_autofix_declared_tests.py +0 -0
  18. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/_autofix_docs.py +0 -0
  19. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/_autofix_enums.py +0 -0
  20. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/_autofix_exhaustiveness.py +0 -0
  21. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/_autofix_inert.py +0 -0
  22. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/_autofix_parameters.py +0 -0
  23. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/_autofix_repeated.py +0 -0
  24. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/_autofix_security.py +0 -0
  25. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/_autofix_sql_projection.py +0 -0
  26. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/_autofix_tests.py +0 -0
  27. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/_closed_sql_literal.py +0 -0
  28. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/_file_context.py +0 -0
  29. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/_filesystem.py +0 -0
  30. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/_fixes.py +0 -0
  31. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/_parallel.py +0 -0
  32. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/_prepared_sources.py +0 -0
  33. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/_python_target.py +0 -0
  34. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/_ratchet_cli.py +0 -0
  35. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/_rule_descriptors.py +0 -0
  36. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/_secret_names.py +0 -0
  37. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/_source.py +0 -0
  38. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/_version.py +0 -0
  39. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/application_logging.py +0 -0
  40. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/autofix.py +0 -0
  41. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/benchmark.py +0 -0
  42. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/cast_access.py +0 -0
  43. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/interpreter_argv.py +0 -0
  44. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/json_boundary.py +0 -0
  45. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/py.typed +0 -0
  46. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/ratchet.py +0 -0
  47. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rule_base.py +0 -0
  48. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rule_metadata.py +0 -0
  49. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/__init__.py +0 -0
  50. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_annotation_origins.py +0 -0
  51. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_annotation_semantics.py +0 -0
  52. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_ast_index.py +0 -0
  53. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_ast_names.py +0 -0
  54. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_ast_position.py +0 -0
  55. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_async_lifecycle.py +0 -0
  56. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_binding_inventory.py +0 -0
  57. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_closed_helpers.py +0 -0
  58. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_comment_narration.py +0 -0
  59. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_comments.py +0 -0
  60. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_contract_annotation.py +0 -0
  61. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_copy_on_write.py +0 -0
  62. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_data_union_discriminator.py +0 -0
  63. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_declared_contracts.py +0 -0
  64. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_dict_key_views.py +0 -0
  65. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_docstrings.py +0 -0
  66. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_exports.py +0 -0
  67. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_fastapi.py +0 -0
  68. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_fastapi_access.py +0 -0
  69. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_first_party.py +0 -0
  70. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_fixed_record.py +0 -0
  71. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_fixture_contracts.py +0 -0
  72. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_generic_payload.py +0 -0
  73. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_imports.py +0 -0
  74. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_inert_model_annotation.py +0 -0
  75. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_inherited_contract.py +0 -0
  76. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_local_alias_fix.py +0 -0
  77. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_local_source.py +0 -0
  78. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_logging.py +0 -0
  79. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_loguru.py +0 -0
  80. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_mapping_shape_callbacks.py +0 -0
  81. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_namespace_access.py +0 -0
  82. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_native_namespace_capability.py +0 -0
  83. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_native_object_contracts.py +0 -0
  84. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_nominal_project.py +0 -0
  85. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_numeric_proof.py +0 -0
  86. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_opaque_contracts.py +0 -0
  87. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_paths.py +0 -0
  88. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_postgres.py +0 -0
  89. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_prose_budget.py +0 -0
  90. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_pydantic_field_contract.py +0 -0
  91. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_pytest.py +0 -0
  92. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_pytest_contract_parameters.py +0 -0
  93. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_registry.py +0 -0
  94. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_resolved_operation_signature.py +0 -0
  95. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_resource_provenance.py +0 -0
  96. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_route_shapes.py +0 -0
  97. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_runtime_bindings.py +0 -0
  98. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_runtime_names.py +0 -0
  99. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_runtime_registry.py +0 -0
  100. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_service_http_callbacks.py +0 -0
  101. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_set_fields.py +0 -0
  102. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_sql.py +0 -0
  103. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_static_json_alias.py +0 -0
  104. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_store_sql.py +0 -0
  105. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_store_writes.py +0 -0
  106. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_suppression_comments.py +0 -0
  107. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_test_assertions.py +0 -0
  108. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_test_composition.py +0 -0
  109. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_test_provenance.py +0 -0
  110. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_transactional_sql.py +0 -0
  111. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/_type_guard_symbols.py +0 -0
  112. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/async_cleanup_registered_synchronously.py +0 -0
  113. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/async_executor_shutdown.py +0 -0
  114. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/async_mock_call_without_await_assertion.py +0 -0
  115. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/async_subprocess_cancellation_cleanup.py +0 -0
  116. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/cancel_owned_task_without_join.py +0 -0
  117. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/complex_postgres_query_requires_architecture_review.py +0 -0
  118. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/defect_xfail_requires_explicit_strict.py +0 -0
  119. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/delete_route_returns_no_content.py +0 -0
  120. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/docstring_args_restate_signature.py +0 -0
  121. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/docstring_returns_restate_signature.py +0 -0
  122. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/duplicate_adjacent_exception_handler.py +0 -0
  123. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/duplicate_closed_pure_helper.py +0 -0
  124. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/duplicate_pytest_fixture_params.py +0 -0
  125. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/excessive_commentary.py +0 -0
  126. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/failed_probe_zero_threshold.py +0 -0
  127. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/fakes_in_shared_location.py +0 -0
  128. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/fastapi_class_router_contract.py +0 -0
  129. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/fastapi_explicit_openapi_contract.py +0 -0
  130. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/fastapi_route_declares_security.py +0 -0
  131. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/iac_source_coupled_test.py +0 -0
  132. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/invalid_pydantic_field_default.py +0 -0
  133. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/mock_without_spec.py +0 -0
  134. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/named_record_at_boundaries.py +0 -0
  135. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/nan_hidden_by_builtin_min.py +0 -0
  136. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/negative_only_http_status_assertion.py +0 -0
  137. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_analytical_aggregation_in_postgres_store.py +0 -0
  138. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_any_mapping_types.py +0 -0
  139. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_async_client_in_constructor.py +0 -0
  140. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_async_function_cache.py +0 -0
  141. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_before_validator_input_mutation.py +0 -0
  142. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_blanket_suppression.py +0 -0
  143. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_broad_keyword_capture.py +0 -0
  144. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_comment_cruft.py +0 -0
  145. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_conflicting_pydantic_alias_validation.py +0 -0
  146. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_conftest_test_module_import.py +0 -0
  147. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_contradictory_type_guard.py +0 -0
  148. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_copied_inherited_docstring.py +0 -0
  149. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_cors_wildcard_with_credentials.py +0 -0
  150. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_create_verb_in_post_path.py +0 -0
  151. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_custom_control_flow_exception.py +0 -0
  152. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_database_programmability.py +0 -0
  153. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_defaulted_environment_setting.py +0 -0
  154. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_delete_statement.py +0 -0
  155. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_discarded_tagged_outcome.py +0 -0
  156. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_discarded_validation_result.py +0 -0
  157. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_dual_shape_model_field_reader.py +0 -0
  158. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_dunder_all.py +0 -0
  159. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_duplicate_dunder_all_entry.py +0 -0
  160. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_duplicate_field_validator_body.py +0 -0
  161. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_dynamic_builtins.py +0 -0
  162. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_exception_text_in_500_detail.py +0 -0
  163. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_excessive_cognitive_complexity.py +0 -0
  164. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_fastapi_on_event.py +0 -0
  165. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_file_level_escape_hatch_suppression.py +0 -0
  166. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_first_party_private_import.py +0 -0
  167. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_fixed_sleep_before_assert.py +0 -0
  168. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_fixed_sleep_in_loop.py +0 -0
  169. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_folded_bad_request_not_found.py +0 -0
  170. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_frozen_after_validator_field_write.py +0 -0
  171. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_generic_json_parser.py +0 -0
  172. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_generic_single_export_module.py +0 -0
  173. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_hasattr.py +0 -0
  174. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_hidden_constructor_fallback.py +0 -0
  175. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_impossible_pydantic_field_bounds.py +0 -0
  176. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_injected_module_loader.py +0 -0
  177. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_input_model_mutation.py +0 -0
  178. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_interpreter_source_arguments.py +0 -0
  179. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_invalid_argument_name_suppression.py +0 -0
  180. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_invalid_pydantic_bypass.py +0 -0
  181. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_invalid_pydantic_validator_return.py +0 -0
  182. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_loguru_exc_info.py +0 -0
  183. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_loguru_printf_format.py +0 -0
  184. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_mocked_pydantic_value_object.py +0 -0
  185. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_mutating_container_transform.py +0 -0
  186. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_mutating_input_with_result.py +0 -0
  187. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_nested_pydantic_field_validator.py +0 -0
  188. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_nullable_dependency_fallback.py +0 -0
  189. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_offset_pagination.py +0 -0
  190. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_partial_type_is.py +0 -0
  191. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_positional_psycopg_row_escape.py +0 -0
  192. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_psycopg_execution_in_loop.py +0 -0
  193. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_psycopg_execution_outside_injected_owner.py +0 -0
  194. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_random_uuid_in_sql.py +0 -0
  195. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_raw_connection_in_tests.py +0 -0
  196. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_raw_source_text_test_oracle.py +0 -0
  197. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_recording_store.py +0 -0
  198. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_redundant_attribute_unpacking.py +0 -0
  199. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_redundant_literal_description.py +0 -0
  200. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_redundant_local_alias.py +0 -0
  201. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_redundant_module_alias_exports.py +0 -0
  202. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_redundant_sql_alias.py +0 -0
  203. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_repeated_string_literal.py +0 -0
  204. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_repeated_test_body.py +0 -0
  205. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_restated_comment.py +0 -0
  206. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_secret_in_log.py +0 -0
  207. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_select_star.py +0 -0
  208. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_service_behavior_in_settings.py +0 -0
  209. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_shallow_container_type_guard.py +0 -0
  210. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_shallow_record_type_guard.py +0 -0
  211. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_shared_mutable_default.py +0 -0
  212. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_slash_collection_root_under_prefix.py +0 -0
  213. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_string_concat_in_loop.py +0 -0
  214. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_swallowed_asyncio_cancellation.py +0 -0
  215. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_sys_path_mutation.py +0 -0
  216. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_tautological_expect.py +0 -0
  217. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_test_comments.py +0 -0
  218. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_test_method_grafting.py +0 -0
  219. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_typed_doc_sections.py +0 -0
  220. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_unique_violation_message_match.py +0 -0
  221. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_unknown_pydantic_validator_field.py +0 -0
  222. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_unnecessary_docstring.py +0 -0
  223. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_unused_copy_result.py +0 -0
  224. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_unused_underscored_keyword_parameter.py +0 -0
  225. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_unused_value_marker.py +0 -0
  226. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_vague_suppression_description.py +0 -0
  227. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_whole_request_response_payload_in_log.py +0 -0
  228. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/no_work_verb_get_route.py +0 -0
  229. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/opaque_parametrize_case_needs_id.py +0 -0
  230. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/over_mocked_test.py +0 -0
  231. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/phase_label_comment.py +0 -0
  232. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/prefer_application_model_joins.py +0 -0
  233. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/prefer_autospec_for_callable_mock.py +0 -0
  234. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/prefer_bulk_upsert.py +0 -0
  235. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/prefer_class_row.py +0 -0
  236. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/prefer_collection_comprehension.py +0 -0
  237. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/prefer_configured_cloud_scope.py +0 -0
  238. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/prefer_constant_time_secret_compare.py +0 -0
  239. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/prefer_coordinated_state_owner.py +0 -0
  240. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/prefer_declarative_batch_validation.py +0 -0
  241. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/prefer_direct_import_module.py +0 -0
  242. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/prefer_discriminated_model_union.py +0 -0
  243. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/prefer_fstring_over_concat.py +0 -0
  244. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/prefer_grouped_settings.py +0 -0
  245. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/prefer_immutable_module_constant.py +0 -0
  246. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/prefer_injected_dependency_over_monkeypatch.py +0 -0
  247. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/prefer_injected_service.py +0 -0
  248. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/prefer_library_fake.py +0 -0
  249. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/prefer_match_assert_never.py +0 -0
  250. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/prefer_match_exception_dispatch.py +0 -0
  251. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/prefer_match_type_dispatch.py +0 -0
  252. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/prefer_match_value_dispatch.py +0 -0
  253. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/prefer_module_level_constant.py +0 -0
  254. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/prefer_monkeypatch_for_process_state_in_test.py +0 -0
  255. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/prefer_monotonic_for_elapsed_time.py +0 -0
  256. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/prefer_namedtuple_over_tuple_return.py +0 -0
  257. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/prefer_native_string_check.py +0 -0
  258. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/prefer_nominal_id_types.py +0 -0
  259. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/prefer_non_nullable_collection.py +0 -0
  260. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/prefer_optional_composite.py +0 -0
  261. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/prefer_or_pattern.py +0 -0
  262. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/prefer_precise_object_contract.py +0 -0
  263. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/prefer_psycopg_executemany.py +0 -0
  264. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/prefer_pydantic_json_value.py +0 -0
  265. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/prefer_pydantic_model_assertion.py +0 -0
  266. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/prefer_pytest_fixture_contract.py +0 -0
  267. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/prefer_pytest_fixture_injection.py +0 -0
  268. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/prefer_regex_fullmatch.py +0 -0
  269. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/prefer_required_constructor_parameters.py +0 -0
  270. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/prefer_runtime_validation.py +0 -0
  271. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/prefer_self_documenting_constant.py +0 -0
  272. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/prefer_self_type_annotation.py +0 -0
  273. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/prefer_set_isdisjoint.py +0 -0
  274. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/prefer_single_psycopg_cursor.py +0 -0
  275. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/prefer_str_enum.py +0 -0
  276. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/prefer_struct_over_namedtuple.py +0 -0
  277. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/prefer_typed_cli.py +0 -0
  278. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/prefer_typed_mapping_get.py +0 -0
  279. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/prefer_typed_settings_field.py +0 -0
  280. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/prefer_validated_uuid_comparison.py +0 -0
  281. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/prefer_walrus_awaited_none_guard.py +0 -0
  282. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/prefer_walrus_comprehension_filter.py +0 -0
  283. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/prefer_walrus_regex_match.py +0 -0
  284. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/prefer_walrus_stream_loop.py +0 -0
  285. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/production_derived_test_cases.py +0 -0
  286. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/pytest_fixture_returns_bare_tuple.py +0 -0
  287. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/pytest_fixture_returns_closed_resource.py +0 -0
  288. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/redundant_class_docstring.py +0 -0
  289. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/redundant_docstring.py +0 -0
  290. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/redundant_module_docstring.py +0 -0
  291. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/redundant_test_constructor_forwarder.py +0 -0
  292. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/repeated_kwarg_heavy_call_in_test.py +0 -0
  293. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/repeated_static_call_cases.py +0 -0
  294. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/repeated_test_composition.py +0 -0
  295. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/repeated_unimplemented_test_contract.py +0 -0
  296. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/require_constrained_api_integer.py +0 -0
  297. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/require_exp_on_jwt_decode.py +0 -0
  298. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/require_explicit_contract_implementation.py +0 -0
  299. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/require_explicit_psycopg_transaction.py +0 -0
  300. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/require_explicit_service_contract.py +0 -0
  301. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/require_injectable_retry_sleep.py +0 -0
  302. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/require_keyword_only_swap_prone_params.py +0 -0
  303. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/require_nodecode_for_splitting_settings_field.py +0 -0
  304. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/require_port_for_service.py +0 -0
  305. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/require_precise_factory_signature.py +0 -0
  306. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/require_public_dependency_contract.py +0 -0
  307. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/require_pydantic_for_external_json.py +0 -0
  308. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/require_pydantic_for_mapping_shape.py +0 -0
  309. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/require_pydantic_for_structured_payload.py +0 -0
  310. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/require_pydantic_ordinal_lower_bound.py +0 -0
  311. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/restated_test_docstring.py +0 -0
  312. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/service_singleton_delegates_to_bulk.py +0 -0
  313. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/shared_mutable_pydantic_factory.py +0 -0
  314. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/stepdown.py +0 -0
  315. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/store_field_update_reuses_upsert.py +0 -0
  316. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/store_get_delegates_to_bulk_read.py +0 -0
  317. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/store_insert_requires_explicit_conflict_policy.py +0 -0
  318. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/store_insert_requires_on_conflict.py +0 -0
  319. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/store_mutation_command_fanout.py +0 -0
  320. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/subprocess_kill_without_reap.py +0 -0
  321. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/test_without_explicit_oracle.py +0 -0
  322. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/timestamp_order_requires_tiebreaker.py +0 -0
  323. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/trailing_value_narration.py +0 -0
  324. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/typed_error_reasons.py +0 -0
  325. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/uncontrolled_randomness_in_test.py +0 -0
  326. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/unused_mock_setup.py +0 -0
  327. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/rules/unused_test_factory_option.py +0 -0
  328. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/src/sarj_python_lint/sql_literals.py +0 -0
  329. {sarj_python_lint-1.131.0 → sarj_python_lint-1.131.1}/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.131.0
3
+ Version: 1.131.1
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/
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "sarj-python-lint"
3
- version = "1.131.0"
3
+ version = "1.131.1"
4
4
  description = "Custom Python lint rules — AST-based, pre-commit-friendly, hypermodern defaults"
5
5
  readme = "README.md"
6
6
  authors = [{ name = "sarj-ai" }]
@@ -1316,6 +1316,8 @@ def _units(
1316
1316
  def _is_index_candidate(source: str) -> bool:
1317
1317
  return (
1318
1318
  "import" in source
1319
+ or "pytest_plugins" in source
1320
+ or "pytest_generate_tests" in source
1319
1321
  or "NewType" in source
1320
1322
  or "class" in source
1321
1323
  or "spec" in source
@@ -0,0 +1,616 @@
1
+ from __future__ import annotations
2
+
3
+ import ast
4
+ from collections import Counter
5
+ from pathlib import PurePosixPath
6
+ from typing import TYPE_CHECKING, final, override
7
+
8
+ from sarj_python_lint._file_context import PythonFileContext
9
+ from sarj_python_lint.rule_base import (
10
+ AutofixPolicy,
11
+ Diagnostic,
12
+ ExampleFile,
13
+ ExampleOutcome,
14
+ ProjectRule,
15
+ RuleCategory,
16
+ RuleDocumentation,
17
+ RuleExample,
18
+ Severity,
19
+ )
20
+ from sarj_python_lint.rules._declared_contracts import (
21
+ SETTINGS_BASES,
22
+ DeclaredClass,
23
+ DeclaredContracts,
24
+ ordinary_pytest_test,
25
+ )
26
+ from sarj_python_lint.rules._paths import is_test_path, is_test_support_path
27
+ from sarj_python_lint.rules._pytest import collected_tests
28
+ from sarj_python_lint.rules._pytest_contract_parameters import FixtureContractParameters
29
+ from sarj_python_lint.rules._test_composition import bindings, call_arguments, constructor, direct_nodes, unalias
30
+ from sarj_python_lint.rules.pytest_fixture_returns_bare_tuple import fixture_declarations
31
+
32
+
33
+ if TYPE_CHECKING:
34
+ from collections.abc import Collection, Iterator, Mapping
35
+
36
+ from sarj_python_lint.rules._project_index import SourceUnit
37
+ from sarj_python_lint.rules.pytest_fixture_returns_bare_tuple import FixtureDeclaration
38
+
39
+
40
+ _NATIVE_HTTP_CLIENTS = frozenset({"httpx.Client", "httpx.AsyncClient"})
41
+
42
+
43
+ _EXAMPLE = "from typing import Protocol\nclass Port(Protocol):\n def read(self): ...\nclass Store:\n def read(self): return 1\nclass Service:\n def __init__(self, store: Port):\n self.store = store\n def read(self): return self.store.read()\n"
44
+
45
+
46
+ _FACTORY_SOURCE = "import pytest\nfrom typing import Protocol\n\nclass Port(Protocol):\n def read(self) -> int: ...\n\nclass Store:\n def read(self) -> int:\n return 1\n\nclass Service:\n def __init__(self, store: Port) -> None:\n self.store = store\n\n def read(self) -> int:\n return self.store.read()\n\n@pytest.fixture\ndef store_factory() -> type[Store]:\n return Store\n\ndef test_read(store_factory: type[Store]) -> None:\n if store_factory is Store:\n service = Service(Store())\n assert service.read() == 1\n"
47
+ _FACTORY_FIXED = "import pytest\nfrom typing import Protocol\n\nclass Port(Protocol):\n def read(self) -> int: ...\n\nclass Store:\n def read(self) -> int:\n return 1\n\nclass Service:\n def __init__(self, store: Port) -> None:\n self.store = store\n\n def read(self) -> int:\n return self.store.read()\n\n@pytest.fixture\ndef store_factory() -> type[Store]:\n return Store\n\ndef test_read(store_factory: type[Store]) -> None:\n if store_factory is Store:\n service = Service(store_factory())\n assert service.read() == 1\n"
48
+
49
+ _BORROWED_STORES = "from abc import ABC, abstractmethod\nclass Queue(ABC):\n @abstractmethod\n def retry(self) -> bool: ...\nclass QueueStore(Queue):\n def __init__(self, resource: object) -> None:\n self.resource = resource\n def retry(self) -> bool:\n return True\nclass Owner:\n def __init__(self, resource: object) -> None:\n self.resource = resource\n def read(self) -> bool:\n return True\n"
50
+ _BORROWED_PROVIDER = "import pytest\nfrom app.stores import Owner, QueueStore\n@pytest.fixture\ndef resource() -> object:\n return object()\n@pytest.fixture\ndef owner(resource: object) -> Owner:\n return Owner(resource)\n@pytest.fixture\ndef queue_store(resource: object) -> QueueStore:\n return QueueStore(resource)\n"
51
+
52
+
53
+ @final
54
+ class PreferPytestDependencyFixtures(ProjectRule):
55
+ id = "prefer-pytest-dependency-fixtures"
56
+ code = "SARJ526"
57
+ documentation = RuleDocumentation(
58
+ default_level=Severity.WARNING,
59
+ summary="Reuse supplied pytest fixtures and pass test collaborators through fixture dependencies.",
60
+ rationale="Constructing collaborators in a test bypasses pytest's dependency graph, caching and overrides even when only one test currently needs the setup.",
61
+ remediation="Request function-scoped store, service and settings fixtures by parameter. Use a typed factory fixture for variants or multiple instances. Keep construction under test explicit and preserve setup ordering and the actual owner's cleanup; do not create global singletons or autouse fixtures.",
62
+ category=RuleCategory.TESTING,
63
+ autofix=AutofixPolicy.SAFE,
64
+ limitations=(
65
+ "Source-visible module-level collaborator instances must also enter tests through fixtures. Argument binding must be explicit: starred positional arguments, keyword unpacking and duplicate bindings abstain rather than guessing collaborator ownership.",
66
+ "Safe fixes only reuse an already-requested typed factory inside an authored runtime identity guard over a closed source-owned collaborator graph. They change only its immediate constructor callee; no fixture, signature, guard, setup event or lifecycle is introduced. All other findings require review.",
67
+ "Checks collected pytest functions and plain test classes. A local or inline class construction must feed a proven stored-and-invoked ABC/Protocol collaborator, or a proven BaseSettings instance must be passed to a call. Names alone never identify a service. Constructor failure tests, fixtures, helpers, dynamic/unresolved sources, generated and test-support paths are excluded. No automatic fixture extraction or lifecycle change.",
68
+ "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.",
69
+ "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.",
70
+ "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.",
71
+ ),
72
+ examples=(
73
+ RuleExample(
74
+ example_id="duplicate-supplied-store",
75
+ scenario="supplied-store",
76
+ title="A second store bypasses the supplied fixture",
77
+ outcome=ExampleOutcome.MATCH,
78
+ files=(
79
+ ExampleFile.python(
80
+ "tests/test_store.py",
81
+ _EXAMPLE
82
+ + "def test_read(store: Store):\n replacement = Store()\n assert replacement.read() == 1\n",
83
+ ),
84
+ ),
85
+ focus_path=PurePosixPath("tests/test_store.py"),
86
+ expected_count=1,
87
+ public=True,
88
+ ),
89
+ RuleExample(
90
+ example_id="reuse-supplied-store",
91
+ scenario="supplied-store",
92
+ title="Use the supplied store fixture",
93
+ outcome=ExampleOutcome.NO_MATCH,
94
+ files=(
95
+ ExampleFile.python(
96
+ "tests/test_store.py", _EXAMPLE + "def test_read(store: Store):\n assert store.read() == 1\n"
97
+ ),
98
+ ),
99
+ focus_path=PurePosixPath("tests/test_store.py"),
100
+ expected_count=0,
101
+ public=True,
102
+ ),
103
+ RuleExample(
104
+ example_id="constructed-collaborator",
105
+ title="A test constructs its service's store",
106
+ outcome=ExampleOutcome.MATCH,
107
+ files=(
108
+ ExampleFile.python(
109
+ "tests/test_service.py",
110
+ _EXAMPLE
111
+ + "def test_read():\n store = Store()\n service = Service(store)\n assert service.read() == 1\n",
112
+ ),
113
+ ),
114
+ focus_path=PurePosixPath("tests/test_service.py"),
115
+ expected_count=1,
116
+ public=True,
117
+ ),
118
+ RuleExample(
119
+ example_id="injected-collaborator",
120
+ title="The store arrives through pytest",
121
+ outcome=ExampleOutcome.NO_MATCH,
122
+ files=(
123
+ ExampleFile.python(
124
+ "tests/test_service.py",
125
+ _EXAMPLE
126
+ + "def test_read(store):\n service = Service(store)\n assert service.read() == 1\n",
127
+ ),
128
+ ),
129
+ focus_path=PurePosixPath("tests/test_service.py"),
130
+ expected_count=0,
131
+ public=True,
132
+ ),
133
+ RuleExample(
134
+ example_id="existing-factory-identity",
135
+ title="An authored identity guard closes the existing factory",
136
+ outcome=ExampleOutcome.MATCH,
137
+ scenario="existing-factory-identity",
138
+ files=(ExampleFile.python("tests/test_service.py", _FACTORY_SOURCE),),
139
+ fixed_files=(ExampleFile.python("tests/test_service.py", _FACTORY_FIXED),),
140
+ focus_path=PurePosixPath("tests/test_service.py"),
141
+ expected_count=1,
142
+ ),
143
+ RuleExample(
144
+ example_id="existing-factory-used",
145
+ title="The identical existing factory supplies the collaborator",
146
+ outcome=ExampleOutcome.NO_MATCH,
147
+ scenario="existing-factory-identity",
148
+ files=(ExampleFile.python("tests/test_service.py", _FACTORY_FIXED),),
149
+ focus_path=PurePosixPath("tests/test_service.py"),
150
+ expected_count=0,
151
+ ),
152
+ RuleExample(
153
+ example_id="unrequested-plugin-collaborator",
154
+ scenario="borrowed-fixture-resource",
155
+ title="A visible plugin fixture owns the collaborator",
156
+ outcome=ExampleOutcome.MATCH,
157
+ files=(
158
+ ExampleFile.python("app/__init__.py", '"""Example application package."""\n'),
159
+ ExampleFile.python("app/stores.py", _BORROWED_STORES),
160
+ ExampleFile.python("tests/__init__.py", '"""Example test package."""\n'),
161
+ ExampleFile.python("tests/fixtures.py", _BORROWED_PROVIDER),
162
+ ExampleFile.python("tests/conftest.py", "pytest_plugins = ['tests.fixtures']\n"),
163
+ ExampleFile.python(
164
+ "tests/test_retry.py",
165
+ "from app.stores import Owner, QueueStore\ndef test_retry(owner: Owner):\n queue = QueueStore(owner.resource)\n queue.retry()\n assert owner.read()\n",
166
+ ),
167
+ ),
168
+ focus_path=PurePosixPath("tests/test_retry.py"),
169
+ expected_count=1,
170
+ public=True,
171
+ ),
172
+ RuleExample(
173
+ example_id="requested-plugin-collaborator",
174
+ scenario="borrowed-fixture-resource",
175
+ title="Request the collaborator through pytest",
176
+ outcome=ExampleOutcome.NO_MATCH,
177
+ files=(
178
+ ExampleFile.python("app/__init__.py", '"""Example application package."""\n'),
179
+ ExampleFile.python("app/stores.py", _BORROWED_STORES),
180
+ ExampleFile.python("tests/__init__.py", '"""Example test package."""\n'),
181
+ ExampleFile.python("tests/fixtures.py", _BORROWED_PROVIDER),
182
+ ExampleFile.python("tests/conftest.py", "pytest_plugins = ['tests.fixtures']\n"),
183
+ ExampleFile.python(
184
+ "tests/test_retry.py", "def test_retry(queue_store):\n assert queue_store.retry()\n"
185
+ ),
186
+ ),
187
+ focus_path=PurePosixPath("tests/test_retry.py"),
188
+ expected_count=0,
189
+ public=True,
190
+ ),
191
+ ),
192
+ )
193
+ description = documentation.summary
194
+
195
+ @override
196
+ def check_context(self, context: PythonFileContext) -> list[Diagnostic]:
197
+ if (
198
+ context.tree is None
199
+ or context.generated
200
+ or not is_test_path(context.path)
201
+ or is_test_support_path(context.path)
202
+ ):
203
+ return []
204
+ contracts = DeclaredContracts(context)
205
+ hits: set[ast.expr] = set()
206
+ borrowed: dict[ast.Call, DeclaredClass] = {}
207
+ for function in collected_tests(context.tree.body):
208
+ if ordinary_pytest_test(function, context):
209
+ hits.update(_constructed_dependencies(function, context, contracts))
210
+ borrowed.update(_borrowed_fixture_constructors(function, context, contracts))
211
+ hits.update(_borrowed_fixture_hits(borrowed, context, contracts))
212
+ return [
213
+ Diagnostic(
214
+ context.path,
215
+ call.lineno,
216
+ call.col_offset + 1,
217
+ self.code,
218
+ "Request this constructed collaborator or settings value through a function-scoped fixture; use a typed factory fixture for variants and preserve lifecycle ownership.",
219
+ severity=Severity.WARNING,
220
+ )
221
+ for call in sorted(hits, key=lambda item: (item.lineno, item.col_offset))
222
+ if not context.suppressions.is_suppressed(call.lineno, self.code)
223
+ ]
224
+
225
+
226
+ def _borrowed_fixture_hits(
227
+ borrowed: Mapping[ast.Call, DeclaredClass], context: PythonFileContext, contracts: DeclaredContracts
228
+ ) -> Iterator[ast.Call]:
229
+ if not borrowed:
230
+ return
231
+ available = _visible_fixture_constructors(context, contracts)
232
+ eligible = {call for call, model in borrowed.items() if model.declaration in available}
233
+ if not eligible or not _stable_ambient_marks(context):
234
+ return
235
+ requested = frozenset(
236
+ argument
237
+ for _, arguments in FixtureContractParameters(context, contracts, ()).parameters
238
+ for argument in arguments
239
+ )
240
+ yield from (
241
+ call for call in eligible if _borrowed_fixture_owner(call, context, contracts, requested, set()) is not None
242
+ )
243
+
244
+
245
+ def _stable_ambient_marks(context: PythonFileContext) -> bool:
246
+ inventory = context.binding_inventory
247
+ if "pytestmark" in inventory.reads or "pytestmark" in inventory.external_bindings:
248
+ return False
249
+ for scope, names in inventory.bindings.items():
250
+ if not isinstance(scope, ast.Module | ast.ClassDef):
251
+ continue
252
+ for binding in names.get("pytestmark", ()):
253
+ parent = context.parents.get(binding)
254
+ if not (
255
+ isinstance(binding, ast.Name)
256
+ and isinstance(binding.ctx, ast.Store)
257
+ and isinstance(parent, ast.Assign | ast.AnnAssign)
258
+ and (not isinstance(parent, ast.Assign) or len(parent.targets) == 1)
259
+ and context.parents.get(parent) is scope
260
+ ):
261
+ return False
262
+ return not any(node.attr == "pytestmark" for node in context.nodes(ast.Attribute))
263
+
264
+
265
+ def _borrowed_fixture_constructors(
266
+ function: ast.FunctionDef | ast.AsyncFunctionDef,
267
+ context: PythonFileContext,
268
+ contracts: DeclaredContracts,
269
+ ) -> Iterator[tuple[ast.Call, DeclaredClass]]:
270
+ parametrized = _parametrized_names(function, context)
271
+ if parametrized is None:
272
+ return
273
+ allocated = bindings(function)
274
+ requested = (*function.args.args, *function.args.kwonlyargs)
275
+ for call in (node for node in direct_nodes(function) if isinstance(node, ast.Call)):
276
+ owner = _borrowed_fixture_owner(call, context, contracts, requested, parametrized)
277
+ if owner is None or _inside_raises(context, call, function):
278
+ continue
279
+ receiver = next((name for name, expression in allocated.items() if expression is call), None)
280
+ if receiver is None or not _arranges_observed_fixture(function, context, call, receiver, owner):
281
+ continue
282
+ model = contracts.class_type(call.func)
283
+ if model is not None and contracts.inherits(
284
+ model, frozenset({"abc.ABC", "typing.Protocol", "typing_extensions.Protocol"})
285
+ ):
286
+ yield call, model
287
+
288
+
289
+ def _borrowed_fixture_owner(
290
+ call: ast.Call,
291
+ context: PythonFileContext,
292
+ contracts: DeclaredContracts,
293
+ requested: Collection[ast.arg],
294
+ parametrized: set[str],
295
+ ) -> ast.arg | None:
296
+ if len(call.args) != 1 or call.keywords:
297
+ return None
298
+ value = call.args[0]
299
+ if not isinstance(value, ast.Attribute) or not isinstance(value.value, ast.Name):
300
+ return None
301
+ owner = context.static_resource_provenance.binding(value.value.id, value.value)
302
+ if not isinstance(owner, ast.arg) or owner.annotation is None:
303
+ return None
304
+ if owner not in requested or owner.arg in parametrized:
305
+ return None
306
+ if owner.arg in context.static_resource_provenance.mutated or contracts.annotation(owner.annotation) is None:
307
+ return None
308
+ return owner
309
+
310
+
311
+ def _arranges_observed_fixture(
312
+ function: ast.FunctionDef | ast.AsyncFunctionDef,
313
+ context: PythonFileContext,
314
+ allocation: ast.Call,
315
+ receiver: str,
316
+ owner: ast.arg,
317
+ ) -> bool:
318
+ statement = context.parents.get(allocation)
319
+ target = (
320
+ statement.targets[0]
321
+ if isinstance(statement, ast.Assign) and len(statement.targets) == 1
322
+ else statement.target
323
+ if isinstance(statement, ast.AnnAssign)
324
+ else None
325
+ )
326
+ if not isinstance(target, ast.Name):
327
+ return False
328
+ operations = [
329
+ node.lineno
330
+ for node in direct_nodes(function)
331
+ if isinstance(node, ast.Call)
332
+ and isinstance(node.func, ast.Attribute)
333
+ and isinstance(node.func.value, ast.Name)
334
+ and node.func.value.id == receiver
335
+ and node.lineno > allocation.lineno
336
+ and context.static_resource_provenance.binding(receiver, node.func.value) is target
337
+ and context.static_resource_provenance.scope(node.func.value) is function
338
+ ]
339
+ return any(
340
+ isinstance(assertion, ast.Assert)
341
+ and any(allocation.lineno < line < assertion.lineno for line in operations)
342
+ and any(
343
+ isinstance(node, ast.Call)
344
+ and isinstance(node.func, ast.Attribute)
345
+ and isinstance(node.func.value, ast.Name)
346
+ and node.func.value.id == owner.arg
347
+ and context.static_resource_provenance.binding(owner.arg, node.func.value) is owner
348
+ and context.static_resource_provenance.scope(node.func.value) is function
349
+ for node in ast.walk(assertion.test)
350
+ )
351
+ for assertion in direct_nodes(function)
352
+ )
353
+
354
+
355
+ def _visible_fixture_constructors(context: PythonFileContext, contracts: DeclaredContracts) -> frozenset[ast.ClassDef]:
356
+ names: Counter[str] = Counter()
357
+ blocked: set[str] = set()
358
+ candidates: list[tuple[str, ast.ClassDef]] = []
359
+ for unit in _visible_fixture_units(context, contracts):
360
+ if unit.tree is None:
361
+ continue
362
+ module_context = PythonFileContext(unit.path, unit.source, context.session)
363
+ facts = module_context.binding_inventory
364
+ if module_context.tree is None:
365
+ continue
366
+ fixtures = tuple(fixture_declarations(module_context.tree))
367
+ blocked.update(_unexplained_fixture_exports(module_context, fixtures))
368
+ if (
369
+ facts.wildcard
370
+ or module_context.dynamic_namespace
371
+ or facts.bindings.get(module_context.tree, {}).get("pytest_generate_tests")
372
+ ):
373
+ return frozenset()
374
+ for fixture in fixtures:
375
+ names[fixture.name] += 1
376
+ if (model := _provider_constructor(module_context, contracts, unit, fixture)) is not None:
377
+ candidates.append((fixture.name, model))
378
+ return frozenset(model for name, model in candidates if names[name] == 1 and name not in blocked)
379
+
380
+
381
+ def _visible_fixture_units(context: PythonFileContext, contracts: DeclaredContracts) -> tuple[SourceUnit, ...]:
382
+ ancestors = frozenset(context.path.absolute().parents)
383
+ units = {
384
+ unit.path: unit
385
+ for unit in contracts.project.source_units
386
+ if unit.path == context.path or (unit.path.name == "conftest.py" and unit.path.absolute().parent in ancestors)
387
+ }
388
+ if contracts.unit is not None:
389
+ units[contracts.unit.path] = contracts.unit
390
+ for unit in tuple(units.values()):
391
+ if unit.tree is None:
392
+ continue
393
+ plugins = _registered_fixture_plugins(PythonFileContext(unit.path, unit.source, context.session), contracts)
394
+ if plugins is None:
395
+ return ()
396
+ units.update((plugin.path, plugin) for plugin in plugins)
397
+ return tuple(units.values())
398
+
399
+
400
+ def _registered_fixture_plugins(
401
+ context: PythonFileContext, contracts: DeclaredContracts
402
+ ) -> tuple[SourceUnit, ...] | None:
403
+ facts = context.binding_inventory
404
+ plugin_bindings = facts.bindings.get(context.tree, {}).get("pytest_plugins", ())
405
+ if not plugin_bindings:
406
+ return ()
407
+ if (
408
+ len(plugin_bindings) != 1
409
+ or facts.reads.get("pytest_plugins")
410
+ or context.dynamic_namespace
411
+ or context.tree is None
412
+ ):
413
+ return None
414
+ assignment = context.parents.get(plugin_bindings[0])
415
+ if assignment not in context.tree.body:
416
+ return None
417
+ modules = _literal_case_names(assignment.value if isinstance(assignment, ast.Assign | ast.AnnAssign) else None)
418
+ if modules is None:
419
+ return None
420
+ plugins: list[SourceUnit] = []
421
+ for module in modules:
422
+ plugin = contracts.project.source_unit(module)
423
+ if plugin is None or plugin.tree is None:
424
+ return None
425
+ plugin_context = PythonFileContext(plugin.path, plugin.source, context.session)
426
+ if plugin_context.binding_inventory.bindings.get(plugin_context.tree, {}).get("pytest_plugins"):
427
+ return None
428
+ plugins.append(plugin)
429
+ return tuple(plugins)
430
+
431
+
432
+ def _unexplained_fixture_exports(
433
+ context: PythonFileContext, fixtures: tuple[FixtureDeclaration, ...]
434
+ ) -> frozenset[str]:
435
+ if context.tree is None:
436
+ return frozenset()
437
+ definitions = {fixture.node.name: fixture.node for fixture in fixtures if fixture.node in context.tree.body}
438
+ return frozenset(
439
+ name
440
+ for name, definitions_at_name in context.binding_inventory.bindings.get(context.tree, {}).items()
441
+ if definitions_at_name != (definitions.get(name),)
442
+ )
443
+
444
+
445
+ def _provider_constructor(
446
+ context: PythonFileContext, contracts: DeclaredContracts, unit: SourceUnit, fixture: FixtureDeclaration
447
+ ) -> ast.ClassDef | None:
448
+ function = fixture.node
449
+ if context.tree is None or context.generated or function not in context.tree.body or function.returns is None:
450
+ return None
451
+ facts = context.binding_inventory
452
+ if (
453
+ facts.bindings.get(context.tree, {}).get(function.name) != (function,)
454
+ or function.name in facts.external_bindings | facts.mutated
455
+ or not _function_scope_provider(function, fixture.decorator)
456
+ ):
457
+ return None
458
+ if len(function.body) != 1 or not isinstance(function.body[0], ast.Return):
459
+ return None
460
+ returned = function.body[0].value
461
+ if not isinstance(returned, ast.Call) or len(returned.args) != 1 or returned.keywords:
462
+ return None
463
+ argument = returned.args[0]
464
+ if not isinstance(argument, ast.Name) or argument.id not in {arg.arg for arg in function.args.args}:
465
+ return None
466
+ root = returned.func
467
+ while isinstance(root, ast.Attribute):
468
+ root = root.value
469
+ if not isinstance(root, ast.Name) or not isinstance(
470
+ context.static_resource_provenance.binding(root.id, returned.func), ast.alias | ast.ClassDef
471
+ ):
472
+ return None
473
+ model = contracts.class_type(returned.func, unit)
474
+ annotation = contracts.annotation(function.returns, unit)
475
+ return (
476
+ model.declaration
477
+ if model is not None and annotation is not None and _compatible_fixture(model, annotation, contracts)
478
+ else None
479
+ )
480
+
481
+
482
+ def _function_scope_provider(function: ast.FunctionDef | ast.AsyncFunctionDef, decorator: ast.expr) -> bool:
483
+ arguments = function.args
484
+ if (
485
+ len(function.decorator_list) != 1
486
+ or arguments.defaults
487
+ or arguments.kw_defaults
488
+ or arguments.vararg
489
+ or arguments.kwarg
490
+ ):
491
+ return False
492
+ if not isinstance(decorator, ast.Call):
493
+ return True
494
+ return not decorator.args and all(
495
+ (
496
+ keyword.arg in {"scope", "loop_scope"}
497
+ and isinstance(keyword.value, ast.Constant)
498
+ and keyword.value.value == "function"
499
+ )
500
+ or (keyword.arg == "name" and isinstance(keyword.value, ast.Constant) and isinstance(keyword.value.value, str))
501
+ for keyword in decorator.keywords
502
+ )
503
+
504
+
505
+ def _constructed_dependencies(
506
+ function: ast.FunctionDef | ast.AsyncFunctionDef, context: PythonFileContext, contracts: DeclaredContracts
507
+ ) -> Iterator[ast.expr]:
508
+ aliases = bindings(function)
509
+ fixture_types = _supplied_types(function, context, contracts)
510
+ for call in (node for node in direct_nodes(function) if isinstance(node, ast.Call)):
511
+ if _inside_raises(context, call, function):
512
+ continue
513
+ if context.resource_provenance.runtime_import_name(call.func) in _NATIVE_HTTP_CLIENTS:
514
+ yield call
515
+ model = contracts.class_type(call.func) if fixture_types else None
516
+ if model is not None and any(_compatible_fixture(model, supplied, contracts) for supplied in fixture_types):
517
+ yield call
518
+ yield from _call_dependencies(call, context, contracts, aliases)
519
+
520
+
521
+ def _supplied_types(
522
+ function: ast.FunctionDef | ast.AsyncFunctionDef, context: PythonFileContext, contracts: DeclaredContracts
523
+ ) -> tuple[DeclaredClass, ...]:
524
+ parametrized = _parametrized_names(function, context)
525
+ if parametrized is None:
526
+ return ()
527
+ arguments = (*function.args.posonlyargs, *function.args.args, *function.args.kwonlyargs)
528
+ models: list[DeclaredClass] = []
529
+ for argument in arguments:
530
+ if argument.arg in parametrized or argument.annotation is None:
531
+ continue
532
+ model = contracts.annotation(argument.annotation)
533
+ if model is not None:
534
+ models.append(model)
535
+ return tuple(models)
536
+
537
+
538
+ def _parametrized_names(
539
+ function: ast.FunctionDef | ast.AsyncFunctionDef, context: PythonFileContext
540
+ ) -> set[str] | None:
541
+ parametrized: set[str] = set()
542
+ for decorator in function.decorator_list:
543
+ if (
544
+ not isinstance(decorator, ast.Call)
545
+ or context.imports.resolved_qualified_name(decorator.func) != "pytest.mark.parametrize"
546
+ ):
547
+ continue
548
+ names = (
549
+ decorator.args[0]
550
+ if decorator.args
551
+ else next((keyword.value for keyword in decorator.keywords if keyword.arg == "argnames"), None)
552
+ )
553
+ parsed = _literal_case_names(names)
554
+ if parsed is None:
555
+ return None
556
+ parametrized.update(parsed)
557
+ return parametrized
558
+
559
+
560
+ def _literal_case_names(names: ast.expr | None) -> set[str] | None:
561
+ if isinstance(names, ast.Constant) and isinstance(names.value, str):
562
+ return {name.strip() for name in names.value.split(",")}
563
+ if not isinstance(names, ast.Tuple | ast.List):
564
+ return None
565
+ parsed: set[str] = set()
566
+ for item in names.elts:
567
+ if not isinstance(item, ast.Constant) or not isinstance(item.value, str):
568
+ return None
569
+ parsed.add(item.value)
570
+ return parsed
571
+
572
+
573
+ def _compatible_fixture(model: DeclaredClass, supplied: DeclaredClass, contracts: DeclaredContracts) -> bool:
574
+ if model.declaration is supplied.declaration:
575
+ return True
576
+ if supplied.unit.module is None or not contracts.inherits(
577
+ supplied, frozenset({"abc.ABC", "typing.Protocol", "typing_extensions.Protocol"})
578
+ ):
579
+ return False
580
+ return contracts.inherits(model, frozenset({f"{supplied.unit.module}.{supplied.declaration.name}"}))
581
+
582
+
583
+ def _call_dependencies(
584
+ call: ast.Call, context: PythonFileContext, contracts: DeclaredContracts, aliases: dict[str, ast.expr]
585
+ ) -> Iterator[ast.expr]:
586
+ spec = constructor(context, call.func, contracts.project, minimum_collaborators=1)
587
+ visible_aliases = {key: item for key, item in aliases.items() if item.lineno < call.lineno}
588
+ positional = spec.positional if spec is not None else tuple(f"argument-{index}" for index in range(len(call.args)))
589
+ values = call_arguments(call, positional)
590
+ if values is None:
591
+ return
592
+ for name, value in values.items():
593
+ resolved = unalias(value, visible_aliases)
594
+ if _constructed_dependency(resolved, contracts, collaborator=spec is not None and name in spec.collaborators):
595
+ yield resolved
596
+
597
+
598
+ def _constructed_dependency(value: ast.expr, contracts: DeclaredContracts, *, collaborator: bool) -> bool:
599
+ if isinstance(value, ast.Name) and isinstance(
600
+ contracts.context.static_resource_provenance.binding(value.id, value), ast.arg
601
+ ):
602
+ return False
603
+ model = contracts.value(value)
604
+ return model is not None and (collaborator or contracts.inherits(model, SETTINGS_BASES))
605
+
606
+
607
+ def _inside_raises(context: PythonFileContext, node: ast.AST, function: ast.AST) -> bool:
608
+ while (parent := context.parents.get(node)) is not None and parent is not function:
609
+ if isinstance(parent, ast.With | ast.AsyncWith) and any(
610
+ isinstance(item.context_expr, ast.Call)
611
+ and context.imports.resolves(item.context_expr.func, sources=frozenset({"pytest"}), symbol="raises")
612
+ for item in parent.items
613
+ ):
614
+ return True
615
+ node = parent
616
+ return False