sarj-python-lint 1.153.0__tar.gz → 1.154.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 (352) hide show
  1. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/PKG-INFO +3 -3
  2. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/pyproject.toml +2 -2
  3. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/__main__.py +6 -9
  4. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/_file_context.py +7 -0
  5. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/_parallel.py +2 -6
  6. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/_ratchet_cli.py +4 -6
  7. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/_rule_descriptors.py +4 -4
  8. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/application_logging.py +3 -1
  9. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/json_boundary.py +3 -1
  10. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_annotation_origins.py +31 -5
  11. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_ast_index.py +2 -5
  12. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_docstrings.py +4 -6
  13. sarj_python_lint-1.154.0/src/sarj_python_lint/rules/_domain_boundaries.py +357 -0
  14. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_fixed_record.py +2 -3
  15. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_project_index.py +4 -7
  16. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/docstring_returns_restate_signature.py +2 -4
  17. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/excessive_commentary.py +95 -12
  18. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/mock_without_spec.py +2 -3
  19. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/named_record_at_boundaries.py +2 -3
  20. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_comment_cruft.py +1 -3
  21. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_custom_control_flow_exception.py +70 -4
  22. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_file_level_escape_hatch_suppression.py +2 -3
  23. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_hidden_constructor_fallback.py +2 -3
  24. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_nested_pydantic_field_validator.py +2 -3
  25. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_secret_in_log.py +2 -3
  26. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_unnecessary_docstring.py +88 -14
  27. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/opaque_parametrize_case_needs_id.py +6 -9
  28. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/over_mocked_test.py +2 -3
  29. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_exception_propagation.py +62 -22
  30. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_fstring_over_concat.py +8 -12
  31. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_library_fake.py +2 -4
  32. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_module_level_constant.py +4 -8
  33. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_nominal_id_types.py +62 -2
  34. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_str_enum.py +4 -7
  35. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/pytest_fixture_returns_bare_tuple.py +2 -3
  36. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/require_keyword_only_swap_prone_params.py +4 -6
  37. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/unused_mock_setup.py +1 -3
  38. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/.gitignore +0 -0
  39. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/LICENSE +0 -0
  40. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/README.md +0 -0
  41. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/__init__.py +0 -0
  42. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/_analysis_session.py +0 -0
  43. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/_autofix.py +0 -0
  44. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/_autofix_aliases.py +0 -0
  45. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/_autofix_annotations.py +0 -0
  46. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/_autofix_comments.py +0 -0
  47. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/_autofix_declared_contracts.py +0 -0
  48. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/_autofix_declared_tests.py +0 -0
  49. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/_autofix_docs.py +0 -0
  50. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/_autofix_enums.py +0 -0
  51. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/_autofix_exhaustiveness.py +0 -0
  52. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/_autofix_inert.py +0 -0
  53. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/_autofix_parameters.py +0 -0
  54. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/_autofix_repeated.py +0 -0
  55. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/_autofix_security.py +0 -0
  56. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/_autofix_sql_projection.py +0 -0
  57. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/_autofix_tests.py +0 -0
  58. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/_closed_sql_literal.py +0 -0
  59. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/_filesystem.py +0 -0
  60. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/_fixes.py +0 -0
  61. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/_prepared_sources.py +0 -0
  62. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/_python_target.py +0 -0
  63. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/_secret_names.py +0 -0
  64. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/_source.py +0 -0
  65. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/_version.py +0 -0
  66. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/autofix.py +0 -0
  67. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/benchmark.py +0 -0
  68. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/cast_access.py +0 -0
  69. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/interpreter_argv.py +0 -0
  70. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/py.typed +0 -0
  71. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/ratchet.py +0 -0
  72. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rule_base.py +0 -0
  73. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rule_metadata.py +0 -0
  74. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/__init__.py +0 -0
  75. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_annotation_semantics.py +0 -0
  76. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_ast_names.py +0 -0
  77. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_ast_position.py +0 -0
  78. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_async_lifecycle.py +0 -0
  79. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_binding_inventory.py +0 -0
  80. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_closed_helpers.py +0 -0
  81. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_comment_narration.py +0 -0
  82. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_comments.py +0 -0
  83. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_contract_annotation.py +0 -0
  84. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_copy_on_write.py +0 -0
  85. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_data_union_discriminator.py +0 -0
  86. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_declared_contracts.py +0 -0
  87. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_dict_key_views.py +0 -0
  88. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_exports.py +0 -0
  89. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_fastapi.py +0 -0
  90. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_fastapi_access.py +0 -0
  91. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_first_party.py +0 -0
  92. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_fixture_contracts.py +0 -0
  93. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_generic_payload.py +0 -0
  94. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_httpx_clients.py +0 -0
  95. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_imports.py +0 -0
  96. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_inert_model_annotation.py +0 -0
  97. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_inherited_contract.py +0 -0
  98. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_local_alias_fix.py +0 -0
  99. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_local_source.py +0 -0
  100. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_logging.py +0 -0
  101. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_loguru.py +0 -0
  102. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_mapping_shape_callbacks.py +0 -0
  103. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_namespace_access.py +0 -0
  104. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_native_namespace_capability.py +0 -0
  105. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_native_object_contracts.py +0 -0
  106. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_nominal_project.py +0 -0
  107. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_nullable_outcome.py +0 -0
  108. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_numeric_proof.py +0 -0
  109. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_opaque_contracts.py +0 -0
  110. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_paths.py +0 -0
  111. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_postgres.py +0 -0
  112. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_prose_budget.py +0 -0
  113. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_pydantic_field_contract.py +0 -0
  114. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_pytest.py +0 -0
  115. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_pytest_contract_parameters.py +0 -0
  116. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_registry.py +0 -0
  117. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_resolved_operation_signature.py +0 -0
  118. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_resource_provenance.py +0 -0
  119. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_route_shapes.py +0 -0
  120. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_runtime_bindings.py +0 -0
  121. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_runtime_names.py +0 -0
  122. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_runtime_registry.py +0 -0
  123. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_sdk_metadata_fields.py +0 -0
  124. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_sdk_prerequisite.py +0 -0
  125. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_service_http_callbacks.py +0 -0
  126. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_set_fields.py +0 -0
  127. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_sql.py +0 -0
  128. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_static_json_alias.py +0 -0
  129. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_store_sql.py +0 -0
  130. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_store_writes.py +0 -0
  131. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_suppression_comments.py +0 -0
  132. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_test_assertions.py +0 -0
  133. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_test_composition.py +0 -0
  134. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_test_provenance.py +0 -0
  135. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_transactional_sql.py +0 -0
  136. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_type_guard_symbols.py +0 -0
  137. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/_value_models.py +0 -0
  138. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/async_cleanup_registered_synchronously.py +0 -0
  139. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/async_executor_shutdown.py +0 -0
  140. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/async_mock_call_without_await_assertion.py +0 -0
  141. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/async_subprocess_cancellation_cleanup.py +0 -0
  142. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/cancel_owned_task_without_join.py +0 -0
  143. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/complex_postgres_query_requires_architecture_review.py +0 -0
  144. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/defect_xfail_requires_explicit_strict.py +0 -0
  145. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/delete_route_returns_no_content.py +0 -0
  146. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/docstring_args_restate_signature.py +0 -0
  147. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/duplicate_adjacent_exception_handler.py +0 -0
  148. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/duplicate_closed_pure_helper.py +0 -0
  149. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/duplicate_pytest_fixture_params.py +0 -0
  150. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/failed_probe_zero_threshold.py +0 -0
  151. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/fakes_in_shared_location.py +0 -0
  152. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/fastapi_class_router_contract.py +0 -0
  153. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/fastapi_explicit_openapi_contract.py +0 -0
  154. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/fastapi_route_declares_security.py +0 -0
  155. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/iac_source_coupled_test.py +0 -0
  156. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/invalid_pydantic_field_default.py +0 -0
  157. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/nan_hidden_by_builtin_min.py +0 -0
  158. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/negative_only_http_status_assertion.py +0 -0
  159. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_analytical_aggregation_in_postgres_store.py +0 -0
  160. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_any_mapping_types.py +0 -0
  161. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_async_client_in_constructor.py +0 -0
  162. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_async_function_cache.py +0 -0
  163. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_before_validator_input_mutation.py +0 -0
  164. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_blanket_suppression.py +0 -0
  165. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_broad_keyword_capture.py +0 -0
  166. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_conflicting_pydantic_alias_validation.py +0 -0
  167. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_conftest_test_module_import.py +0 -0
  168. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_contradictory_type_guard.py +0 -0
  169. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_copied_inherited_docstring.py +0 -0
  170. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_cors_wildcard_with_credentials.py +0 -0
  171. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_create_verb_in_post_path.py +0 -0
  172. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_database_programmability.py +0 -0
  173. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_defaulted_environment_setting.py +0 -0
  174. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_delete_statement.py +0 -0
  175. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_discarded_tagged_outcome.py +0 -0
  176. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_discarded_validation_result.py +0 -0
  177. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_dual_shape_model_field_reader.py +0 -0
  178. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_dunder_all.py +0 -0
  179. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_duplicate_dunder_all_entry.py +0 -0
  180. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_duplicate_field_validator_body.py +0 -0
  181. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_dynamic_builtins.py +0 -0
  182. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_exception_text_in_500_detail.py +0 -0
  183. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_excessive_cognitive_complexity.py +0 -0
  184. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_fastapi_on_event.py +0 -0
  185. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_first_party_private_import.py +0 -0
  186. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_fixed_sleep_before_assert.py +0 -0
  187. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_fixed_sleep_in_loop.py +0 -0
  188. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_folded_bad_request_not_found.py +0 -0
  189. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_frozen_after_validator_field_write.py +0 -0
  190. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_generic_json_parser.py +0 -0
  191. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_generic_single_export_module.py +0 -0
  192. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_hasattr.py +0 -0
  193. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_impossible_pydantic_field_bounds.py +0 -0
  194. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_injected_module_loader.py +0 -0
  195. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_input_model_mutation.py +0 -0
  196. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_interpreter_source_arguments.py +0 -0
  197. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_invalid_argument_name_suppression.py +0 -0
  198. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_invalid_pydantic_bypass.py +0 -0
  199. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_invalid_pydantic_validator_return.py +0 -0
  200. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_loguru_exc_info.py +0 -0
  201. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_loguru_printf_format.py +0 -0
  202. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_magic_arithmetic.py +0 -0
  203. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_mocked_pydantic_value_object.py +0 -0
  204. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_mutating_container_transform.py +0 -0
  205. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_mutating_input_with_result.py +0 -0
  206. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_nonlocal_statement.py +0 -0
  207. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_nullable_dependency_fallback.py +0 -0
  208. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_offset_pagination.py +0 -0
  209. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_partial_type_is.py +0 -0
  210. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_positional_psycopg_row_escape.py +0 -0
  211. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_psycopg_execution_in_loop.py +0 -0
  212. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_psycopg_execution_outside_injected_owner.py +0 -0
  213. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_random_uuid_in_sql.py +0 -0
  214. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_raw_connection_in_tests.py +0 -0
  215. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_raw_source_text_test_oracle.py +0 -0
  216. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_recording_store.py +0 -0
  217. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_redundant_attribute_unpacking.py +0 -0
  218. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_redundant_literal_description.py +0 -0
  219. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_redundant_local_alias.py +0 -0
  220. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_redundant_module_alias_exports.py +0 -0
  221. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_redundant_sql_alias.py +0 -0
  222. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_repeated_string_literal.py +0 -0
  223. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_repeated_test_body.py +0 -0
  224. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_restated_comment.py +0 -0
  225. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_select_star.py +0 -0
  226. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_service_behavior_in_settings.py +0 -0
  227. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_shallow_container_type_guard.py +0 -0
  228. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_shallow_record_type_guard.py +0 -0
  229. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_shared_mutable_default.py +0 -0
  230. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_slash_collection_root_under_prefix.py +0 -0
  231. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_string_concat_in_loop.py +0 -0
  232. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_swallowed_asyncio_cancellation.py +0 -0
  233. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_sys_path_mutation.py +0 -0
  234. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_tautological_expect.py +0 -0
  235. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_test_comments.py +0 -0
  236. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_test_method_grafting.py +0 -0
  237. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_typed_doc_sections.py +0 -0
  238. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_unique_violation_message_match.py +0 -0
  239. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_unknown_pydantic_validator_field.py +0 -0
  240. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_unobserved_task_exception.py +0 -0
  241. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_unscoped_async_client_factory.py +0 -0
  242. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_unused_copy_result.py +0 -0
  243. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_unused_underscored_keyword_parameter.py +0 -0
  244. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_unused_value_marker.py +0 -0
  245. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_vague_suppression_description.py +0 -0
  246. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_value_error_forwarder.py +0 -0
  247. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_whole_request_response_payload_in_log.py +0 -0
  248. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/no_work_verb_get_route.py +0 -0
  249. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/numeric_literal_separators.py +0 -0
  250. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/phase_label_comment.py +0 -0
  251. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_application_model_joins.py +0 -0
  252. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_autospec_for_callable_mock.py +0 -0
  253. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_bulk_upsert.py +0 -0
  254. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_class_row.py +0 -0
  255. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_collection_comprehension.py +0 -0
  256. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_configured_cloud_scope.py +0 -0
  257. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_constant_time_secret_compare.py +0 -0
  258. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_coordinated_state_owner.py +0 -0
  259. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_declarative_batch_validation.py +0 -0
  260. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_defaultdict.py +0 -0
  261. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_direct_import_module.py +0 -0
  262. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_discriminated_model_union.py +0 -0
  263. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_explicit_class_contract.py +0 -0
  264. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_explicit_value_model_construction.py +0 -0
  265. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_grouped_settings.py +0 -0
  266. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_immutable_module_constant.py +0 -0
  267. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_injected_dependency_over_monkeypatch.py +0 -0
  268. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_injected_service.py +0 -0
  269. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_match_assert_never.py +0 -0
  270. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_match_exception_dispatch.py +0 -0
  271. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_match_type_dispatch.py +0 -0
  272. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_match_value_dispatch.py +0 -0
  273. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_monkeypatch_for_process_state_in_test.py +0 -0
  274. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_monotonic_for_elapsed_time.py +0 -0
  275. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_namedtuple_over_tuple_return.py +0 -0
  276. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_native_string_check.py +0 -0
  277. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_nominal_mapping_keys.py +0 -0
  278. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_non_nullable_collection.py +0 -0
  279. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_optional_composite.py +0 -0
  280. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_or_pattern.py +0 -0
  281. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_outcome_variants.py +0 -0
  282. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_precise_object_contract.py +0 -0
  283. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_psycopg_executemany.py +0 -0
  284. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_pydantic_field_bounds.py +0 -0
  285. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_pydantic_json_value.py +0 -0
  286. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_pydantic_model_assertion.py +0 -0
  287. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_pytest_dependency_fixtures.py +0 -0
  288. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_pytest_fixture_contract.py +0 -0
  289. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_pytest_fixture_injection.py +0 -0
  290. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_regex_fullmatch.py +0 -0
  291. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_required_constructor_parameters.py +0 -0
  292. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_required_prerequisite.py +0 -0
  293. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_runtime_validation.py +0 -0
  294. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_self_documenting_constant.py +0 -0
  295. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_self_type_annotation.py +0 -0
  296. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_semantic_temporal_types.py +0 -0
  297. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_set_isdisjoint.py +0 -0
  298. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_single_parametrize_contract.py +0 -0
  299. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_single_psycopg_cursor.py +0 -0
  300. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_struct_over_namedtuple.py +0 -0
  301. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_typed_cli.py +0 -0
  302. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_typed_mapping_get.py +0 -0
  303. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_typed_settings_field.py +0 -0
  304. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_validated_uuid_comparison.py +0 -0
  305. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_walrus_awaited_none_guard.py +0 -0
  306. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_walrus_comprehension_filter.py +0 -0
  307. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_walrus_regex_match.py +0 -0
  308. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/prefer_walrus_stream_loop.py +0 -0
  309. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/production_derived_test_cases.py +0 -0
  310. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/psycopg_sql_format_field_mismatch.py +0 -0
  311. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/pytest_fixture_returns_closed_resource.py +0 -0
  312. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/redundant_class_docstring.py +0 -0
  313. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/redundant_docstring.py +0 -0
  314. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/redundant_module_docstring.py +0 -0
  315. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/redundant_test_constructor_forwarder.py +0 -0
  316. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/repeated_kwarg_heavy_call_in_test.py +0 -0
  317. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/repeated_static_call_cases.py +0 -0
  318. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/repeated_test_composition.py +0 -0
  319. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/repeated_unimplemented_test_contract.py +0 -0
  320. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/require_constrained_api_integer.py +0 -0
  321. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/require_exp_on_jwt_decode.py +0 -0
  322. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/require_explicit_contract_implementation.py +0 -0
  323. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/require_explicit_psycopg_transaction.py +0 -0
  324. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/require_explicit_service_contract.py +0 -0
  325. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/require_hidden_settings_input.py +0 -0
  326. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/require_injectable_retry_sleep.py +0 -0
  327. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/require_nodecode_for_splitting_settings_field.py +0 -0
  328. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/require_port_for_service.py +0 -0
  329. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/require_precise_factory_signature.py +0 -0
  330. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/require_public_dependency_contract.py +0 -0
  331. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/require_pydantic_for_external_json.py +0 -0
  332. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/require_pydantic_for_mapping_shape.py +0 -0
  333. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/require_pydantic_for_structured_payload.py +0 -0
  334. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/require_pydantic_ordinal_lower_bound.py +0 -0
  335. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/restated_test_docstring.py +0 -0
  336. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/service_singleton_delegates_to_bulk.py +0 -0
  337. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/shared_mutable_pydantic_factory.py +0 -0
  338. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/stepdown.py +0 -0
  339. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/store_field_update_reuses_upsert.py +0 -0
  340. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/store_get_delegates_to_bulk_read.py +0 -0
  341. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/store_insert_requires_explicit_conflict_policy.py +0 -0
  342. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/store_insert_requires_on_conflict.py +0 -0
  343. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/store_mutation_command_fanout.py +0 -0
  344. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/subprocess_kill_without_reap.py +0 -0
  345. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/test_without_explicit_oracle.py +0 -0
  346. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/timestamp_order_requires_tiebreaker.py +0 -0
  347. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/trailing_value_narration.py +0 -0
  348. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/typed_error_reasons.py +0 -0
  349. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/uncontrolled_randomness_in_test.py +0 -0
  350. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/rules/unused_test_factory_option.py +0 -0
  351. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.0}/src/sarj_python_lint/sql_literals.py +0 -0
  352. {sarj_python_lint-1.153.0 → sarj_python_lint-1.154.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.153.0
3
+ Version: 1.154.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/
@@ -19,8 +19,8 @@ Classifier: Topic :: Software Development :: Quality Assurance
19
19
  Requires-Python: >=3.14
20
20
  Requires-Dist: packaging==26.3
21
21
  Requires-Dist: ruff>=0.17.2
22
- Requires-Dist: sarj-rule-contracts==0.8.1
23
- Requires-Dist: sarj-sql-lint==0.50.2
22
+ Requires-Dist: sarj-rule-contracts==0.8.2
23
+ Requires-Dist: sarj-sql-lint==0.50.3
24
24
  Requires-Dist: sqlglot==30.31.0
25
25
  Requires-Dist: typer==0.27.3
26
26
  Description-Content-Type: text/markdown
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "sarj-python-lint"
3
- version = "1.153.0"
3
+ version = "1.154.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" }]
@@ -15,7 +15,7 @@ classifiers = [
15
15
  "Programming Language :: Python :: 3.14",
16
16
  "Topic :: Software Development :: Quality Assurance",
17
17
  ]
