sarj-python-lint 1.127.0__tar.gz → 1.131.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.
Files changed (329) hide show
  1. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/PKG-INFO +1 -1
  2. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/pyproject.toml +1 -1
  3. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_pydantic_field_contract.py +80 -26
  4. sarj_python_lint-1.131.0/src/sarj_python_lint/rules/no_defaulted_environment_setting.py +281 -0
  5. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_discarded_tagged_outcome.py +60 -7
  6. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_invalid_pydantic_bypass.py +68 -13
  7. sarj_python_lint-1.127.0/src/sarj_python_lint/rules/no_defaulted_environment_setting.py +0 -165
  8. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/.gitignore +0 -0
  9. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/LICENSE +0 -0
  10. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/README.md +0 -0
  11. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/__init__.py +0 -0
  12. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/__main__.py +0 -0
  13. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/_analysis_session.py +0 -0
  14. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/_autofix.py +0 -0
  15. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/_autofix_aliases.py +0 -0
  16. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/_autofix_annotations.py +0 -0
  17. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/_autofix_comments.py +0 -0
  18. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/_autofix_declared_contracts.py +0 -0
  19. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/_autofix_declared_tests.py +0 -0
  20. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/_autofix_docs.py +0 -0
  21. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/_autofix_enums.py +0 -0
  22. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/_autofix_exhaustiveness.py +0 -0
  23. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/_autofix_inert.py +0 -0
  24. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/_autofix_parameters.py +0 -0
  25. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/_autofix_repeated.py +0 -0
  26. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/_autofix_security.py +0 -0
  27. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/_autofix_sql_projection.py +0 -0
  28. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/_autofix_tests.py +0 -0
  29. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/_closed_sql_literal.py +0 -0
  30. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/_file_context.py +0 -0
  31. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/_filesystem.py +0 -0
  32. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/_fixes.py +0 -0
  33. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/_parallel.py +0 -0
  34. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/_prepared_sources.py +0 -0
  35. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/_python_target.py +0 -0
  36. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/_ratchet_cli.py +0 -0
  37. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/_rule_descriptors.py +0 -0
  38. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/_secret_names.py +0 -0
  39. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/_source.py +0 -0
  40. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/_version.py +0 -0
  41. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/application_logging.py +0 -0
  42. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/autofix.py +0 -0
  43. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/benchmark.py +0 -0
  44. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/cast_access.py +0 -0
  45. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/interpreter_argv.py +0 -0
  46. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/json_boundary.py +0 -0
  47. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/py.typed +0 -0
  48. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/ratchet.py +0 -0
  49. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rule_base.py +0 -0
  50. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rule_metadata.py +0 -0
  51. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/__init__.py +0 -0
  52. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_annotation_origins.py +0 -0
  53. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_annotation_semantics.py +0 -0
  54. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_ast_index.py +0 -0
  55. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_ast_names.py +0 -0
  56. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_ast_position.py +0 -0
  57. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_async_lifecycle.py +0 -0
  58. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_binding_inventory.py +0 -0
  59. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_closed_helpers.py +0 -0
  60. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_comment_narration.py +0 -0
  61. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_comments.py +0 -0
  62. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_contract_annotation.py +0 -0
  63. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_copy_on_write.py +0 -0
  64. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_data_union_discriminator.py +0 -0
  65. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_declared_contracts.py +0 -0
  66. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_dict_key_views.py +0 -0
  67. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_docstrings.py +0 -0
  68. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_exports.py +0 -0
  69. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_fastapi.py +0 -0
  70. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_fastapi_access.py +0 -0
  71. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_first_party.py +0 -0
  72. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_fixed_record.py +0 -0
  73. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_fixture_contracts.py +0 -0
  74. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_generic_payload.py +0 -0
  75. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_imports.py +0 -0
  76. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_inert_model_annotation.py +0 -0
  77. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_inherited_contract.py +0 -0
  78. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_local_alias_fix.py +0 -0
  79. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_local_source.py +0 -0
  80. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_logging.py +0 -0
  81. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_loguru.py +0 -0
  82. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_mapping_shape_callbacks.py +0 -0
  83. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_namespace_access.py +0 -0
  84. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_native_namespace_capability.py +0 -0
  85. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_native_object_contracts.py +0 -0
  86. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_nominal_project.py +0 -0
  87. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_numeric_proof.py +0 -0
  88. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_opaque_contracts.py +0 -0
  89. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_paths.py +0 -0
  90. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_postgres.py +0 -0
  91. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_project_index.py +0 -0
  92. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_prose_budget.py +0 -0
  93. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_pytest.py +0 -0
  94. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_pytest_contract_parameters.py +0 -0
  95. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_registry.py +0 -0
  96. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_resolved_operation_signature.py +0 -0
  97. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_resource_provenance.py +0 -0
  98. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_route_shapes.py +0 -0
  99. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_runtime_bindings.py +0 -0
  100. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_runtime_names.py +0 -0
  101. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_runtime_registry.py +0 -0
  102. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_service_http_callbacks.py +0 -0
  103. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_set_fields.py +0 -0
  104. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_sql.py +0 -0
  105. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_static_json_alias.py +0 -0
  106. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_store_sql.py +0 -0
  107. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_store_writes.py +0 -0
  108. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_suppression_comments.py +0 -0
  109. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_test_assertions.py +0 -0
  110. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_test_composition.py +0 -0
  111. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_test_provenance.py +0 -0
  112. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_transactional_sql.py +0 -0
  113. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_type_guard_symbols.py +0 -0
  114. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/async_cleanup_registered_synchronously.py +0 -0
  115. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/async_executor_shutdown.py +0 -0
  116. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/async_mock_call_without_await_assertion.py +0 -0
  117. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/async_subprocess_cancellation_cleanup.py +0 -0
  118. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/cancel_owned_task_without_join.py +0 -0
  119. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/complex_postgres_query_requires_architecture_review.py +0 -0
  120. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/defect_xfail_requires_explicit_strict.py +0 -0
  121. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/delete_route_returns_no_content.py +0 -0
  122. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/docstring_args_restate_signature.py +0 -0
  123. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/docstring_returns_restate_signature.py +0 -0
  124. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/duplicate_adjacent_exception_handler.py +0 -0
  125. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/duplicate_closed_pure_helper.py +0 -0
  126. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/duplicate_pytest_fixture_params.py +0 -0
  127. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/excessive_commentary.py +0 -0
  128. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/failed_probe_zero_threshold.py +0 -0
  129. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/fakes_in_shared_location.py +0 -0
  130. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/fastapi_class_router_contract.py +0 -0
  131. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/fastapi_explicit_openapi_contract.py +0 -0
  132. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/fastapi_route_declares_security.py +0 -0
  133. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/iac_source_coupled_test.py +0 -0
  134. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/invalid_pydantic_field_default.py +0 -0
  135. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/mock_without_spec.py +0 -0
  136. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/named_record_at_boundaries.py +0 -0
  137. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/nan_hidden_by_builtin_min.py +0 -0
  138. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/negative_only_http_status_assertion.py +0 -0
  139. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_analytical_aggregation_in_postgres_store.py +0 -0
  140. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_any_mapping_types.py +0 -0
  141. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_async_client_in_constructor.py +0 -0
  142. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_async_function_cache.py +0 -0
  143. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_before_validator_input_mutation.py +0 -0
  144. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_blanket_suppression.py +0 -0
  145. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_broad_keyword_capture.py +0 -0
  146. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_comment_cruft.py +0 -0
  147. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_conflicting_pydantic_alias_validation.py +0 -0
  148. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_conftest_test_module_import.py +0 -0
  149. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_contradictory_type_guard.py +0 -0
  150. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_copied_inherited_docstring.py +0 -0
  151. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_cors_wildcard_with_credentials.py +0 -0
  152. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_create_verb_in_post_path.py +0 -0
  153. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_custom_control_flow_exception.py +0 -0
  154. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_database_programmability.py +0 -0
  155. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_delete_statement.py +0 -0
  156. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_discarded_validation_result.py +0 -0
  157. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_dual_shape_model_field_reader.py +0 -0
  158. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_dunder_all.py +0 -0
  159. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_duplicate_dunder_all_entry.py +0 -0
  160. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_duplicate_field_validator_body.py +0 -0
  161. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_dynamic_builtins.py +0 -0
  162. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_exception_text_in_500_detail.py +0 -0
  163. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_excessive_cognitive_complexity.py +0 -0
  164. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_fastapi_on_event.py +0 -0
  165. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_file_level_escape_hatch_suppression.py +0 -0
  166. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_first_party_private_import.py +0 -0
  167. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_fixed_sleep_before_assert.py +0 -0
  168. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_fixed_sleep_in_loop.py +0 -0
  169. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_folded_bad_request_not_found.py +0 -0
  170. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_frozen_after_validator_field_write.py +0 -0
  171. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_generic_json_parser.py +0 -0
  172. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_generic_single_export_module.py +0 -0
  173. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_hasattr.py +0 -0
  174. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_hidden_constructor_fallback.py +0 -0
  175. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_impossible_pydantic_field_bounds.py +0 -0
  176. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_injected_module_loader.py +0 -0
  177. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_input_model_mutation.py +0 -0
  178. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_interpreter_source_arguments.py +0 -0
  179. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_invalid_argument_name_suppression.py +0 -0
  180. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_invalid_pydantic_validator_return.py +0 -0
  181. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_loguru_exc_info.py +0 -0
  182. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_loguru_printf_format.py +0 -0
  183. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_mocked_pydantic_value_object.py +0 -0
  184. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_mutating_container_transform.py +0 -0
  185. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_mutating_input_with_result.py +0 -0
  186. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_nested_pydantic_field_validator.py +0 -0
  187. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_nullable_dependency_fallback.py +0 -0
  188. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_offset_pagination.py +0 -0
  189. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_partial_type_is.py +0 -0
  190. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_positional_psycopg_row_escape.py +0 -0
  191. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_psycopg_execution_in_loop.py +0 -0
  192. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_psycopg_execution_outside_injected_owner.py +0 -0
  193. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_random_uuid_in_sql.py +0 -0
  194. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_raw_connection_in_tests.py +0 -0
  195. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_raw_source_text_test_oracle.py +0 -0
  196. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_recording_store.py +0 -0
  197. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_redundant_attribute_unpacking.py +0 -0
  198. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_redundant_literal_description.py +0 -0
  199. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_redundant_local_alias.py +0 -0
  200. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_redundant_module_alias_exports.py +0 -0
  201. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_redundant_sql_alias.py +0 -0
  202. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_repeated_string_literal.py +0 -0
  203. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_repeated_test_body.py +0 -0
  204. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_restated_comment.py +0 -0
  205. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_secret_in_log.py +0 -0
  206. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_select_star.py +0 -0
  207. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_service_behavior_in_settings.py +0 -0
  208. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_shallow_container_type_guard.py +0 -0
  209. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_shallow_record_type_guard.py +0 -0
  210. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_shared_mutable_default.py +0 -0
  211. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_slash_collection_root_under_prefix.py +0 -0
  212. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_string_concat_in_loop.py +0 -0
  213. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_swallowed_asyncio_cancellation.py +0 -0
  214. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_sys_path_mutation.py +0 -0
  215. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_tautological_expect.py +0 -0
  216. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_test_comments.py +0 -0
  217. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_test_method_grafting.py +0 -0
  218. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_typed_doc_sections.py +0 -0
  219. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_unique_violation_message_match.py +0 -0
  220. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_unknown_pydantic_validator_field.py +0 -0
  221. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_unnecessary_docstring.py +0 -0
  222. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_unused_copy_result.py +0 -0
  223. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_unused_underscored_keyword_parameter.py +0 -0
  224. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_unused_value_marker.py +0 -0
  225. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_vague_suppression_description.py +0 -0
  226. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_whole_request_response_payload_in_log.py +0 -0
  227. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_work_verb_get_route.py +0 -0
  228. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/opaque_parametrize_case_needs_id.py +0 -0
  229. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/over_mocked_test.py +0 -0
  230. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/phase_label_comment.py +0 -0
  231. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_application_model_joins.py +0 -0
  232. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_autospec_for_callable_mock.py +0 -0
  233. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_bulk_upsert.py +0 -0
  234. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_class_row.py +0 -0
  235. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_collection_comprehension.py +0 -0
  236. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_configured_cloud_scope.py +0 -0
  237. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_constant_time_secret_compare.py +0 -0
  238. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_coordinated_state_owner.py +0 -0
  239. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_declarative_batch_validation.py +0 -0
  240. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_direct_import_module.py +0 -0
  241. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_discriminated_model_union.py +0 -0
  242. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_fstring_over_concat.py +0 -0
  243. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_grouped_settings.py +0 -0
  244. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_immutable_module_constant.py +0 -0
  245. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_injected_dependency_over_monkeypatch.py +0 -0
  246. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_injected_service.py +0 -0
  247. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_library_fake.py +0 -0
  248. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_match_assert_never.py +0 -0
  249. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_match_exception_dispatch.py +0 -0
  250. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_match_type_dispatch.py +0 -0
  251. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_match_value_dispatch.py +0 -0
  252. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_module_level_constant.py +0 -0
  253. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_monkeypatch_for_process_state_in_test.py +0 -0
  254. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_monotonic_for_elapsed_time.py +0 -0
  255. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_namedtuple_over_tuple_return.py +0 -0
  256. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_native_string_check.py +0 -0
  257. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_nominal_id_types.py +0 -0
  258. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_non_nullable_collection.py +0 -0
  259. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_optional_composite.py +0 -0
  260. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_or_pattern.py +0 -0
  261. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_precise_object_contract.py +0 -0
  262. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_psycopg_executemany.py +0 -0
  263. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_pydantic_json_value.py +0 -0
  264. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_pydantic_model_assertion.py +0 -0
  265. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_pytest_dependency_fixtures.py +0 -0
  266. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_pytest_fixture_contract.py +0 -0
  267. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_pytest_fixture_injection.py +0 -0
  268. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_regex_fullmatch.py +0 -0
  269. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_required_constructor_parameters.py +0 -0
  270. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_runtime_validation.py +0 -0
  271. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_self_documenting_constant.py +0 -0
  272. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_self_type_annotation.py +0 -0
  273. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_set_isdisjoint.py +0 -0
  274. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_single_psycopg_cursor.py +0 -0
  275. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_str_enum.py +0 -0
  276. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_struct_over_namedtuple.py +0 -0
  277. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_typed_cli.py +0 -0
  278. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_typed_mapping_get.py +0 -0
  279. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_typed_settings_field.py +0 -0
  280. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_validated_uuid_comparison.py +0 -0
  281. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_walrus_awaited_none_guard.py +0 -0
  282. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_walrus_comprehension_filter.py +0 -0
  283. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_walrus_regex_match.py +0 -0
  284. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_walrus_stream_loop.py +0 -0
  285. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/production_derived_test_cases.py +0 -0
  286. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/pytest_fixture_returns_bare_tuple.py +0 -0
  287. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/pytest_fixture_returns_closed_resource.py +0 -0
  288. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/redundant_class_docstring.py +0 -0
  289. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/redundant_docstring.py +0 -0
  290. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/redundant_module_docstring.py +0 -0
  291. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/redundant_test_constructor_forwarder.py +0 -0
  292. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/repeated_kwarg_heavy_call_in_test.py +0 -0
  293. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/repeated_static_call_cases.py +0 -0
  294. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/repeated_test_composition.py +0 -0
  295. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/repeated_unimplemented_test_contract.py +0 -0
  296. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/require_constrained_api_integer.py +0 -0
  297. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/require_exp_on_jwt_decode.py +0 -0
  298. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/require_explicit_contract_implementation.py +0 -0
  299. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/require_explicit_psycopg_transaction.py +0 -0
  300. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/require_explicit_service_contract.py +0 -0
  301. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/require_injectable_retry_sleep.py +0 -0
  302. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/require_keyword_only_swap_prone_params.py +0 -0
  303. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/require_nodecode_for_splitting_settings_field.py +0 -0
  304. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/require_port_for_service.py +0 -0
  305. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/require_precise_factory_signature.py +0 -0
  306. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/require_public_dependency_contract.py +0 -0
  307. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/require_pydantic_for_external_json.py +0 -0
  308. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/require_pydantic_for_mapping_shape.py +0 -0
  309. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/require_pydantic_for_structured_payload.py +0 -0
  310. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/require_pydantic_ordinal_lower_bound.py +0 -0
  311. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/restated_test_docstring.py +0 -0
  312. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/service_singleton_delegates_to_bulk.py +0 -0
  313. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/shared_mutable_pydantic_factory.py +0 -0
  314. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/stepdown.py +0 -0
  315. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/store_field_update_reuses_upsert.py +0 -0
  316. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/store_get_delegates_to_bulk_read.py +0 -0
  317. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/store_insert_requires_explicit_conflict_policy.py +0 -0
  318. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/store_insert_requires_on_conflict.py +0 -0
  319. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/store_mutation_command_fanout.py +0 -0
  320. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/subprocess_kill_without_reap.py +0 -0
  321. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/test_without_explicit_oracle.py +0 -0
  322. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/timestamp_order_requires_tiebreaker.py +0 -0
  323. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/trailing_value_narration.py +0 -0
  324. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/typed_error_reasons.py +0 -0
  325. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/uncontrolled_randomness_in_test.py +0 -0
  326. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/unused_mock_setup.py +0 -0
  327. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/unused_test_factory_option.py +0 -0
  328. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/sql_literals.py +0 -0
  329. {sarj_python_lint-1.127.0 → sarj_python_lint-1.131.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.127.0
3
+ Version: 1.131.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/
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "sarj-python-lint"
3
- version = "1.127.0"
3
+ version = "1.131.0"
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" }]
@@ -10,6 +10,7 @@ from packaging.requirements import InvalidRequirement, Requirement
10
10
  from packaging.version import InvalidVersion, Version
11
11
 
12
12
  from sarj_python_lint.json_boundary import is_object_mapping
13
+ from sarj_python_lint.rules._annotation_origins import type_parameter_shadow
13
14
  from sarj_python_lint.rules._first_party import distribution_root
14
15
  from sarj_python_lint.rules._namespace_access import dynamic_namespace_access
15
16
  from sarj_python_lint.rules._native_namespace_capability import native_namespace_capability_escapes
@@ -21,6 +22,7 @@ if TYPE_CHECKING:
21
22
 
22
23
 
23
24
  MODEL_SOURCES = frozenset({"pydantic", "pydantic.main"})
25
+ SETTINGS_SOURCES = frozenset({"pydantic_settings", "pydantic_settings.main"})
24
26
  FIELD_SOURCES = frozenset({"pydantic", "pydantic.fields"})
25
27
  DECORATOR_SOURCES = frozenset({"pydantic", "pydantic.functional_validators", "pydantic.functional_serializers"})
26
28
  TYPING_SOURCES = frozenset({"typing", "typing_extensions"})
@@ -31,17 +33,46 @@ _BUILTIN_SOURCES = frozenset({"builtins"})
31
33
  _SENSITIVE_MODULES = frozenset({"pydantic", "typing", "typing_extensions", "builtins"})
32
34
 
33
35
 
34
- def direct_models(context: PythonFileContext, *, methods: bool = False) -> tuple[ast.ClassDef, ...]:
35
- tree = context.tree
36
- if tree is None or context.generated or context.has_wildcard_import:
37
- return ()
36
+ def required_default_sentinel(value: ast.expr, context: PythonFileContext, *, at: ast.AST | None = None) -> bool:
37
+ if isinstance(value, ast.Constant):
38
+ return value.value is Ellipsis
39
+ if not isinstance(value, ast.Name) or value.id != "Ellipsis":
40
+ return False
41
+ anchor = value if at is None else at
42
+ inventory = context.binding_inventory
38
43
  if (
39
- native_namespace_capability_escapes(context)
40
- or _mutated_imports(context)
41
- or _ambiguous_imports(context)
42
- or _escaped_imports(context)
43
- or dynamic_namespace_access(context.nodes(ast.AST), context.imports, context.parents)
44
+ inventory.wildcard
45
+ or not context.static_resource_provenance.builtin_namespace_untouched
46
+ or type_parameter_shadow("Ellipsis", anchor, context)
44
47
  ):
48
+ return False
49
+ scope = inventory.scope(anchor)
50
+ while scope is not None:
51
+ if "Ellipsis" in inventory.bindings.get(scope, {}):
52
+ return False
53
+ scope = inventory.scope(scope)
54
+ return True
55
+
56
+
57
+ def model_namespace_hazards(
58
+ context: PythonFileContext, *, include_settings: bool = False, escape_symbols: frozenset[str] | None = None
59
+ ) -> bool:
60
+ modules = _SENSITIVE_MODULES | {"pydantic_settings"} if include_settings else _SENSITIVE_MODULES
61
+ return (
62
+ context.has_wildcard_import
63
+ or native_namespace_capability_escapes(context)
64
+ or _mutated_imports(context, modules)
65
+ or _ambiguous_imports(context, modules)
66
+ or _escaped_imports(context, modules, escape_symbols)
67
+ or dynamic_namespace_access(context.nodes(ast.AST), context.imports, context.parents)
68
+ )
69
+
70
+
71
+ def direct_models(
72
+ context: PythonFileContext, *, methods: bool = False, include_settings: bool = False
73
+ ) -> tuple[ast.ClassDef, ...]:
74
+ tree = context.tree
75
+ if tree is None or context.generated or model_namespace_hazards(context, include_settings=include_settings):
45
76
  return ()
46
77
  provenance = context.static_resource_provenance
47
78
  return tuple(
@@ -49,7 +80,13 @@ def direct_models(context: PythonFileContext, *, methods: bool = False) -> tuple
49
80
  for node in tree.body
50
81
  if isinstance(node, ast.ClassDef)
51
82
  and len(node.bases) == 1
52
- and context.imports.resolves(node.bases[0], sources=MODEL_SOURCES, symbol="BaseModel")
83
+ and (
84
+ context.imports.resolves(node.bases[0], sources=MODEL_SOURCES, symbol="BaseModel")
85
+ or (
86
+ include_settings
87
+ and context.module_imports.resolves(node.bases[0], sources=SETTINGS_SOURCES, symbol="BaseSettings")
88
+ )
89
+ )
53
90
  and not node.decorator_list
54
91
  and not node.keywords
55
92
  and not node.type_params
@@ -187,7 +224,7 @@ def inert_class_value(
187
224
  context: PythonFileContext, value: ast.expr, provenance: ResourceProvenance, *, pydantic_fields: bool
188
225
  ) -> bool:
189
226
  if not isinstance(value, ast.Call):
190
- return literal_value(value)
227
+ return literal_value(value) or required_default_sentinel(value, context)
191
228
  qualified = context.module_imports.resolved_qualified_name(value.func)
192
229
  if (
193
230
  not pydantic_fields
@@ -196,10 +233,15 @@ def inert_class_value(
196
233
  or not provenance.imported(value.func, qualified)
197
234
  ):
198
235
  return False
199
- return all(literal_value(argument) for argument in value.args) and all(
236
+ field_call = qualified in {"pydantic.Field", "pydantic.fields.Field"}
237
+ return all(
238
+ literal_value(argument) or (field_call and index == 0 and required_default_sentinel(argument, context))
239
+ for index, argument in enumerate(value.args)
240
+ ) and all(
200
241
  keyword.arg is not None
201
242
  and (
202
243
  literal_value(keyword.value)
244
+ or (field_call and keyword.arg == "default" and required_default_sentinel(keyword.value, context))
203
245
  or (
204
246
  keyword.arg == "default_factory"
205
247
  and isinstance(keyword.value, ast.Name)
@@ -212,26 +254,26 @@ def inert_class_value(
212
254
  )
213
255
 
214
256
 
215
- def _mutated_imports(context: PythonFileContext) -> bool:
257
+ def _mutated_imports(context: PythonFileContext, modules: frozenset[str]) -> bool:
216
258
  for node in context.nodes(ast.Attribute, ast.Subscript, ast.Call):
217
259
  if isinstance(node, (ast.Attribute, ast.Subscript)) and isinstance(node.ctx, (ast.Store, ast.Del)):
218
- if _sensitive_import_root(node, context):
260
+ if _sensitive_import_root(node, context, modules):
219
261
  return True
220
262
  elif (
221
263
  isinstance(node, ast.Call)
222
264
  and node.args
223
265
  and _is_attribute_mutator(node.func, context)
224
- and _sensitive_import_root(node.args[0], context)
266
+ and _sensitive_import_root(node.args[0], context, modules)
225
267
  ):
226
268
  return True
227
269
  return False
228
270
 
229
271
 
230
- def _sensitive_import_root(node: ast.expr, context: PythonFileContext) -> bool:
272
+ def _sensitive_import_root(node: ast.expr, context: PythonFileContext, modules: frozenset[str]) -> bool:
231
273
  while isinstance(node, (ast.Attribute, ast.Subscript)):
232
274
  node = node.value
233
275
  binding = context.module_imports.bindings.get(node.id) if isinstance(node, ast.Name) else None
234
- return binding is not None and binding.module.partition(".")[0] in _SENSITIVE_MODULES
276
+ return binding is not None and binding.module.partition(".")[0] in modules
235
277
 
236
278
 
237
279
  def _is_attribute_mutator(node: ast.expr, context: PythonFileContext) -> bool:
@@ -241,19 +283,29 @@ def _is_attribute_mutator(node: ast.expr, context: PythonFileContext) -> bool:
241
283
  ) or context.imports.resolved_symbol(node, sources=frozenset({"builtins"})) in names
242
284
 
243
285
 
244
- def _escaped_imports(context: PythonFileContext) -> bool:
286
+ def _escaped_imports(
287
+ context: PythonFileContext, modules: frozenset[str], symbols: frozenset[str] | None = None
288
+ ) -> bool:
245
289
  for node in context.nodes(ast.Name, ast.Attribute):
246
- if not isinstance(node.ctx, ast.Load) or not _sensitive_import_root(node, context):
290
+ if not isinstance(node.ctx, ast.Load) or not _sensitive_import_root(node, context, modules):
247
291
  continue
248
292
  parent = context.parents.get(node)
249
293
  if isinstance(parent, ast.Attribute) and parent.value is node:
250
294
  continue
295
+ if symbols is not None and not _escape_in_scope(node, context, symbols):
296
+ continue
251
297
  if (isinstance(node, ast.Name) and node.id == "TYPE_CHECKING") or _type_reference(node, parent):
252
298
  continue
253
299
  return True
254
300
  return False
255
301
 
256
302
 
303
+ def _escape_in_scope(node: ast.expr, context: PythonFileContext, symbols: frozenset[str]) -> bool:
304
+ qualified = context.module_imports.resolved_qualified_name(node)
305
+ # A whole module stays a namespace capability even when named symbols are narrowed.
306
+ return qualified is None or any(qualified == symbol or symbol.startswith(f"{qualified}.") for symbol in symbols)
307
+
308
+
257
309
  def _type_reference(node: ast.expr, parent: ast.AST | None) -> bool:
258
310
  match parent:
259
311
  case ast.Call(func=func):
@@ -273,28 +325,30 @@ def _type_reference(node: ast.expr, parent: ast.AST | None) -> bool:
273
325
  return False
274
326
 
275
327
 
276
- def _ambiguous_imports(context: PythonFileContext) -> bool:
328
+ def _ambiguous_imports(context: PythonFileContext, modules: frozenset[str]) -> bool:
277
329
  return any(
278
- _nested_namespace_import(node, context) or _ambiguous_import(node, context)
330
+ _nested_namespace_import(node, context, modules) or _ambiguous_import(node, context, modules)
279
331
  for node in context.nodes(ast.Import, ast.ImportFrom)
280
332
  )
281
333
 
282
334
 
283
- def _nested_namespace_import(node: ast.Import | ast.ImportFrom, context: PythonFileContext) -> bool:
335
+ def _nested_namespace_import(
336
+ node: ast.Import | ast.ImportFrom, context: PythonFileContext, modules: frozenset[str]
337
+ ) -> bool:
284
338
  if context.parents.get(node) is context.tree:
285
339
  return False
286
340
  if isinstance(node, ast.ImportFrom):
287
- return (node.module or "").partition(".")[0] in _SENSITIVE_MODULES
288
- return any(alias.name.partition(".")[0] in _SENSITIVE_MODULES for alias in node.names)
341
+ return (node.module or "").partition(".")[0] in modules
342
+ return any(alias.name.partition(".")[0] in modules for alias in node.names)
289
343
 
290
344
 
291
- def _ambiguous_import(node: ast.Import | ast.ImportFrom, context: PythonFileContext) -> bool:
345
+ def _ambiguous_import(node: ast.Import | ast.ImportFrom, context: PythonFileContext, modules: frozenset[str]) -> bool:
292
346
  for alias in node.names:
293
347
  name = alias.asname or alias.name.partition(".")[0]
294
348
  if name in _BUILTIN_BINDINGS:
295
349
  return True
296
350
  binding = context.module_imports.bindings.get(name)
297
- if binding is None or binding.module.partition(".")[0] not in {"pydantic", "typing", "typing_extensions"}:
351
+ if binding is None or binding.module.partition(".")[0] not in modules - {"builtins"}:
298
352
  continue
299
353
  if context.parents.get(node) is not context.tree:
300
354
  return True
@@ -0,0 +1,281 @@
1
+ from __future__ import annotations
2
+
3
+ import ast
4
+ from pathlib import PurePosixPath
5
+ from typing import TYPE_CHECKING, final, override
6
+
7
+ from sarj_python_lint.rule_base import (
8
+ AutofixPolicy,
9
+ Diagnostic,
10
+ ExampleFile,
11
+ ExampleOutcome,
12
+ Rule,
13
+ RuleCategory,
14
+ RuleDocumentation,
15
+ RuleExample,
16
+ Severity,
17
+ )
18
+ from sarj_python_lint.rules._annotation_origins import AnnotationOrigins
19
+ from sarj_python_lint.rules._pydantic_field_contract import model_namespace_hazards, required_default_sentinel
20
+
21
+
22
+ if TYPE_CHECKING:
23
+ from sarj_python_lint._file_context import PythonFileContext
24
+
25
+
26
+ _SETTINGS_BASES = frozenset({"pydantic_settings.BaseSettings", "pydantic_settings.main.BaseSettings"})
27
+ _FIELD_PROVIDERS = frozenset({"pydantic.Field", "pydantic.fields.Field"})
28
+ _ANNOTATED = frozenset({"typing.Annotated", "typing_extensions.Annotated"})
29
+ _METADATA_WRAPPERS = frozenset(
30
+ {"typing.ClassVar", "typing_extensions.ClassVar", "typing.Final", "typing_extensions.Final"}
31
+ )
32
+ _NATIVE_PROVIDERS = (
33
+ _SETTINGS_BASES
34
+ | _FIELD_PROVIDERS
35
+ | _ANNOTATED
36
+ | _METADATA_WRAPPERS
37
+ | {"typing.TypeAlias", "typing_extensions.TypeAlias"}
38
+ )
39
+ _MAX_METADATA_DEPTH = 16
40
+ _MAX_METADATA_FIELDS = 64
41
+ _ENVIRONMENT = "environment"
42
+
43
+
44
+ @final
45
+ class NoDefaultedEnvironmentSetting(Rule):
46
+ id = "no-defaulted-environment-setting"
47
+ code = "SARJ497"
48
+ documentation = RuleDocumentation(
49
+ default_level=Severity.WARNING,
50
+ summary="A settings field that names the deployment environment must not declare a default.",
51
+ rationale=(
52
+ "A defaulted environment setting lets a deployment that forgot the variable start as the default "
53
+ "environment, so it quietly behaves like local or development code and can share state with another stack."
54
+ ),
55
+ remediation=(
56
+ 'Declare the field without a default, for example `environment: Environment = Field(alias="ENVIRONMENT")`, '
57
+ "so a missing value fails at startup."
58
+ ),
59
+ category=RuleCategory.CORRECTNESS,
60
+ autofix=AutofixPolicy.NONE,
61
+ limitations=(
62
+ "Only classes deriving from pydantic-settings BaseSettings directly or through a class in the same file are checked.",
63
+ "A field qualifies when its name or literal alias is `environment` in any letter case.",
64
+ "Other environment-isolating settings, such as resource-name prefixes, have no stable name and are not checked.",
65
+ "Source-proven Annotated Field metadata and assignment defaults are merged in order; literal Ellipsis and the proven unshadowed bare builtin Ellipsis are equivalent required markers. Field Ellipsis retains an earlier default, bare Ellipsis resets it and default_factory=None clears an earlier factory. Only literal input aliases are followed; private fields, model_config, ClassVar/Final metadata and opaque Annotated metadata are excluded. Namespace mutation/escape, ambiguous imports and bounded metadata overflow abstain.",
66
+ ),
67
+ examples=(
68
+ RuleExample(
69
+ example_id="annotated-defaulted-environment",
70
+ scenario="annotated-environment",
71
+ title="Annotated metadata still supplies a deployment default",
72
+ outcome=ExampleOutcome.MATCH,
73
+ files=(
74
+ ExampleFile.python(
75
+ "service/settings.py",
76
+ "from typing import Annotated\nfrom pydantic import Field\n"
77
+ "from pydantic_settings import BaseSettings\nclass Settings(BaseSettings):\n"
78
+ " deployment: Annotated[str, Field(default='prod', alias='ENVIRONMENT')]\n",
79
+ ),
80
+ ),
81
+ focus_path=PurePosixPath("service/settings.py"),
82
+ expected_count=1,
83
+ public=True,
84
+ ),
85
+ RuleExample(
86
+ example_id="annotated-required-environment",
87
+ scenario="annotated-environment",
88
+ title="Annotated metadata can leave the input required",
89
+ outcome=ExampleOutcome.NO_MATCH,
90
+ files=(
91
+ ExampleFile.python(
92
+ "service/settings.py",
93
+ "from typing import Annotated\nfrom pydantic import Field\n"
94
+ "from pydantic_settings import BaseSettings\nclass Settings(BaseSettings):\n"
95
+ " deployment: Annotated[str, Field(alias='ENVIRONMENT')]\n",
96
+ ),
97
+ ),
98
+ focus_path=PurePosixPath("service/settings.py"),
99
+ expected_count=0,
100
+ public=True,
101
+ ),
102
+ RuleExample(
103
+ example_id="defaulted-environment",
104
+ title="A defaulted environment pretends to be local",
105
+ outcome=ExampleOutcome.MATCH,
106
+ files=(
107
+ ExampleFile.python(
108
+ "service/settings.py",
109
+ "from pydantic import Field\nfrom pydantic_settings import BaseSettings\n\n"
110
+ "class Settings(BaseSettings):\n"
111
+ " environment: str = Field(default='local', alias='ENVIRONMENT')\n",
112
+ ),
113
+ ),
114
+ focus_path=PurePosixPath("service/settings.py"),
115
+ expected_count=1,
116
+ public=True,
117
+ ),
118
+ RuleExample(
119
+ example_id="required-environment",
120
+ title="A required environment fails at startup when missing",
121
+ outcome=ExampleOutcome.NO_MATCH,
122
+ files=(
123
+ ExampleFile.python(
124
+ "service/settings.py",
125
+ "from pydantic import Field\nfrom pydantic_settings import BaseSettings\n\n"
126
+ "class Settings(BaseSettings):\n"
127
+ " environment: str = Field(alias='ENVIRONMENT')\n",
128
+ ),
129
+ ),
130
+ focus_path=PurePosixPath("service/settings.py"),
131
+ expected_count=0,
132
+ public=True,
133
+ ),
134
+ ),
135
+ )
136
+ description = documentation.summary
137
+
138
+ @override
139
+ def check_context(self, context: PythonFileContext) -> list[Diagnostic]:
140
+ tree = context.tree
141
+ if tree is None or context.generated or "BaseSettings" not in context.symbol_source:
142
+ return []
143
+ if model_namespace_hazards(context, include_settings=True, escape_symbols=_NATIVE_PROVIDERS):
144
+ return []
145
+ facts = AnnotationOrigins(context)
146
+ settings_classes: set[ast.ClassDef] = set()
147
+ diagnostics: list[Diagnostic] = []
148
+ for model in tree.body:
149
+ if not isinstance(model, ast.ClassDef) or not _is_settings_class(model, settings_classes, facts):
150
+ continue
151
+ settings_classes.add(model)
152
+ diagnostics.extend(
153
+ Diagnostic(
154
+ context.path,
155
+ field.lineno,
156
+ field.col_offset + 1,
157
+ self.code,
158
+ "This environment setting has a default, so a deployment missing the variable starts as that "
159
+ "environment. Remove the default so startup fails instead.",
160
+ severity=Severity.WARNING,
161
+ )
162
+ for field in model.body
163
+ if isinstance(field, ast.AnnAssign) and _is_defaulted_environment(field, facts)
164
+ )
165
+ return diagnostics
166
+
167
+
168
+ def _is_settings_class(model: ast.ClassDef, known: set[ast.ClassDef], facts: AnnotationOrigins) -> bool:
169
+ return any(
170
+ facts.qualified(base, base) in _SETTINGS_BASES
171
+ or (isinstance(base, ast.Name) and facts.provenance.binding(base.id, base) in known)
172
+ for base in model.bases
173
+ )
174
+
175
+
176
+ def _is_defaulted_environment(field: ast.AnnAssign, facts: AnnotationOrigins) -> bool:
177
+ if not isinstance(field.target, ast.Name) or field.target.id.startswith("_") or field.target.id == "model_config":
178
+ return False
179
+ options = _field_options(field, facts)
180
+ if options is None:
181
+ return False
182
+ alias = options.get("validation_alias")
183
+ if not _is_environment_name(
184
+ field.target.id, alias.value if isinstance(alias, ast.Constant) and isinstance(alias.value, str) else None
185
+ ):
186
+ return False
187
+ factory = options.get("default_factory")
188
+ if factory is not None and not _is_none(factory):
189
+ return True
190
+ default = options.get("default")
191
+ return default is not None and not _is_none(default)
192
+
193
+
194
+ def _field_options(field: ast.AnnAssign, facts: AnnotationOrigins) -> dict[str, ast.expr] | None:
195
+ calls = _annotated_fields(field.annotation, facts)
196
+ if calls is None:
197
+ return None
198
+ bare_default = field.value
199
+ if isinstance(bare_default, ast.Call) and facts.qualified(bare_default.func, bare_default) in _FIELD_PROVIDERS:
200
+ calls.append((bare_default, bare_default))
201
+ bare_default = None
202
+ options: dict[str, ast.expr] = {}
203
+ for call, at in calls:
204
+ if not _merge_field_options(call, at, options, facts):
205
+ return None
206
+ if bare_default is not None:
207
+ if required_default_sentinel(bare_default, facts.context):
208
+ options.pop("default", None)
209
+ else:
210
+ options["default"] = bare_default
211
+ return options
212
+
213
+
214
+ def _merge_field_options(call: ast.Call, at: ast.expr, options: dict[str, ast.expr], facts: AnnotationOrigins) -> bool:
215
+ if (
216
+ len(call.args) > 1
217
+ or any(keyword.arg is None for keyword in call.keywords)
218
+ or any(isinstance(argument, ast.Starred) for argument in call.args)
219
+ ):
220
+ return False
221
+ supplied = {keyword.arg: keyword.value for keyword in call.keywords if keyword.arg is not None}
222
+ default = supplied.get("default", call.args[0] if call.args else None)
223
+ if default is not None and not required_default_sentinel(default, facts.context, at=at):
224
+ options["default"] = default
225
+ if "default_factory" in supplied:
226
+ options["default_factory"] = supplied["default_factory"]
227
+ if "alias" in supplied:
228
+ options["validation_alias"] = supplied["alias"]
229
+ validation_alias = supplied.get("validation_alias")
230
+ # Field maps None to its own alias; without one, the earlier input alias remains.
231
+ if validation_alias is not None and not _is_none(validation_alias):
232
+ options["validation_alias"] = validation_alias
233
+ return True
234
+
235
+
236
+ def _annotated_fields(annotation: ast.expr, facts: AnnotationOrigins) -> list[tuple[ast.Call, ast.expr]] | None:
237
+ layers = _annotated_layers(annotation, facts)
238
+ if layers is None:
239
+ return None
240
+ calls: list[tuple[ast.Call, ast.expr]] = []
241
+ for metadata, at in reversed(layers):
242
+ for value in metadata:
243
+ if (
244
+ not isinstance(value, ast.Call)
245
+ or facts.qualified(value.func, at) not in _FIELD_PROVIDERS
246
+ or len(calls) >= _MAX_METADATA_FIELDS
247
+ ):
248
+ return None
249
+ calls.append((value, at))
250
+ return calls
251
+
252
+
253
+ def _annotated_layers(annotation: ast.expr, facts: AnnotationOrigins) -> list[tuple[list[ast.expr], ast.expr]] | None:
254
+ layers: list[tuple[list[ast.expr], ast.expr]] = []
255
+ current = at = annotation
256
+ for _ in range(_MAX_METADATA_DEPTH):
257
+ resolved = facts.resolve_annotation(current, at=at)
258
+ if resolved is None:
259
+ return None
260
+ current, at = resolved.expression, resolved.at
261
+ if not isinstance(current, ast.Subscript):
262
+ return layers
263
+ wrapper = facts.qualified(current.value, at)
264
+ if wrapper in _METADATA_WRAPPERS:
265
+ return None
266
+ if wrapper not in _ANNOTATED:
267
+ return layers
268
+ members = current.slice.elts if isinstance(current.slice, ast.Tuple) else [current.slice]
269
+ if not members[1:]:
270
+ return None
271
+ layers.append((members[1:], at))
272
+ current = members[0]
273
+ return None
274
+
275
+
276
+ def _is_environment_name(name: str, alias: str | None) -> bool:
277
+ return name.lower() == _ENVIRONMENT or (alias is not None and alias.lower() == _ENVIRONMENT)
278
+
279
+
280
+ def _is_none(value: ast.expr) -> bool:
281
+ return isinstance(value, ast.Constant) and value.value is None
@@ -97,11 +97,41 @@ class NoDiscardedTaggedOutcome(ProjectRule):
97
97
  autofix=AutofixPolicy.NONE,
98
98
  limitations=(
99
99
  "Review warning for standalone synchronous calls and directly awaited async calls to stable source-visible module functions. The return must resolve to at least two direct Pydantic, dataclass or required TypedDict variants sharing a string or Boolean Literal discriminator with disjoint values. No name such as Result or Error establishes proof.",
100
- "Module-local and prepared-project absolute imports, quoted bare aliases and PEP 604 returns, unquoted typing.Union and Annotated, and bounded type aliases are supported. Explicitly specialized PEP 695 records and aliases support ordinary type parameters when tags are independent of payload parameters. Parameter-dependent variants/tags, bounded/defaulted/variadic parameters, incorrect arity, quoted typing-wrapper combinations, unknown receivers, decorated or generic functions, re-exports, optional/scalar branches, inheritance, dynamic namespaces, rebound or escaped callable identities, generator functions and unsupported annotations abstain.",
101
- "Named assignments, returned, passed or conditionally consumed results are preserved. A direct assignment to the single underscore target is an explicit discard and is reviewed. An unawaited async call belongs to coroutine checks. Direct class-body execution, generated sources and opaque providers are excluded. This rule identifies discarding; it does not prove that an assignment handles every variant or infer expected failure from a record name.",
100
+ "Module-local and prepared-project absolute imports, quoted bare aliases and PEP 604 returns, unquoted typing.Union and Annotated, and bounded type aliases are supported. Simple same-module callable assignment aliases are followed only through unique, earlier bindings with no escapes or mutations. Ordinary PEP 695 function parameters and explicitly specialized records/aliases are supported when tags and variant identities are independent of payload parameters. Parameter-dependent variants/tags, bounded/defaulted/variadic parameters, incorrect arity, quoted typing-wrapper combinations, unknown receivers, decorated functions, re-exports, optional/scalar branches, inheritance, dynamic namespaces, rebound or escaped callable identities, generator functions and unsupported annotations abstain.",
101
+ "Named assignments, returned, passed or conditionally consumed results are preserved. A direct assignment to the single underscore target is an explicit discard and is reviewed. An unawaited async call belongs to coroutine checks. Direct class-body execution, generated sources and opaque providers are excluded. Assignment aliases of imported functions, callbacks, factories and forward alias declarations remain outside the proof. This rule identifies discarding; it does not prove that an assignment handles every variant or infer expected failure from a record name.",
102
102
  "String or Boolean Literal tags must be direct instance fields on every variant and retain their original class-scope binding. Existing Boolean wire discriminators remain valid; the analyzer does not rename tags or impose Success/Error class names. Quoted field tags remain outside the proof; quoted module return annotations retain their source declaration anchor. Dynamic fields, optional TypedDict fields, other tag types, computed Literal values and multi-field discriminator hierarchies are not inferred. A discriminator does not prove JSON serialization for arbitrary payloads. No automatic rewrite changes call behavior or error handling.",
103
103
  ),
104
104
  examples=(
105
+ RuleExample(
106
+ example_id="discarded-callable-alias",
107
+ scenario="callable-alias-consumption",
108
+ title="A stable alias still returns an outcome that needs handling",
109
+ outcome=ExampleOutcome.MATCH,
110
+ files=(
111
+ ExampleFile.python(
112
+ "app/outcomes.py", _GENERIC_RESULT + "persist = save\npersist('record-7', False)\n"
113
+ ),
114
+ ),
115
+ focus_path=PurePosixPath("app/outcomes.py"),
116
+ expected_count=1,
117
+ public=True,
118
+ ),
119
+ RuleExample(
120
+ example_id="forwarded-callable-alias",
121
+ scenario="callable-alias-consumption",
122
+ title="The alias result is propagated to its caller",
123
+ outcome=ExampleOutcome.NO_MATCH,
124
+ files=(
125
+ ExampleFile.python(
126
+ "app/outcomes.py",
127
+ _GENERIC_RESULT
128
+ + "persist = save\ndef run() -> Result[str, Denied]:\n return persist('record-7', False)\n",
129
+ ),
130
+ ),
131
+ focus_path=PurePosixPath("app/outcomes.py"),
132
+ expected_count=0,
133
+ public=True,
134
+ ),
105
135
  RuleExample(
106
136
  example_id="discarded-outcome",
107
137
  title="A tagged outcome is discarded",
@@ -203,9 +233,11 @@ class _OutcomeCalls:
203
233
  return False
204
234
  function = source.function
205
235
  if function not in self.outcomes:
236
+ parameters = plain_parameters(function.type_params)
206
237
  members = (
207
- self._members(_Reference(source.context, function.returns, function), frozenset())
238
+ self._members(_Reference(source.context, function.returns, function, parameters), frozenset())
208
239
  if function.returns is not None
240
+ and parameters is not None
209
241
  and _callable_identity(source.context, function)
210
242
  and self._non_generator(source)
211
243
  else None
@@ -233,14 +265,35 @@ class _OutcomeCalls:
233
265
  return self._imported_function(expression)
234
266
 
235
267
  def _local_function(self, expression: ast.expr) -> _FunctionSource | None:
236
- if not isinstance(expression, ast.Name):
268
+ seen: set[ast.AST] = set()
269
+ while isinstance(expression, ast.Name):
270
+ binding = self.context.static_resource_provenance.runtime_binding(expression.id, expression)
271
+ if not isinstance(binding, ast.Name):
272
+ break
273
+ if (
274
+ binding in seen
275
+ or len(seen) >= _MAX_DEPTH
276
+ or (binding.lineno, binding.col_offset) >= (expression.lineno, expression.col_offset)
277
+ ):
278
+ return None
279
+ seen.add(binding)
280
+ assignment = self.context.parents.get(binding)
281
+ if (
282
+ not isinstance(assignment, ast.Assign | ast.AnnAssign)
283
+ or not isinstance(assignment.value, ast.Name)
284
+ or _simple_callable_alias(self.context, assignment.value) is not binding
285
+ ):
286
+ return None
287
+ expression = assignment.value
288
+ else:
237
289
  return None
238
- binding = self.context.static_resource_provenance.runtime_binding(expression.id, expression)
239
290
  if not isinstance(binding, ast.FunctionDef | ast.AsyncFunctionDef):
240
291
  return None
292
+ if seen and binding.lineno >= expression.lineno:
293
+ return None
241
294
  if self.context.parents.get(binding) is not self.context.tree or not self._stable(self.context, binding.name):
242
295
  return None
243
- if binding.decorator_list or binding.type_params:
296
+ if binding.decorator_list:
244
297
  return None
245
298
  return _FunctionSource(self.context, binding)
246
299
 
@@ -256,7 +309,7 @@ class _OutcomeCalls:
256
309
  for node in owner.tree.body
257
310
  if isinstance(node, ast.FunctionDef | ast.AsyncFunctionDef) and node.name == symbol.name
258
311
  ]
259
- if len(functions) != 1 or functions[0].decorator_list or functions[0].type_params:
312
+ if len(functions) != 1 or functions[0].decorator_list:
260
313
  return None
261
314
  return _FunctionSource(owner, functions[0])
262
315