18
- dependencies = ["sarj-rule-contracts==0.8.1", "sarj-sql-lint==0.50.2", "packaging==26.3", "ruff>=0.17.2", "sqlglot==30.31.0", "typer==0.27.3"]
18
+ dependencies = ["sarj-rule-contracts==0.8.2", "sarj-sql-lint==0.50.3", "packaging==26.3", "ruff>=0.17.2", "sqlglot==30.31.0", "typer==0.27.3"]
19
19
 
20
20
  [project.scripts]
21
21
  sarj-python-lint = "sarj_python_lint.__main__:main"
@@ -309,19 +309,16 @@ _DIAGNOSTIC_PRECEDENCE = MappingProxyType(
309
309
  "SARJ089": frozenset({"SARJ551"}),
310
310
  "SARJ092": frozenset({"SARJ086", "SARJ087", "SARJ420"}),
311
311
  "SARJ093": frozenset({"SARJ034"}),
312
- # Visible FastAPI operations have a route-aware contract diagnostic.
313
- # Keep the annotation diagnostics when SARJ094 is absent, including
314
- # when a concrete response_model makes the route contract complete.
312
+ # Visible FastAPI operations have a route-aware contract diagnostic. Keep the annotation diagnostics when
313
+ # SARJ094 is absent, including when a concrete response_model makes the route contract complete.
315
314
  "SARJ094": frozenset({"SARJ008", "SARJ447", "SARJ568"}),
316
315
  "SARJ095": frozenset({"SARJ468"}),
317
316
  "SARJ099": frozenset({"SARJ420"}),
318
- # A proven external or nested request boundary already requires schema
319
- # validation at this field read. Retain standalone shape advice when
320
- # that more specific rule is unselected or locally suppressed.
317
+ # A proven external or nested request boundary already requires schema validation at this field read. Retain
318
+ # standalone shape advice when that more specific rule is unselected or locally suppressed.
321
319
  "SARJ411": frozenset({"SARJ521", "SARJ535"}),
322
- # Any-valued mappings are the stronger correctness failure. SARJ008
323
- # still owns every fixed dictionary return when selected alone, while
324
- # an all-rules run emits one actionable diagnostic for this overlap.
320
+ # Any-valued mappings are the stronger correctness failure. SARJ008 still owns every fixed dictionary return
321
+ # when selected alone, while an all-rules run emits one actionable diagnostic for this overlap.
325
322
  "SARJ447": frozenset({"SARJ008"}),
326
323
  "SARJ450": frozenset({"SARJ521", "SARJ535"}),
327
324
  "SARJ521": frozenset({"SARJ535"}),
@@ -22,6 +22,7 @@ if TYPE_CHECKING:
22
22
  from pathlib import Path
23
23
 
24
24
  from sarj_python_lint.rules._copy_on_write import CopyOnWriteAnalysis
25
+ from sarj_python_lint.rules._domain_boundaries import DomainBoundaries
25
26
  from sarj_python_lint.rules._resource_provenance import ResourceProvenance
26
27
  from sarj_python_lint.rules._store_sql import StoreQuery
27
28
  from sarj_python_lint.rules._test_provenance import TestProvenance
@@ -119,6 +120,12 @@ class PythonFileContext:
119
120
  def annotation_semantics(self) -> AnnotationSemantics:
120
121
  return AnnotationSemantics.from_imports(self._valid_tree(), self.module_imports)
121
122
 
123
+ @cached_property
124
+ def domain_boundaries(self) -> DomainBoundaries:
125
+ from sarj_python_lint.rules._domain_boundaries import DomainBoundaries # ruff: ignore[import-outside-top-level] -- share scoped domain facts without a context import cycle.
126
+
127
+ return DomainBoundaries(self)
128
+
122
129
  @cached_property
123
130
  def dynamic_namespace(self) -> bool:
124
131
  return dynamic_namespace_access(self.nodes(ast.AST), self.imports, self.parents)
@@ -140,12 +140,8 @@ def check_parallel(
140
140
  source_inputs: PreparedSourceInputs | None = None,
141
141
  frozen: FrozenResolutions | None = None,
142
142
  ) -> list[Diagnostic] | None:
143
- # The untouched parent rules/session remain the serial fallback. Workers
144
- # receive the same complete project snapshot and selected source strings.
145
- # Select the untouched serial session before a large batch can require a
146
- # complete parallel pass followed by the same quota-sensitive serial replay.
147
- # A frozen resolution cache has already spent that quota, so its remaining
148
- # files only need the module quota check below.
143
+ # Workers share the complete immutable snapshot. Choose serial fallback before replay exhausts resolution quota;
144
+ # frozen caches need only module-quota checks.
149
145
  if frozen is None and len(loaded) >= LOCAL_SOURCE_CACHE_LIMIT:
150
146
  return None
151
147
  source_snapshot = None if source_inputs is None else source_inputs.source_snapshot()
@@ -102,9 +102,8 @@ def _run(args: _Options) -> int:
102
102
  return 2
103
103
 
104
104
  if args.update:
105
- # A first seed has nothing to raise: every ceiling is 0 only because no
106
- # baseline exists yet, and refusing that would make the tool unusable
107
- # on the run that adopts it.
105
+ # A first seed has nothing to raise: every ceiling is 0 only because no baseline exists yet, and refusing that
106
+ # would make the tool unusable on the run that adopts it.
108
107
  return _update(
109
108
  measurement,
110
109
  baseline,
@@ -154,9 +153,8 @@ def _ruff_selector_aliases() -> dict[str, str]:
154
153
  code = raw_item.get("code")
155
154
  name = raw_item.get("name")
156
155
  if code is None and isinstance(name, str):
157
- # Ruff accepts the name as the stable selector until it allocates
158
- # a code, so preserve that suppression identity rather than
159
- # rejecting a valid Ruff directive.
156
+ # Ruff accepts the name as the stable selector until it allocates a code, so preserve that suppression
157
+ # identity rather than rejecting a valid Ruff directive.
160
158
  canonical = name.lower()
161
159
  aliases[canonical] = canonical
162
160
  continue
@@ -13,7 +13,7 @@ DESCRIPTORS: tuple[RuleDescriptor, ...] = (
13
13
  module="sarj_python_lint.rules.prefer_exception_propagation",
14
14
  class_name="PreferExceptionPropagation",
15
15
  code="SARJ585",
16
- description="Prefer propagating exceptions over message-only generic wrappers.",
16
+ description="Propagate exceptions instead of replacing them with message-only generic errors.",
17
17
  aliases=(),
18
18
  enabled_by_default=True,
19
19
  ),
@@ -337,7 +337,7 @@ DESCRIPTORS: tuple[RuleDescriptor, ...] = (
337
337
  module="sarj_python_lint.rules.no_custom_control_flow_exception",
338
338
  class_name="NoCustomControlFlowException",
339
339
  code="SARJ542",
340
- description="Return coded typed outcomes for expected domain failures instead of exception-only contracts.",
340
+ description="Enforce domain invariants at construction; represent expected rejection in typed outcomes.",
341
341
  aliases=(),
342
342
  enabled_by_default=True,
343
343
  ),
@@ -922,7 +922,7 @@ DESCRIPTORS: tuple[RuleDescriptor, ...] = (
922
922
  module="sarj_python_lint.rules.excessive_commentary",
923
923
  class_name="ExcessiveCommentary",
924
924
  code="SARJ434",
925
- description="Delete comment paragraphs that exactly repeat the following ordered action names.",
925
+ description="Keep necessary comments within two lines and 40 words; delete redundant narration.",
926
926
  aliases=(),
927
927
  enabled_by_default=True,
928
928
  ),
@@ -1930,7 +1930,7 @@ DESCRIPTORS: tuple[RuleDescriptor, ...] = (
1930
1930
  module="sarj_python_lint.rules.prefer_nominal_id_types",
1931
1931
  class_name="PreferNominalIdTypes",
1932
1932
  code="SARJ093",
1933
- description="Python boundaries should distinguish swappable identifier roles with nominal types.",
1933
+ description="Preserve established domain types and distinguish swappable identifier roles.",
1934
1934
  aliases=(),
1935
1935
  enabled_by_default=True,
1936
1936
  ),
@@ -65,7 +65,9 @@ def application_logging_uses(path: Path, source: str, *, root: Path) -> tuple[Ap
65
65
  raise ValueError(msg)
66
66
  try:
67
67
  relative = path.relative_to(root)
68
- except ValueError as exc:
68
+ except (
69
+ ValueError
70
+ ) as exc: # sarj-noqa: SARJ585 -- Containment errors must not expose absolute private repository paths.
69
71
  msg = "logging policy source escapes repository root"
70
72
  raise ValueError(msg) from exc
71
73
  if relative.suffix not in {".py", ".pyi"} or len(source) > _MAX_SOURCE_CHARACTERS:
@@ -5,7 +5,9 @@ from typing import TypeIs
5
5
  def parse_json(text: str) -> object:
6
6
  try:
7
7
  return json.loads(text, object_pairs_hook=_unique_pairs, parse_constant=_invalid_constant) # pyright: ignore[reportAny] -- untyped stdlib parser boundary.
8
- except RecursionError as error:
8
+ except (
9
+ RecursionError
10
+ ) as error: # sarj-noqa: SARJ585 -- Bounded JSON decoding exposes depth rejection through ValueError.
9
11
  message = "JSON nesting exceeds the supported depth"
10
12
  raise ValueError(message) from error
11
13
 
@@ -33,7 +33,7 @@ class AnnotationOrigins:
33
33
  value = self.context.annotation_semantics.aliases.get(node.id)
34
34
  if value is None:
35
35
  return None
36
- binding = self.provenance.binding(node.id, at)
36
+ binding = self.binding(node.id, at)
37
37
  if not isinstance(binding, ast.Name):
38
38
  return None
39
39
  parent = self.context.parents.get(binding)
@@ -75,19 +75,45 @@ class AnnotationOrigins:
75
75
  or type_parameter_shadow(root.id, at, self.context)
76
76
  ):
77
77
  return None
78
- binding = self.provenance.binding(root.id, at)
78
+ binding = self.binding(root.id, at)
79
79
  parent = self.context.parents.get(binding) if binding is not None else None
80
80
  index = self.imports.get(parent) if isinstance(parent, ast.Import | ast.ImportFrom) else None
81
81
  return index.resolved_qualified_name(node) if index is not None else None
82
82
 
83
83
  def builtin(self, node: ast.expr, name: str, at: ast.AST) -> bool:
84
- return (
84
+ if not (
85
85
  self.provenance.builtin_namespace_untouched
86
86
  and isinstance(node, ast.Name)
87
87
  and node.id == name
88
88
  and not type_parameter_shadow(name, at, self.context)
89
- and self.provenance.binding(name, at) is None
90
- )
89
+ and self.binding(name, at) is None
90
+ ):
91
+ return False
92
+ scope = self.provenance.scope(self._lookup_at(at))
93
+ while scope is not None:
94
+ if name in self.provenance.bindings.get(scope, {}):
95
+ return False
96
+ scope = self.provenance.scope(scope)
97
+ return True
98
+
99
+ def binding(self, name: str, at: ast.AST) -> ast.AST | None:
100
+ if type_parameter_shadow(name, at, self.context):
101
+ return None
102
+ return self.provenance.binding(name, self._lookup_at(at))
103
+
104
+ def _lookup_at(self, at: ast.AST) -> ast.AST:
105
+ current = at
106
+ while (parent := self.context.parents.get(current)) is not None:
107
+ if isinstance(parent, ast.Lambda | ast.ListComp | ast.SetComp | ast.DictComp | ast.GeneratorExp):
108
+ return at
109
+ if isinstance(parent, ast.arg) and current is parent.annotation:
110
+ arguments = self.context.parents.get(parent)
111
+ function = self.context.parents.get(arguments) if arguments is not None else None
112
+ return function if isinstance(function, ast.FunctionDef | ast.AsyncFunctionDef) else at
113
+ if isinstance(parent, ast.FunctionDef | ast.AsyncFunctionDef) and current is parent.returns:
114
+ return parent
115
+ current = parent
116
+ return at
91
117
 
92
118
 
93
119
  def type_parameter_shadow(name: str, at: ast.AST, context: PythonFileContext) -> bool:
@@ -105,11 +105,8 @@ def walk(node: ast.AST, *, index: NodeIndex | None = None) -> Iterator[ast.AST]:
105
105
  yield current
106
106
 
107
107
 
108
- # Parsed modules are shared by the file context, the project index and every rule.
109
- # Their owner (a project `SourceUnit`) holds a `SharedModule`, which indexes the
110
- # module once, on first use. The registry is weak, so the index lives exactly as
111
- # long as its owner. Unowned (usually synthetic) modules are walked directly:
112
- # indexing costs more than one walk.
108
+ # SourceUnit owns a weakly registered SharedModule, indexing its immutable AST once. Unowned synthetic modules use
109
+ # direct walks.
113
110
  @final
114
111
  class SharedModule:
115
112
  def __init__(self, tree: ast.Module) -> None:
@@ -174,9 +174,8 @@ PROMPT_DECORATOR_MARKERS = frozenset(
174
174
  }
175
175
  )
176
176
 
177
- # Class docstrings consumed as schema descriptions rather than reader-only
178
- # prose. Final dotted names are intentional: imports can alias packages, while
179
- # the runtime base/decorator still has one of these stable framework surfaces.
177
+ # Class docstrings consumed as schema descriptions rather than reader-only prose. Final dotted names are intentional:
178
+ # imports can alias packages, while the runtime base/decorator still has one of these stable framework surfaces.
180
179
  SCHEMA_BASE_NAMES = frozenset(
181
180
  {
182
181
  "BaseModel",
@@ -195,9 +194,8 @@ SCHEMA_BASE_NAMES = frozenset(
195
194
 
196
195
  SCHEMA_DECORATOR_MARKERS = frozenset({"graphene", "msgspec", "pydantic", "strawberry"})
197
196
 
198
- # Python/framework constructs that visibly publish or copy the decorated
199
- # function's docstring. Generic decorators are not exempt merely because they
200
- # exist.
197
+ # Python/framework constructs that visibly publish or copy the decorated function's docstring. Generic decorators are
198
+ # not exempt merely because they exist.
201
199
  FRAMEWORK_DOCSTRING_DECORATOR_MARKERS = PROMPT_DECORATOR_MARKERS | frozenset(
202
200
  {"cached_property", "fixture", "property", "wraps"}
203
201
  )
@@ -0,0 +1,357 @@
1
+ from __future__ import annotations
2
+
3
+ import ast
4
+ from dataclasses import dataclass
5
+ from typing import TYPE_CHECKING
6
+
7
+ from sarj_python_lint.rules._annotation_origins import AnnotationOrigins, ResolvedAnnotation
8
+
9
+
10
+ if TYPE_CHECKING:
11
+ from sarj_python_lint._file_context import PythonFileContext
12
+
13
+
14
+ _MAX_ALIAS_DEPTH = 32
15
+ _NEWTYPE_ARGUMENTS = 2
16
+ _TYPING = frozenset({"typing", "typing_extensions"})
17
+ _PRIMITIVES = frozenset({"str", "int", "float", "bool", "bytes"})
18
+ _ENUMS = frozenset({"enum.Enum", "enum.StrEnum", "enum.IntEnum"})
19
+ _WRAPPERS = frozenset(f"{module}.{name}" for module in _TYPING for name in ("Optional", "Annotated"))
20
+ _LITERALS = frozenset(f"{module}.Literal" for module in _TYPING)
21
+ _NEW_TYPES = frozenset(f"{module}.NewType" for module in _TYPING)
22
+ type Function = ast.FunctionDef | ast.AsyncFunctionDef
23
+
24
+
25
+ @dataclass(frozen=True, slots=True)
26
+ class DomainType:
27
+ name: str
28
+ carrier: str
29
+ declaration: ast.AST
30
+
31
+
32
+ class DomainBoundaries:
33
+ def __init__(self, context: PythonFileContext) -> None:
34
+ self.context = context
35
+ self.origins = AnnotationOrigins(context)
36
+ self.provenance = self.origins.provenance
37
+ self.arguments = {
38
+ argument: function
39
+ for function in context.nodes(ast.FunctionDef, ast.AsyncFunctionDef)
40
+ for argument in (*function.args.posonlyargs, *function.args.args, *function.args.kwonlyargs)
41
+ }
42
+ self.required: dict[ast.arg, set[DomainType]] = {}
43
+ if any(marker in context.symbol_source for marker in ("Literal", "NewType", "Enum", "BaseModel", "RootModel")):
44
+ self._collect_relations()
45
+
46
+ def primitive(self, annotation: ast.expr | None, *, depth: int = 0) -> str | None:
47
+ member = self._annotation_member(annotation)
48
+ if member is None or depth >= _MAX_ALIAS_DEPTH:
49
+ return None
50
+ qualified = self.origins.qualified(member.expression, member.at)
51
+ for name in _PRIMITIVES:
52
+ if self.origins.builtin(member.expression, name, member.at) or qualified == f"builtins.{name}":
53
+ return name
54
+ if not isinstance(member.expression, ast.Name):
55
+ return None
56
+ value = self._assignment_value(self.origins.binding(member.expression.id, member.at))
57
+ return self.primitive(value, depth=depth + 1) if value is not None else None
58
+
59
+ def domain(self, annotation: ast.expr | None, *, depth: int = 0) -> DomainType | None:
60
+ member = self._annotation_member(annotation)
61
+ if member is None or depth >= _MAX_ALIAS_DEPTH or not isinstance(member.expression, ast.Name):
62
+ return None
63
+ if self.origins.shadowed(member.expression.id, member.at):
64
+ return None
65
+ binding = self.origins.binding(member.expression.id, member.at)
66
+ if isinstance(binding, ast.ClassDef):
67
+ carrier = self._enum_carrier(binding)
68
+ return DomainType(binding.name, carrier, binding) if carrier is not None else None
69
+ value = self._assignment_value(binding)
70
+ if value is None or not isinstance(binding, ast.Name):
71
+ return None
72
+ match value:
73
+ case ast.Subscript() if self.origins.qualified(value.value, value) in _LITERALS:
74
+ carrier = _literal_carrier(value)
75
+ case ast.Call() if self.origins.qualified(value.func, value) in _NEW_TYPES:
76
+ carrier = self._newtype_carrier(value, binding.id)
77
+ case _:
78
+ return self.domain(value, depth=depth + 1)
79
+ return DomainType(binding.id, carrier, binding) if carrier is not None else None
80
+
81
+ def expression_domain(self, expression: ast.expr) -> DomainType | None:
82
+ return self.domain(self._value_annotation(expression))
83
+
84
+ def has_domain_guard(self, expression: ast.expr) -> bool:
85
+ return any(
86
+ self.expression_domain(node) is not None
87
+ or (isinstance(node, ast.Attribute) and self._validated_attribute(node))
88
+ for node in ast.walk(expression)
89
+ if isinstance(node, ast.Name | ast.Attribute)
90
+ )
91
+
92
+ def _annotation_member(self, annotation: ast.expr | None) -> ResolvedAnnotation | None:
93
+ if annotation is None:
94
+ return None
95
+ current = annotation
96
+ for _ in range(_MAX_ALIAS_DEPTH):
97
+ parsed = self.context.annotation_semantics.parse(current)
98
+ match parsed:
99
+ case (
100
+ ast.BinOp(left=ast.Constant(value=None), op=ast.BitOr(), right=other)
101
+ | ast.BinOp(left=other, op=ast.BitOr(), right=ast.Constant(value=None))
102
+ ):
103
+ current = other
104
+ case ast.Subscript(value=wrapper, slice=inner) if (
105
+ self.origins.qualified(wrapper, annotation) in _WRAPPERS
106
+ ):
107
+ if isinstance(inner, ast.Tuple):
108
+ if not inner.elts:
109
+ return None
110
+ current = inner.elts[0]
111
+ else:
112
+ current = inner
113
+ case None:
114
+ return None
115
+ case _:
116
+ return ResolvedAnnotation(parsed, annotation)
117
+ return None
118
+
119
+ def _assignment_value(self, binding: ast.AST | None) -> ast.expr | None:
120
+ if not isinstance(binding, ast.Name):
121
+ return None
122
+ parent = self.context.parents.get(binding)
123
+ match parent:
124
+ case ast.Assign(targets=[target], value=value) if target is binding:
125
+ return value
126
+ case ast.AnnAssign(value=value) | ast.TypeAlias(value=value, type_params=[]):
127
+ return value
128
+ case _:
129
+ return None
130
+
131
+ def _enum_carrier(self, declaration: ast.ClassDef) -> str | None:
132
+ if not any(self.origins.qualified(base, declaration) in _ENUMS for base in declaration.bases):
133
+ return None
134
+ members = [
135
+ statement.value
136
+ for statement in declaration.body
137
+ if isinstance(statement, ast.Assign)
138
+ and len(statement.targets) == 1
139
+ and isinstance(statement.targets[0], ast.Name)
140
+ and not statement.targets[0].id.startswith("_")
141
+ ]
142
+ return _constant_carrier(members)
143
+
144
+ def _newtype_carrier(self, call: ast.Call, name: str) -> str | None:
145
+ if len(call.args) != _NEWTYPE_ARGUMENTS or call.keywords:
146
+ return None
147
+ if not isinstance(call.args[0], ast.Constant) or call.args[0].value != name:
148
+ return None
149
+ return self.primitive(call.args[1])
150
+
151
+ def _value_annotation(self, value: ast.expr) -> ast.expr | None:
152
+ match value:
153
+ case ast.Name():
154
+ binding = self.origins.binding(value.id, value)
155
+ if isinstance(binding, ast.arg):
156
+ return binding.annotation
157
+ parent = self.context.parents.get(binding) if binding is not None else None
158
+ return parent.annotation if isinstance(parent, ast.AnnAssign) else None
159
+ case ast.Attribute():
160
+ owner = self._record_class(value.value)
161
+ if owner is None:
162
+ return None
163
+ fields = [
164
+ item.annotation
165
+ for item in owner.body
166
+ if isinstance(item, ast.AnnAssign)
167
+ and isinstance(item.target, ast.Name)
168
+ and item.target.id == value.attr
169
+ ]
170
+ return fields[0] if len(fields) == 1 else None
171
+ case _:
172
+ return None
173
+
174
+ def _record_class(self, value: ast.expr) -> ast.ClassDef | None:
175
+ annotation = self._annotation_member(self._value_annotation(value))
176
+ if annotation is None or not isinstance(annotation.expression, ast.Name):
177
+ return None
178
+ owner = self.origins.binding(annotation.expression.id, annotation.at)
179
+ return owner if isinstance(owner, ast.ClassDef) else None
180
+
181
+ def _validated_attribute(self, expression: ast.Attribute) -> bool:
182
+ if expression.attr.startswith("_"):
183
+ return False
184
+ owner = self._record_class(expression.value) or self._method_class(expression.value)
185
+ seen: set[ast.ClassDef] = set()
186
+ field_proven: bool | None = None
187
+ while owner is not None and owner not in seen:
188
+ seen.add(owner)
189
+ if field_proven is None:
190
+ field_proven = self._model_field(owner, expression.attr)
191
+ bases = {
192
+ self.origins.qualified(base.value if isinstance(base, ast.Subscript) else base, owner)
193
+ for base in owner.bases
194
+ }
195
+ if not bases.isdisjoint({"pydantic.BaseModel", "pydantic.RootModel", "pydantic.main.BaseModel"}):
196
+ return field_proven or ("pydantic.RootModel" in bases and expression.attr == "root")
197
+ inherited = (
198
+ self.origins.binding(owner.bases[0].id, owner)
199
+ if len(owner.bases) == 1 and isinstance(owner.bases[0], ast.Name)
200
+ else None
201
+ )
202
+ owner = inherited if isinstance(inherited, ast.ClassDef) else None
203
+ return False
204
+
205
+ def _model_field(self, owner: ast.ClassDef, name: str) -> bool | None:
206
+ fields = [
207
+ statement.annotation
208
+ for statement in owner.body
209
+ if isinstance(statement, ast.AnnAssign)
210
+ and isinstance(statement.target, ast.Name)
211
+ and statement.target.id == name
212
+ ]
213
+ if not fields:
214
+ return None
215
+ if len(fields) != 1:
216
+ return False
217
+ annotation = self._annotation_member(fields[0])
218
+ if annotation is None:
219
+ return False
220
+ return not (
221
+ isinstance(annotation.expression, ast.Subscript)
222
+ and self.origins.qualified(annotation.expression.value, annotation.at)
223
+ in {"typing.ClassVar", "typing_extensions.ClassVar"}
224
+ )
225
+
226
+ def _method_class(self, value: ast.expr) -> ast.ClassDef | None:
227
+ if not isinstance(value, ast.Name):
228
+ return None
229
+ argument = self.origins.binding(value.id, value)
230
+ function = self.arguments.get(argument) if isinstance(argument, ast.arg) else None
231
+ if function is None or function.decorator_list:
232
+ return None
233
+ positional = [*function.args.posonlyargs, *function.args.args]
234
+ if not positional or positional[0] is not argument:
235
+ return None
236
+ owner = self.context.parents.get(function)
237
+ return owner if isinstance(owner, ast.ClassDef) else None
238
+
239
+ def _collect_relations(self) -> None:
240
+ if self.provenance.wildcard or self.provenance.dynamic_namespace:
241
+ return
242
+ self._collect_guards()
243
+ edges = self._call_edges()
244
+ pending = list(self.required)
245
+ while pending:
246
+ target = pending.pop()
247
+ for source in edges.get(target, ()):
248
+ domains = {
249
+ domain for domain in self.required[target] if self.primitive(source.annotation) == domain.carrier
250
+ }
251
+ previous = self.required.get(source, set())
252
+ if domains - previous:
253
+ self.required[source] = previous | domains
254
+ pending.append(source)
255
+
256
+ def _collect_guards(self) -> None:
257
+ for comparison in self.context.nodes(ast.Compare):
258
+ function = self._function(comparison)
259
+ if function is None or not self._rejecting_guard(comparison):
260
+ continue
261
+ for left, right, operator in zip(
262
+ [comparison.left, *comparison.comparators[:-1]], comparison.comparators, comparison.ops, strict=True
263
+ ):
264
+ if isinstance(operator, ast.Eq | ast.NotEq):
265
+ self._relate_guard(left, right, function)
266
+ self._relate_guard(right, left, function)
267
+
268
+ def _rejecting_guard(self, comparison: ast.Compare) -> bool:
269
+ guard = self.context.parents.get(comparison)
270
+ while isinstance(guard, ast.BoolOp | ast.UnaryOp):
271
+ guard = self.context.parents.get(guard)
272
+ return isinstance(guard, ast.If) and any(
273
+ isinstance(statement, ast.Raise) for statement in [*guard.body, *guard.orelse]
274
+ )
275
+
276
+ def _relate_guard(self, raw: ast.expr, typed: ast.expr, function: Function) -> None:
277
+ if not isinstance(raw, ast.Name) or not isinstance(typed, ast.Attribute) or raw.id != typed.attr:
278
+ return
279
+ argument = self._raw_argument(raw, function)
280
+ domain = self.expression_domain(typed)
281
+ if argument is not None and domain is not None and self.primitive(argument.annotation) == domain.carrier:
282
+ self.required.setdefault(argument, set()).add(domain)
283
+
284
+ def _call_edges(self) -> dict[ast.arg, set[ast.arg]]:
285
+ edges: dict[ast.arg, set[ast.arg]] = {}
286
+ for call in self.context.nodes(ast.Call):
287
+ function = self._function(call)
288
+ if function is None:
289
+ continue
290
+ for parameter, expression in self._call_arguments(call).items():
291
+ raw = self._raw_argument(expression, function)
292
+ if raw is None:
293
+ continue
294
+ domain = self.domain(parameter.annotation)
295
+ if domain is not None and self.primitive(raw.annotation) == domain.carrier:
296
+ self.required.setdefault(raw, set()).add(domain)
297
+ edges.setdefault(parameter, set()).add(raw)
298
+ return edges
299
+
300
+ def _call_arguments(self, call: ast.Call) -> dict[ast.arg, ast.expr]:
301
+ if not isinstance(call.func, ast.Name):
302
+ return {}
303
+ callee = self.origins.binding(call.func.id, call)
304
+ if not isinstance(callee, ast.FunctionDef | ast.AsyncFunctionDef) or callee.decorator_list:
305
+ return {}
306
+ if any(isinstance(argument, ast.Starred) for argument in call.args) or any(
307
+ keyword.arg is None for keyword in call.keywords
308
+ ):
309
+ return {}
310
+ positional = [*callee.args.posonlyargs, *callee.args.args]
311
+ if len(call.args) > len(positional):
312
+ return {}
313
+ result = dict(zip(positional, call.args, strict=False))
314
+ by_name = {parameter.arg: parameter for parameter in [*positional, *callee.args.kwonlyargs]}
315
+ for keyword in call.keywords:
316
+ parameter = by_name.get(keyword.arg) if keyword.arg is not None else None
317
+ if parameter is None or parameter in result or parameter in callee.args.posonlyargs:
318
+ return {}
319
+ result[parameter] = keyword.value
320
+ return result
321
+
322
+ def _raw_argument(self, expression: ast.expr, function: Function) -> ast.arg | None:
323
+ if not isinstance(expression, ast.Name) or self.domain(function.returns) is not None:
324
+ return None
325
+ binding = self.origins.binding(expression.id, expression)
326
+ return (
327
+ binding
328
+ if isinstance(binding, ast.arg)
329
+ and self.arguments.get(binding) is function
330
+ and self.primitive(binding.annotation) is not None
331
+ else None
332
+ )
333
+
334
+ def _function(self, node: ast.AST) -> Function | None:
335
+ current = self.context.parents.get(node)
336
+ while current is not None:
337
+ match current:
338
+ case ast.FunctionDef() | ast.AsyncFunctionDef():
339
+ return current
340
+ case ast.Lambda():
341
+ return None
342
+ case _:
343
+ current = self.context.parents.get(current)
344
+ return None
345
+
346
+
347
+ def _literal_carrier(value: ast.Subscript) -> str | None:
348
+ members = value.slice.elts if isinstance(value.slice, ast.Tuple) else [value.slice]
349
+ return _constant_carrier(members)
350
+
351
+
352
+ def _constant_carrier(members: list[ast.expr]) -> str | None:
353
+ values = [member.value for member in members if isinstance(member, ast.Constant)]
354
+ if len(values) != len(members) or not values:
355
+ return None
356
+ carriers = {type(value).__name__ for value in values}
357
+ return next(iter(carriers)) if len(carriers) == 1 and carriers <= _PRIMITIVES else None
@@ -263,9 +263,8 @@ class _Analyzer:
263
263
  final_flow = self.block(finalbody, flow.active)
264
264
  flow.active = final_flow.active
265
265
  flow.returned.extend(final_flow.returned)
266
- # A return suspends before ``finally`` runs. Return outcomes do not
267
- # retain their state, so abstain instead of claiming that a record
268
- # returned from the try/handler cannot be mutated or replaced.
266
+ # A return suspends before ``finally`` runs. Return outcomes do not retain their state, so abstain instead of
267
+ # claiming that a record returned from the try/handler cannot be mutated or replaced.
269
268
  if has_suspended_return:
270
269
  flow.returned.append(_ReturnKind.UNKNOWN)
271
270