sarj-python-lint 1.133.0__tar.gz → 1.135.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 (338) hide show
  1. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/PKG-INFO +1 -1
  2. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/pyproject.toml +1 -1
  3. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/__main__.py +47 -4
  4. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/_autofix.py +12 -4
  5. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/_rule_descriptors.py +64 -1
  6. sarj_python_lint-1.135.0/src/sarj_python_lint/rules/_nullable_outcome.py +216 -0
  7. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_registry.py +14 -0
  8. sarj_python_lint-1.135.0/src/sarj_python_lint/rules/_value_models.py +86 -0
  9. sarj_python_lint-1.135.0/src/sarj_python_lint/rules/no_magic_arithmetic.py +157 -0
  10. sarj_python_lint-1.135.0/src/sarj_python_lint/rules/numeric_literal_separators.py +138 -0
  11. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/prefer_discriminated_model_union.py +1 -0
  12. sarj_python_lint-1.135.0/src/sarj_python_lint/rules/prefer_explicit_class_contract.py +247 -0
  13. sarj_python_lint-1.135.0/src/sarj_python_lint/rules/prefer_explicit_value_model_construction.py +151 -0
  14. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/prefer_nominal_id_types.py +40 -4
  15. sarj_python_lint-1.135.0/src/sarj_python_lint/rules/prefer_nominal_mapping_keys.py +202 -0
  16. sarj_python_lint-1.135.0/src/sarj_python_lint/rules/prefer_outcome_variants.py +79 -0
  17. sarj_python_lint-1.135.0/src/sarj_python_lint/rules/prefer_semantic_temporal_types.py +192 -0
  18. sarj_python_lint-1.135.0/src/sarj_python_lint/rules/prefer_typed_settings_field.py +518 -0
  19. sarj_python_lint-1.133.0/src/sarj_python_lint/rules/prefer_typed_settings_field.py +0 -205
  20. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/.gitignore +0 -0
  21. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/LICENSE +0 -0
  22. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/README.md +0 -0
  23. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/__init__.py +0 -0
  24. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/_analysis_session.py +0 -0
  25. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/_autofix_aliases.py +0 -0
  26. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/_autofix_annotations.py +0 -0
  27. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/_autofix_comments.py +0 -0
  28. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/_autofix_declared_contracts.py +0 -0
  29. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/_autofix_declared_tests.py +0 -0
  30. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/_autofix_docs.py +0 -0
  31. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/_autofix_enums.py +0 -0
  32. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/_autofix_exhaustiveness.py +0 -0
  33. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/_autofix_inert.py +0 -0
  34. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/_autofix_parameters.py +0 -0
  35. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/_autofix_repeated.py +0 -0
  36. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/_autofix_security.py +0 -0
  37. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/_autofix_sql_projection.py +0 -0
  38. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/_autofix_tests.py +0 -0
  39. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/_closed_sql_literal.py +0 -0
  40. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/_file_context.py +0 -0
  41. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/_filesystem.py +0 -0
  42. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/_fixes.py +0 -0
  43. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/_parallel.py +0 -0
  44. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/_prepared_sources.py +0 -0
  45. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/_python_target.py +0 -0
  46. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/_ratchet_cli.py +0 -0
  47. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/_secret_names.py +0 -0
  48. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/_source.py +0 -0
  49. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/_version.py +0 -0
  50. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/application_logging.py +0 -0
  51. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/autofix.py +0 -0
  52. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/benchmark.py +0 -0
  53. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/cast_access.py +0 -0
  54. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/interpreter_argv.py +0 -0
  55. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/json_boundary.py +0 -0
  56. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/py.typed +0 -0
  57. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/ratchet.py +0 -0
  58. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rule_base.py +0 -0
  59. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rule_metadata.py +0 -0
  60. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/__init__.py +0 -0
  61. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_annotation_origins.py +0 -0
  62. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_annotation_semantics.py +0 -0
  63. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_ast_index.py +0 -0
  64. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_ast_names.py +0 -0
  65. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_ast_position.py +0 -0
  66. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_async_lifecycle.py +0 -0
  67. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_binding_inventory.py +0 -0
  68. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_closed_helpers.py +0 -0
  69. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_comment_narration.py +0 -0
  70. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_comments.py +0 -0
  71. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_contract_annotation.py +0 -0
  72. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_copy_on_write.py +0 -0
  73. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_data_union_discriminator.py +0 -0
  74. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_declared_contracts.py +0 -0
  75. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_dict_key_views.py +0 -0
  76. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_docstrings.py +0 -0
  77. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_exports.py +0 -0
  78. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_fastapi.py +0 -0
  79. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_fastapi_access.py +0 -0
  80. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_first_party.py +0 -0
  81. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_fixed_record.py +0 -0
  82. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_fixture_contracts.py +0 -0
  83. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_generic_payload.py +0 -0
  84. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_imports.py +0 -0
  85. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_inert_model_annotation.py +0 -0
  86. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_inherited_contract.py +0 -0
  87. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_local_alias_fix.py +0 -0
  88. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_local_source.py +0 -0
  89. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_logging.py +0 -0
  90. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_loguru.py +0 -0
  91. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_mapping_shape_callbacks.py +0 -0
  92. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_namespace_access.py +0 -0
  93. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_native_namespace_capability.py +0 -0
  94. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_native_object_contracts.py +0 -0
  95. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_nominal_project.py +0 -0
  96. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_numeric_proof.py +0 -0
  97. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_opaque_contracts.py +0 -0
  98. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_paths.py +0 -0
  99. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_postgres.py +0 -0
  100. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_project_index.py +0 -0
  101. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_prose_budget.py +0 -0
  102. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_pydantic_field_contract.py +0 -0
  103. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_pytest.py +0 -0
  104. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_pytest_contract_parameters.py +0 -0
  105. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_resolved_operation_signature.py +0 -0
  106. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_resource_provenance.py +0 -0
  107. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_route_shapes.py +0 -0
  108. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_runtime_bindings.py +0 -0
  109. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_runtime_names.py +0 -0
  110. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_runtime_registry.py +0 -0
  111. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_service_http_callbacks.py +0 -0
  112. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_set_fields.py +0 -0
  113. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_sql.py +0 -0
  114. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_static_json_alias.py +0 -0
  115. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_store_sql.py +0 -0
  116. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_store_writes.py +0 -0
  117. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_suppression_comments.py +0 -0
  118. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_test_assertions.py +0 -0
  119. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_test_composition.py +0 -0
  120. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_test_provenance.py +0 -0
  121. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_transactional_sql.py +0 -0
  122. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/_type_guard_symbols.py +0 -0
  123. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/async_cleanup_registered_synchronously.py +0 -0
  124. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/async_executor_shutdown.py +0 -0
  125. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/async_mock_call_without_await_assertion.py +0 -0
  126. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/async_subprocess_cancellation_cleanup.py +0 -0
  127. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/cancel_owned_task_without_join.py +0 -0
  128. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/complex_postgres_query_requires_architecture_review.py +0 -0
  129. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/defect_xfail_requires_explicit_strict.py +0 -0
  130. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/delete_route_returns_no_content.py +0 -0
  131. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/docstring_args_restate_signature.py +0 -0
  132. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/docstring_returns_restate_signature.py +0 -0
  133. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/duplicate_adjacent_exception_handler.py +0 -0
  134. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/duplicate_closed_pure_helper.py +0 -0
  135. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/duplicate_pytest_fixture_params.py +0 -0
  136. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/excessive_commentary.py +0 -0
  137. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/failed_probe_zero_threshold.py +0 -0
  138. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/fakes_in_shared_location.py +0 -0
  139. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/fastapi_class_router_contract.py +0 -0
  140. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/fastapi_explicit_openapi_contract.py +0 -0
  141. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/fastapi_route_declares_security.py +0 -0
  142. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/iac_source_coupled_test.py +0 -0
  143. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/invalid_pydantic_field_default.py +0 -0
  144. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/mock_without_spec.py +0 -0
  145. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/named_record_at_boundaries.py +0 -0
  146. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/nan_hidden_by_builtin_min.py +0 -0
  147. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/negative_only_http_status_assertion.py +0 -0
  148. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_analytical_aggregation_in_postgres_store.py +0 -0
  149. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_any_mapping_types.py +0 -0
  150. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_async_client_in_constructor.py +0 -0
  151. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_async_function_cache.py +0 -0
  152. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_before_validator_input_mutation.py +0 -0
  153. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_blanket_suppression.py +0 -0
  154. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_broad_keyword_capture.py +0 -0
  155. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_comment_cruft.py +0 -0
  156. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_conflicting_pydantic_alias_validation.py +0 -0
  157. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_conftest_test_module_import.py +0 -0
  158. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_contradictory_type_guard.py +0 -0
  159. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_copied_inherited_docstring.py +0 -0
  160. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_cors_wildcard_with_credentials.py +0 -0
  161. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_create_verb_in_post_path.py +0 -0
  162. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_custom_control_flow_exception.py +0 -0
  163. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_database_programmability.py +0 -0
  164. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_defaulted_environment_setting.py +0 -0
  165. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_delete_statement.py +0 -0
  166. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_discarded_tagged_outcome.py +0 -0
  167. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_discarded_validation_result.py +0 -0
  168. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_dual_shape_model_field_reader.py +0 -0
  169. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_dunder_all.py +0 -0
  170. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_duplicate_dunder_all_entry.py +0 -0
  171. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_duplicate_field_validator_body.py +0 -0
  172. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_dynamic_builtins.py +0 -0
  173. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_exception_text_in_500_detail.py +0 -0
  174. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_excessive_cognitive_complexity.py +0 -0
  175. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_fastapi_on_event.py +0 -0
  176. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_file_level_escape_hatch_suppression.py +0 -0
  177. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_first_party_private_import.py +0 -0
  178. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_fixed_sleep_before_assert.py +0 -0
  179. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_fixed_sleep_in_loop.py +0 -0
  180. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_folded_bad_request_not_found.py +0 -0
  181. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_frozen_after_validator_field_write.py +0 -0
  182. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_generic_json_parser.py +0 -0
  183. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_generic_single_export_module.py +0 -0
  184. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_hasattr.py +0 -0
  185. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_hidden_constructor_fallback.py +0 -0
  186. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_impossible_pydantic_field_bounds.py +0 -0
  187. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_injected_module_loader.py +0 -0
  188. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_input_model_mutation.py +0 -0
  189. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_interpreter_source_arguments.py +0 -0
  190. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_invalid_argument_name_suppression.py +0 -0
  191. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_invalid_pydantic_bypass.py +0 -0
  192. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_invalid_pydantic_validator_return.py +0 -0
  193. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_loguru_exc_info.py +0 -0
  194. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_loguru_printf_format.py +0 -0
  195. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_mocked_pydantic_value_object.py +0 -0
  196. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_mutating_container_transform.py +0 -0
  197. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_mutating_input_with_result.py +0 -0
  198. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_nested_pydantic_field_validator.py +0 -0
  199. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_nullable_dependency_fallback.py +0 -0
  200. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_offset_pagination.py +0 -0
  201. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_partial_type_is.py +0 -0
  202. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_positional_psycopg_row_escape.py +0 -0
  203. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_psycopg_execution_in_loop.py +0 -0
  204. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_psycopg_execution_outside_injected_owner.py +0 -0
  205. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_random_uuid_in_sql.py +0 -0
  206. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_raw_connection_in_tests.py +0 -0
  207. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_raw_source_text_test_oracle.py +0 -0
  208. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_recording_store.py +0 -0
  209. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_redundant_attribute_unpacking.py +0 -0
  210. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_redundant_literal_description.py +0 -0
  211. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_redundant_local_alias.py +0 -0
  212. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_redundant_module_alias_exports.py +0 -0
  213. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_redundant_sql_alias.py +0 -0
  214. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_repeated_string_literal.py +0 -0
  215. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_repeated_test_body.py +0 -0
  216. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_restated_comment.py +0 -0
  217. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_secret_in_log.py +0 -0
  218. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_select_star.py +0 -0
  219. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_service_behavior_in_settings.py +0 -0
  220. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_shallow_container_type_guard.py +0 -0
  221. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_shallow_record_type_guard.py +0 -0
  222. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_shared_mutable_default.py +0 -0
  223. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_slash_collection_root_under_prefix.py +0 -0
  224. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_string_concat_in_loop.py +0 -0
  225. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_swallowed_asyncio_cancellation.py +0 -0
  226. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_sys_path_mutation.py +0 -0
  227. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_tautological_expect.py +0 -0
  228. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_test_comments.py +0 -0
  229. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_test_method_grafting.py +0 -0
  230. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_typed_doc_sections.py +0 -0
  231. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_unique_violation_message_match.py +0 -0
  232. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_unknown_pydantic_validator_field.py +0 -0
  233. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_unnecessary_docstring.py +0 -0
  234. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_unused_copy_result.py +0 -0
  235. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_unused_underscored_keyword_parameter.py +0 -0
  236. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_unused_value_marker.py +0 -0
  237. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_vague_suppression_description.py +0 -0
  238. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_whole_request_response_payload_in_log.py +0 -0
  239. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/no_work_verb_get_route.py +0 -0
  240. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/opaque_parametrize_case_needs_id.py +0 -0
  241. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/over_mocked_test.py +0 -0
  242. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/phase_label_comment.py +0 -0
  243. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/prefer_application_model_joins.py +0 -0
  244. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/prefer_autospec_for_callable_mock.py +0 -0
  245. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/prefer_bulk_upsert.py +0 -0
  246. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/prefer_class_row.py +0 -0
  247. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/prefer_collection_comprehension.py +0 -0
  248. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/prefer_configured_cloud_scope.py +0 -0
  249. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/prefer_constant_time_secret_compare.py +0 -0
  250. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/prefer_coordinated_state_owner.py +0 -0
  251. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/prefer_declarative_batch_validation.py +0 -0
  252. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/prefer_direct_import_module.py +0 -0
  253. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/prefer_fstring_over_concat.py +0 -0
  254. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/prefer_grouped_settings.py +0 -0
  255. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/prefer_immutable_module_constant.py +0 -0
  256. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/prefer_injected_dependency_over_monkeypatch.py +0 -0
  257. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/prefer_injected_service.py +0 -0
  258. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/prefer_library_fake.py +0 -0
  259. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/prefer_match_assert_never.py +0 -0
  260. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/prefer_match_exception_dispatch.py +0 -0
  261. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/prefer_match_type_dispatch.py +0 -0
  262. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/prefer_match_value_dispatch.py +0 -0
  263. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/prefer_module_level_constant.py +0 -0
  264. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/prefer_monkeypatch_for_process_state_in_test.py +0 -0
  265. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/prefer_monotonic_for_elapsed_time.py +0 -0
  266. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/prefer_namedtuple_over_tuple_return.py +0 -0
  267. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/prefer_native_string_check.py +0 -0
  268. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/prefer_non_nullable_collection.py +0 -0
  269. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/prefer_optional_composite.py +0 -0
  270. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/prefer_or_pattern.py +0 -0
  271. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/prefer_precise_object_contract.py +0 -0
  272. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/prefer_psycopg_executemany.py +0 -0
  273. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/prefer_pydantic_json_value.py +0 -0
  274. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/prefer_pydantic_model_assertion.py +0 -0
  275. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/prefer_pytest_dependency_fixtures.py +0 -0
  276. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/prefer_pytest_fixture_contract.py +0 -0
  277. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/prefer_pytest_fixture_injection.py +0 -0
  278. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/prefer_regex_fullmatch.py +0 -0
  279. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/prefer_required_constructor_parameters.py +0 -0
  280. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/prefer_runtime_validation.py +0 -0
  281. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/prefer_self_documenting_constant.py +0 -0
  282. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/prefer_self_type_annotation.py +0 -0
  283. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/prefer_set_isdisjoint.py +0 -0
  284. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/prefer_single_psycopg_cursor.py +0 -0
  285. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/prefer_str_enum.py +0 -0
  286. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/prefer_struct_over_namedtuple.py +0 -0
  287. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/prefer_typed_cli.py +0 -0
  288. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/prefer_typed_mapping_get.py +0 -0
  289. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/prefer_validated_uuid_comparison.py +0 -0
  290. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/prefer_walrus_awaited_none_guard.py +0 -0
  291. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/prefer_walrus_comprehension_filter.py +0 -0
  292. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/prefer_walrus_regex_match.py +0 -0
  293. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/prefer_walrus_stream_loop.py +0 -0
  294. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/production_derived_test_cases.py +0 -0
  295. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/pytest_fixture_returns_bare_tuple.py +0 -0
  296. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/pytest_fixture_returns_closed_resource.py +0 -0
  297. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/redundant_class_docstring.py +0 -0
  298. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/redundant_docstring.py +0 -0
  299. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/redundant_module_docstring.py +0 -0
  300. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/redundant_test_constructor_forwarder.py +0 -0
  301. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/repeated_kwarg_heavy_call_in_test.py +0 -0
  302. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/repeated_static_call_cases.py +0 -0
  303. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/repeated_test_composition.py +0 -0
  304. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/repeated_unimplemented_test_contract.py +0 -0
  305. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/require_constrained_api_integer.py +0 -0
  306. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/require_exp_on_jwt_decode.py +0 -0
  307. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/require_explicit_contract_implementation.py +0 -0
  308. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/require_explicit_psycopg_transaction.py +0 -0
  309. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/require_explicit_service_contract.py +0 -0
  310. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/require_injectable_retry_sleep.py +0 -0
  311. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/require_keyword_only_swap_prone_params.py +0 -0
  312. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/require_nodecode_for_splitting_settings_field.py +0 -0
  313. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/require_port_for_service.py +0 -0
  314. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/require_precise_factory_signature.py +0 -0
  315. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/require_public_dependency_contract.py +0 -0
  316. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/require_pydantic_for_external_json.py +0 -0
  317. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/require_pydantic_for_mapping_shape.py +0 -0
  318. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/require_pydantic_for_structured_payload.py +0 -0
  319. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/require_pydantic_ordinal_lower_bound.py +0 -0
  320. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/restated_test_docstring.py +0 -0
  321. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/service_singleton_delegates_to_bulk.py +0 -0
  322. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/shared_mutable_pydantic_factory.py +0 -0
  323. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/stepdown.py +0 -0
  324. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/store_field_update_reuses_upsert.py +0 -0
  325. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/store_get_delegates_to_bulk_read.py +0 -0
  326. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/store_insert_requires_explicit_conflict_policy.py +0 -0
  327. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/store_insert_requires_on_conflict.py +0 -0
  328. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/store_mutation_command_fanout.py +0 -0
  329. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/subprocess_kill_without_reap.py +0 -0
  330. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/test_without_explicit_oracle.py +0 -0
  331. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/timestamp_order_requires_tiebreaker.py +0 -0
  332. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/trailing_value_narration.py +0 -0
  333. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/typed_error_reasons.py +0 -0
  334. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/uncontrolled_randomness_in_test.py +0 -0
  335. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/unused_mock_setup.py +0 -0
  336. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/rules/unused_test_factory_option.py +0 -0
  337. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.0}/src/sarj_python_lint/sql_literals.py +0 -0
  338. {sarj_python_lint-1.133.0 → sarj_python_lint-1.135.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.133.0
3
+ Version: 1.135.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.133.0"
3
+ version = "1.135.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" }]
@@ -293,6 +293,8 @@ def analyze(
293
293
 
294
294
  _DIAGNOSTIC_PRECEDENCE = MappingProxyType(
295
295
  {
296
+ "SARJ008": frozenset({"SARJ568"}),
297
+ "SARJ071": frozenset({"SARJ569"}),
296
298
  "SARJ556": frozenset({"SARJ421"}),
297
299
  "SARJ020": frozenset({"SARJ437"}),
298
300
  "SARJ054": frozenset({"SARJ419"}),
@@ -310,7 +312,7 @@ _DIAGNOSTIC_PRECEDENCE = MappingProxyType(
310
312
  # Visible FastAPI operations have a route-aware contract diagnostic.
311
313
  # Keep the annotation diagnostics when SARJ094 is absent, including
312
314
  # when a concrete response_model makes the route contract complete.
313
- "SARJ094": frozenset({"SARJ008", "SARJ447"}),
315
+ "SARJ094": frozenset({"SARJ008", "SARJ447", "SARJ568"}),
314
316
  "SARJ095": frozenset({"SARJ468"}),
315
317
  "SARJ099": frozenset({"SARJ420"}),
316
318
  # A proven external or nested request boundary already requires schema
@@ -324,9 +326,10 @@ _DIAGNOSTIC_PRECEDENCE = MappingProxyType(
324
326
  "SARJ450": frozenset({"SARJ521", "SARJ535"}),
325
327
  "SARJ521": frozenset({"SARJ535"}),
326
328
  "SARJ457": frozenset({"SARJ045", "SARJ526"}),
327
- "SARJ465": frozenset({"SARJ071"}),
329
+ "SARJ465": frozenset({"SARJ071", "SARJ569"}),
328
330
  "SARJ491": frozenset({"SARJ400"}),
329
331
  "SARJ518": frozenset({"SARJ560"}),
332
+ "SARJ573": frozenset({"SARJ530"}),
330
333
  }
331
334
  )
332
335
 
@@ -347,6 +350,10 @@ class _DiagnosticOwners:
347
350
  fields: tuple[ast.AnnAssign, ...]
348
351
 
349
352
  def location(self, diagnostic: Diagnostic) -> _OwnerLocation:
353
+ if diagnostic.code == "SARJ568":
354
+ if diagnostic.subject is DiagnosticSubject.RETURN:
355
+ return _OwnerLocation(*self.signatures.get(diagnostic.line, (diagnostic.line, diagnostic.col)))
356
+ return _OwnerLocation(diagnostic.line, diagnostic.col)
350
357
  if diagnostic.code in {"SARJ400", "SARJ491"}:
351
358
  return _field_owner_location(diagnostic, self.fields)
352
359
  owners = (
@@ -375,18 +382,25 @@ def deduplicate_diagnostics(
375
382
  "SARJ420" in codes and not codes.isdisjoint(_DOCSTRING_PRECEDENCE_CODES)
376
383
  )
377
384
  needs_signature_owners = (
378
- ("SARJ093" in codes and "SARJ034" in codes)
385
+ ("SARJ568" in codes and not codes.isdisjoint({"SARJ008", "SARJ094"}))
386
+ or ("SARJ093" in codes and "SARJ034" in codes)
379
387
  or ("SARJ447" in codes and "SARJ008" in codes)
380
388
  or ("SARJ094" in codes and not codes.isdisjoint(_DIAGNOSTIC_PRECEDENCE["SARJ094"]))
381
389
  )
382
390
  needs_composition_owners = {"SARJ066", "SARJ457"} <= codes
383
391
  needs_field_owners = {"SARJ400", "SARJ491"} <= codes
392
+ needs_outcome_owners = {"SARJ510", "SARJ571"} <= codes
384
393
  tree = (
385
394
  _diagnostic_owner_tree(source, context)
386
- if needs_docstring_owners or needs_signature_owners or needs_composition_owners or needs_field_owners
395
+ if needs_docstring_owners
396
+ or needs_signature_owners
397
+ or needs_composition_owners
398
+ or needs_field_owners
399
+ or needs_outcome_owners
387
400
  else None
388
401
  )
389
402
  diags = _deduplicate_test_composition(diags, tree)
403
+ diags = _deduplicate_outcome_variants(diags, tree)
390
404
  owners = _DiagnosticOwners(
391
405
  docstrings=_docstring_owner_locations(tree) if needs_docstring_owners else {},
392
406
  signatures=_function_signature_owner_locations(tree) if needs_signature_owners else {},
@@ -460,6 +474,35 @@ def _deduplicate_test_composition(diags: list[Diagnostic], tree: ast.Module | No
460
474
  return [diagnostic for diagnostic in diags if not redundant(diagnostic)]
461
475
 
462
476
 
477
+ def _deduplicate_outcome_variants(diags: list[Diagnostic], tree: ast.Module | None) -> list[Diagnostic]:
478
+ if tree is None or not {"SARJ510", "SARJ571"} <= {diagnostic.code for diagnostic in diags}:
479
+ return diags
480
+ proven = _proven_outcome_models(diags, tree)
481
+ return [
482
+ diagnostic
483
+ for diagnostic in diags
484
+ if not (
485
+ diagnostic.code == "SARJ571"
486
+ and any(_model_contains_line(model, diagnostic.line) for model in proven.get(diagnostic.path, ()))
487
+ )
488
+ ]
489
+
490
+
491
+ def _proven_outcome_models(diags: list[Diagnostic], tree: ast.Module) -> dict[Path, list[ast.ClassDef]]:
492
+ models = tuple(node for node in ast.walk(tree) if isinstance(node, ast.ClassDef))
493
+ proven: dict[Path, list[ast.ClassDef]] = {}
494
+ for diagnostic in diags:
495
+ if diagnostic.code == "SARJ510" and diagnostic.severity is Severity.ERROR:
496
+ proven.setdefault(diagnostic.path, []).extend(
497
+ model for model in models if _model_contains_line(model, diagnostic.line)
498
+ )
499
+ return proven
500
+
501
+
502
+ def _model_contains_line(model: ast.ClassDef, line: int) -> bool:
503
+ return model.lineno <= line <= (model.end_lineno or model.lineno)
504
+
505
+
463
506
  def _suppressed_diagnostics(
464
507
  present: dict[tuple[Path, int, int], dict[str, set[Severity]]],
465
508
  ) -> set[tuple[tuple[Path, int, int], str, Severity]]:
@@ -85,6 +85,7 @@ _CONSTANT_TRUE_DEPTH_LIMIT = 32
85
85
  _INERT_DEFAULT_NODE_LIMIT: Final = 128
86
86
  # Bound accepted revisions; each rule still owns its work and replacement size.
87
87
  _MAX_FIX_PASSES: Final = 256
88
+ _TRIPLE_QUOTE_LENGTH: Final = 3
88
89
  _PURE_STRING_TRANSFORMS: Final[dict[str, str]] = {
89
90
  "strip": "stripped_value",
90
91
  "lower": "lowered_value",
@@ -451,7 +452,7 @@ def _strict_end_literal(literal: str) -> str | None:
451
452
  return None
452
453
  prefix = literal[: len(literal) - len(literal.lstrip("rRuU"))]
453
454
  quote = literal[len(prefix) : len(prefix) + 1]
454
- if quote not in {"'", '"'} or literal[len(prefix) :].startswith(quote * 3):
455
+ if quote not in {"'", '"'} or literal[len(prefix) :].startswith(quote * _TRIPLE_QUOTE_LENGTH):
455
456
  return None
456
457
  ending = "\\Z" if "r" in prefix.lower() else "\\\\Z"
457
458
  return literal[:-2] + ending + quote
@@ -472,6 +473,12 @@ def _sql_alias_fix(source: _Source, diagnostic: Diagnostic) -> list[TextEdit]:
472
473
  def _alias_fix(source: _Source, diagnostic: Diagnostic) -> list[TextEdit]:
473
474
  if not diagnostic.fixes:
474
475
  return source.aliases.fixes(diagnostic)
476
+ return _native_fix(source, diagnostic)
477
+
478
+
479
+ def _native_fix(source: _Source, diagnostic: Diagnostic) -> list[TextEdit]:
480
+ if not diagnostic.fixes:
481
+ return []
475
482
  validated = apply_native_fixes(source.text, diagnostic.fixes)
476
483
  edits = [
477
484
  TextEdit(
@@ -483,7 +490,7 @@ def _alias_fix(source: _Source, diagnostic: Diagnostic) -> list[TextEdit]:
483
490
  for edit in fix.edits
484
491
  ]
485
492
  if apply_edits(source.text, edits) != validated:
486
- msg = "native alias fix coordinates differ from contract edits"
493
+ msg = "native fix coordinates differ from contract edits"
487
494
  raise ValueError(msg)
488
495
  return edits
489
496
 
@@ -1464,6 +1471,7 @@ _BUILDERS: Final[dict[str, Callable[[_Source, Diagnostic], list[TextEdit]]]] = {
1464
1471
  "SARJ526": _declared_testing_fix,
1465
1472
  "SARJ528": _declared_contract_fix,
1466
1473
  "SARJ531": _alias_fix,
1474
+ "SARJ567": _native_fix,
1467
1475
  "SARJ477": _parameter_fix,
1468
1476
  "SARJ488": _exception_fix,
1469
1477
  "SARJ504": _jwt_fix,
@@ -1492,8 +1500,8 @@ def fix_source(path: Path, source: str, *, rule_ids: Sequence[str] | None = None
1492
1500
  if any(character in source for character in "\v\f\x1c\x1d\x1e\x85\u2028\u2029") or "\r" in source.replace(
1493
1501
  "\r\n", ""
1494
1502
  ):
1495
- # Only the closed alias builder owns aligned physical-line buffers and token coordinates here.
1496
- rules = [rule for rule in rules if rule.code == "SARJ531"]
1503
+ # These contract-backed builders use aligned physical-line buffers and token coordinates.
1504
+ rules = [rule for rule in rules if rule.code in {"SARJ531", "SARJ567"}]
1497
1505
  seen: set[bytes] = set()
1498
1506
  applied_codes: set[str] = set()
1499
1507
  passes = 0
@@ -8,6 +8,69 @@ from sarj_python_lint.rule_metadata import RuleDescriptor
8
8
 
9
9
  SCHEMA_VERSION = 1
10
10
  DESCRIPTORS: tuple[RuleDescriptor, ...] = (
11
+ RuleDescriptor(
12
+ rule_id=RuleId("prefer-semantic-temporal-types"),
13
+ module="sarj_python_lint.rules.prefer_semantic_temporal_types",
14
+ class_name="PreferSemanticTemporalTypes",
15
+ code="SARJ573",
16
+ description="Use temporal types for model instants and durations with explicit units.",
17
+ aliases=(),
18
+ enabled_by_default=True,
19
+ ),
20
+ RuleDescriptor(
21
+ rule_id=RuleId("prefer-explicit-value-model-construction"),
22
+ module="sarj_python_lint.rules.prefer_explicit_value_model_construction",
23
+ class_name="PreferExplicitValueModelConstruction",
24
+ code="SARJ572",
25
+ description="Prefer declared validation and explicit factories over value-model initialization hooks.",
26
+ aliases=(),
27
+ enabled_by_default=True,
28
+ ),
29
+ RuleDescriptor(
30
+ rule_id=RuleId("prefer-outcome-variants"),
31
+ module="sarj_python_lint.rules.prefer_outcome_variants",
32
+ class_name="PreferOutcomeVariants",
33
+ code="SARJ571",
34
+ description="Express nullable success and error state as tagged outcome variants.",
35
+ aliases=(),
36
+ enabled_by_default=True,
37
+ ),
38
+ RuleDescriptor(
39
+ rule_id=RuleId("no-magic-arithmetic"),
40
+ module="sarj_python_lint.rules.no_magic_arithmetic",
41
+ class_name="NoMagicArithmetic",
42
+ code="SARJ570",
43
+ description="Name nontrivial numeric factors and operational limits.",
44
+ aliases=(),
45
+ enabled_by_default=True,
46
+ ),
47
+ RuleDescriptor(
48
+ rule_id=RuleId("prefer-explicit-class-contract"),
49
+ module="sarj_python_lint.rules.prefer_explicit_class_contract",
50
+ class_name="PreferExplicitClassContract",
51
+ code="SARJ569",
52
+ description="Declare a contract for a stateful behavior class.",
53
+ aliases=(),
54
+ enabled_by_default=True,
55
+ ),
56
+ RuleDescriptor(
57
+ rule_id=RuleId("prefer-nominal-mapping-keys"),
58
+ module="sarj_python_lint.rules.prefer_nominal_mapping_keys",
59
+ class_name="PreferNominalMappingKeys",
60
+ code="SARJ568",
61
+ description="Declare record shapes or nominal keys at primitive-keyed mapping boundaries.",
62
+ aliases=(),
63
+ enabled_by_default=True,
64
+ ),
65
+ RuleDescriptor(
66
+ rule_id=RuleId("numeric-literal-separators"),
67
+ module="sarj_python_lint.rules.numeric_literal_separators",
68
+ class_name="NumericLiteralSeparators",
69
+ code="SARJ567",
70
+ description="Group long decimal numeric literals with thousands separators.",
71
+ aliases=(),
72
+ enabled_by_default=True,
73
+ ),
11
74
  RuleDescriptor(
12
75
  rule_id=RuleId("prefer-coordinated-state-owner"),
13
76
  module="sarj_python_lint.rules.prefer_coordinated_state_owner",
@@ -301,7 +364,7 @@ DESCRIPTORS: tuple[RuleDescriptor, ...] = (
301
364
  module="sarj_python_lint.rules.prefer_typed_settings_field",
302
365
  class_name="PreferTypedSettingsField",
303
366
  code="SARJ530",
304
- description="Declare settings fields with the domain types already demonstrated by their defaults.",
367
+ description="Declare numeric model domains and use typed choices for token-valued defaults.",
305
368
  aliases=(),
306
369
  enabled_by_default=True,
307
370
  ),
@@ -0,0 +1,216 @@
1
+ from __future__ import annotations
2
+
3
+ import ast
4
+ from typing import TYPE_CHECKING
5
+
6
+ from sarj_python_lint.rule_base import Diagnostic, Severity
7
+ from sarj_python_lint.rules._annotation_origins import AnnotationOrigins
8
+ from sarj_python_lint.rules._pydantic_field_contract import unique_members
9
+
10
+
11
+ if TYPE_CHECKING:
12
+ from sarj_python_lint._file_context import PythonFileContext
13
+
14
+
15
+ _RECORD_BASES = frozenset(
16
+ {
17
+ "pydantic.BaseModel",
18
+ "pydantic.main.BaseModel",
19
+ "typing.TypedDict",
20
+ "typing_extensions.TypedDict",
21
+ "msgspec.Struct",
22
+ }
23
+ )
24
+ _RECORD_DECORATORS = frozenset({"dataclasses.dataclass", "attrs.define", "attrs.frozen", "attr.s", "attr.dataclass"})
25
+ _IDENTITY_DECORATORS = frozenset({"typing.final", "typing_extensions.final"})
26
+ _OPTIONAL = frozenset({"typing.Optional", "typing_extensions.Optional"})
27
+ _UNION = frozenset({"typing.Union", "typing_extensions.Union"})
28
+ _WRAPPERS = frozenset(
29
+ {
30
+ "typing.Annotated",
31
+ "typing_extensions.Annotated",
32
+ "typing.Required",
33
+ "typing_extensions.Required",
34
+ "typing.NotRequired",
35
+ "typing_extensions.NotRequired",
36
+ "typing.ReadOnly",
37
+ "typing_extensions.ReadOnly",
38
+ }
39
+ )
40
+ _METADATA = frozenset({"typing.ClassVar", "typing_extensions.ClassVar", "typing.Final", "typing_extensions.Final"})
41
+ _LITERAL = frozenset({"typing.Literal", "typing_extensions.Literal"})
42
+ _ERROR_FIELDS = frozenset({"error", "err", "failure", "exception", "error_message", "failure_reason"})
43
+ _SUCCESS_FIELDS = frozenset({"ok", "passed", "success", "succeeded", "is_success", "is_successful"})
44
+ _PAYLOAD_FIELDS = frozenset({"value", "data", "payload", "result", "output", "response"})
45
+ _SUCCESS_TAGS = frozenset({"ok", "success", "succeeded", "passed", "complete", "completed"})
46
+ _ERROR_TAGS = frozenset({"error", "failure", "failed", "rejected"})
47
+ _MAX_MEMBERS = 128
48
+ _NUMERIC_PRIMITIVES = frozenset({"int", "float", "complex"})
49
+ _NUMERIC_DOMAINS = frozenset(
50
+ {
51
+ "decimal.Decimal",
52
+ "fractions.Fraction",
53
+ "pydantic.PositiveFloat",
54
+ "pydantic.NonNegativeFloat",
55
+ "pydantic.NegativeFloat",
56
+ "pydantic.NonPositiveFloat",
57
+ "pydantic.PositiveInt",
58
+ "pydantic.NonNegativeInt",
59
+ "pydantic.NegativeInt",
60
+ "pydantic.NonPositiveInt",
61
+ "pydantic.FiniteFloat",
62
+ "pydantic.StrictFloat",
63
+ "pydantic.StrictInt",
64
+ }
65
+ )
66
+
67
+
68
+ def nullable_outcome_diagnostics(context: PythonFileContext, code: str) -> list[Diagnostic]:
69
+ if context.tree is None or context.generated or context.has_wildcard_import:
70
+ return []
71
+ if not any(name in context.symbol_source for name in _ERROR_FIELDS):
72
+ return []
73
+ facts = AnnotationOrigins(context)
74
+ findings: list[Diagnostic] = []
75
+ for model in context.tree.body:
76
+ if not isinstance(model, ast.ClassDef) or not _record(model, facts):
77
+ continue
78
+ first = _outcome_error(model, _record_fields(model, facts), facts)
79
+ if first is None or context.suppressions.is_suppressed(first.lineno, code):
80
+ continue
81
+ findings.append(
82
+ Diagnostic(
83
+ context.path,
84
+ first.lineno,
85
+ first.col_offset + 1,
86
+ code,
87
+ f"{model.name} combines a nullable error with success/payload state; model recoverable outcomes "
88
+ "as Success | Error variants with an explicit discriminator and non-null variant payloads. "
89
+ "Keep partial progress as typed error context when needed.",
90
+ severity=Severity.WARNING,
91
+ )
92
+ )
93
+ return findings
94
+
95
+
96
+ def _outcome_error(
97
+ model: ast.ClassDef, fields: dict[str, ast.AnnAssign], facts: AnnotationOrigins
98
+ ) -> ast.AnnAssign | None:
99
+ errors = [field for name, field in fields.items() if _failure_field(name, field.annotation, facts)]
100
+ if not errors:
101
+ return None
102
+ flags = any(name in _SUCCESS_FIELDS and _boolean(field.annotation, facts) for name, field in fields.items())
103
+ finite_tag = any(_outcome_tag(field.annotation, facts) for field in fields.values())
104
+ payload = any(name in _PAYLOAD_FIELDS and _nullable(field.annotation, facts) for name, field in fields.items())
105
+ named_result = model.name.endswith(("Result", "Outcome")) and len(fields) > len(errors)
106
+ return errors[0] if flags or finite_tag or payload or named_result else None
107
+
108
+
109
+ def _record_fields(model: ast.ClassDef, facts: AnnotationOrigins) -> dict[str, ast.AnnAssign]:
110
+ fields: dict[str, ast.AnnAssign] = {}
111
+ unique = unique_members(model)
112
+ for member in model.body:
113
+ match member:
114
+ case ast.AnnAssign(target=ast.Name(id=name)) if name in unique and not name.startswith("_"):
115
+ if not _metadata(member.annotation, facts):
116
+ fields[name] = member
117
+ case _:
118
+ pass
119
+ return fields
120
+
121
+
122
+ def _record(model: ast.ClassDef, facts: AnnotationOrigins) -> bool:
123
+ decorators = [
124
+ facts.qualified(node.func if isinstance(node, ast.Call) else node, node) for node in model.decorator_list
125
+ ]
126
+ if any(name not in _RECORD_DECORATORS | _IDENTITY_DECORATORS for name in decorators):
127
+ return False
128
+ return (len(model.bases) == 1 and facts.qualified(model.bases[0], model.bases[0]) in _RECORD_BASES) or (
129
+ not model.bases and any(name in _RECORD_DECORATORS for name in decorators)
130
+ )
131
+
132
+
133
+ def _metadata(annotation: ast.expr, facts: AnnotationOrigins) -> bool:
134
+ resolved = facts.resolve_annotation(annotation)
135
+ return (
136
+ resolved is not None
137
+ and isinstance(resolved.expression, ast.Subscript)
138
+ and facts.qualified(resolved.expression.value, resolved.at) in _METADATA
139
+ )
140
+
141
+
142
+ def _nullable(annotation: ast.expr, facts: AnnotationOrigins) -> bool:
143
+ pending = [(annotation, annotation)]
144
+ for _ in range(_MAX_MEMBERS):
145
+ if not pending:
146
+ return False
147
+ node, at = pending.pop()
148
+ resolved = facts.resolve_annotation(node, at=at)
149
+ if resolved is None:
150
+ continue
151
+ node, at = resolved.expression, resolved.at
152
+ match node:
153
+ case ast.Constant(value=None):
154
+ return True
155
+ case ast.Subscript(value=value) if facts.qualified(value, at) in _OPTIONAL:
156
+ return True
157
+ case _:
158
+ pass
159
+ pending.extend((member, at) for member in _nullable_members(node, at, facts))
160
+ return False
161
+
162
+
163
+ def _nullable_members(node: ast.expr, at: ast.expr, facts: AnnotationOrigins) -> tuple[ast.expr, ...]:
164
+ match node:
165
+ case ast.BinOp(left=left, op=ast.BitOr(), right=right):
166
+ return left, right
167
+ case ast.Subscript(value=value, slice=inner):
168
+ qualified = facts.qualified(value, at)
169
+ members = tuple(inner.elts) if isinstance(inner, ast.Tuple) else (inner,)
170
+ if qualified in _UNION:
171
+ return members
172
+ if qualified in _WRAPPERS:
173
+ return members[:1]
174
+ case _:
175
+ pass
176
+ return ()
177
+
178
+
179
+ def _boolean(annotation: ast.expr, facts: AnnotationOrigins) -> bool:
180
+ resolved = facts.resolve_annotation(annotation)
181
+ return resolved is not None and facts.builtin(resolved.expression, "bool", resolved.at)
182
+
183
+
184
+ def _outcome_tag(annotation: ast.expr, facts: AnnotationOrigins) -> bool:
185
+ resolved = facts.resolve_annotation(annotation)
186
+ if resolved is None or not isinstance(resolved.expression, ast.Subscript):
187
+ return False
188
+ node = resolved.expression
189
+ if facts.qualified(node.value, resolved.at) not in _LITERAL:
190
+ return False
191
+ members = node.slice.elts if isinstance(node.slice, ast.Tuple) else [node.slice]
192
+ values = {member.value for member in members if isinstance(member, ast.Constant) and isinstance(member.value, str)}
193
+ return bool(values & _SUCCESS_TAGS) and bool(values & _ERROR_TAGS)
194
+
195
+
196
+ def _failure_field(name: str, annotation: ast.expr, facts: AnnotationOrigins) -> bool:
197
+ return name in _ERROR_FIELDS and _nullable(annotation, facts) and not _numeric_error(annotation, facts)
198
+
199
+
200
+ def _numeric_error(annotation: ast.expr, facts: AnnotationOrigins) -> bool:
201
+ resolved = facts.resolve_annotation(annotation)
202
+ if resolved is None:
203
+ return False
204
+ members = [
205
+ member
206
+ for member in facts.context.annotation_semantics.transparent_members(resolved.expression)
207
+ if not (isinstance(member, ast.Constant) and member.value is None)
208
+ ]
209
+ return bool(members) and all(_numeric_member(member, resolved.at, facts) for member in members)
210
+
211
+
212
+ def _numeric_member(member: ast.expr, at: ast.expr, facts: AnnotationOrigins) -> bool:
213
+ qualified = facts.qualified(member, at)
214
+ if qualified is not None and qualified.startswith("pydantic.types."):
215
+ qualified = "pydantic." + qualified.removeprefix("pydantic.types.")
216
+ return any(facts.builtin(member, name, at) for name in _NUMERIC_PRIMITIVES) or qualified in _NUMERIC_DOMAINS
@@ -250,6 +250,7 @@ from sarj_python_lint.rules.no_hasattr import NoHasattr
250
250
  from sarj_python_lint.rules.no_impossible_pydantic_field_bounds import NoImpossiblePydanticFieldBounds
251
251
  from sarj_python_lint.rules.no_invalid_pydantic_bypass import NoInvalidPydanticBypass
252
252
  from sarj_python_lint.rules.no_invalid_pydantic_validator_return import NoInvalidPydanticValidatorReturn
253
+ from sarj_python_lint.rules.no_magic_arithmetic import NoMagicArithmetic
253
254
  from sarj_python_lint.rules.no_partial_type_is import NoPartialTypeIs
254
255
  from sarj_python_lint.rules.no_psycopg_execution_in_loop import NoPsycopgExecutionInLoop
255
256
  from sarj_python_lint.rules.no_recording_store import NoRecordingStore
@@ -261,18 +262,24 @@ from sarj_python_lint.rules.no_slash_collection_root_under_prefix import NoSlash
261
262
  from sarj_python_lint.rules.no_sys_path_mutation import NoSysPathMutation
262
263
  from sarj_python_lint.rules.no_unknown_pydantic_validator_field import NoUnknownPydanticValidatorField
263
264
  from sarj_python_lint.rules.no_work_verb_get_route import NoWorkVerbGetRoute
265
+ from sarj_python_lint.rules.numeric_literal_separators import NumericLiteralSeparators
264
266
  from sarj_python_lint.rules.prefer_application_model_joins import PreferApplicationModelJoins
265
267
  from sarj_python_lint.rules.prefer_bulk_upsert import PreferBulkUpsert
266
268
  from sarj_python_lint.rules.prefer_coordinated_state_owner import PreferCoordinatedStateOwner
267
269
  from sarj_python_lint.rules.prefer_direct_import_module import PreferDirectImportModule
268
270
  from sarj_python_lint.rules.prefer_discriminated_model_union import PreferDiscriminatedModelUnion
271
+ from sarj_python_lint.rules.prefer_explicit_class_contract import PreferExplicitClassContract
272
+ from sarj_python_lint.rules.prefer_explicit_value_model_construction import PreferExplicitValueModelConstruction
269
273
  from sarj_python_lint.rules.prefer_grouped_settings import PreferGroupedSettings
274
+ from sarj_python_lint.rules.prefer_nominal_mapping_keys import PreferNominalMappingKeys
270
275
  from sarj_python_lint.rules.prefer_optional_composite import PreferOptionalComposite
276
+ from sarj_python_lint.rules.prefer_outcome_variants import PreferOutcomeVariants
271
277
  from sarj_python_lint.rules.prefer_precise_object_contract import PreferPreciseObjectContract
272
278
  from sarj_python_lint.rules.prefer_psycopg_executemany import PreferPsycopgExecutemany
273
279
  from sarj_python_lint.rules.prefer_pydantic_model_assertion import PreferPydanticModelAssertion
274
280
  from sarj_python_lint.rules.prefer_pytest_dependency_fixtures import PreferPytestDependencyFixtures
275
281
  from sarj_python_lint.rules.prefer_runtime_validation import PreferRuntimeValidation
282
+ from sarj_python_lint.rules.prefer_semantic_temporal_types import PreferSemanticTemporalTypes
276
283
  from sarj_python_lint.rules.prefer_single_psycopg_cursor import PreferSinglePsycopgCursor
277
284
  from sarj_python_lint.rules.prefer_typed_cli import PreferTypedCli
278
285
  from sarj_python_lint.rules.prefer_typed_mapping_get import PreferTypedMappingGet
@@ -293,6 +300,13 @@ from sarj_python_lint.rules.test_without_explicit_oracle import NoExplicitTestOr
293
300
 
294
301
  _AUTHORING_REGISTRY: Mapping[str, type[Rule]] = MappingProxyType(
295
302
  {
303
+ PreferSemanticTemporalTypes.id: PreferSemanticTemporalTypes,
304
+ PreferExplicitValueModelConstruction.id: PreferExplicitValueModelConstruction,
305
+ PreferOutcomeVariants.id: PreferOutcomeVariants,
306
+ NoMagicArithmetic.id: NoMagicArithmetic,
307
+ PreferExplicitClassContract.id: PreferExplicitClassContract,
308
+ PreferNominalMappingKeys.id: PreferNominalMappingKeys,
309
+ NumericLiteralSeparators.id: NumericLiteralSeparators,
296
310
  PreferCoordinatedStateOwner.id: PreferCoordinatedStateOwner,
297
311
  PreferInjectedService.id: PreferInjectedService,
298
312
  PreferConfiguredCloudScope.id: PreferConfiguredCloudScope,
@@ -0,0 +1,86 @@
1
+ from __future__ import annotations
2
+
3
+ import ast
4
+ from typing import TYPE_CHECKING
5
+
6
+ from sarj_python_lint.rules._declared_contracts import DeclaredClass, DeclaredContracts, written_attribute_roots
7
+
8
+
9
+ if TYPE_CHECKING:
10
+ from sarj_python_lint.rules._imports import ImportIndex
11
+
12
+
13
+ _DATACLASSES = frozenset({"dataclasses", "pydantic.dataclasses", "pydantic.v1.dataclasses"})
14
+ _MODELS = frozenset({"pydantic", "pydantic.main", "pydantic.v1", "pydantic.v1.main"})
15
+ _SETTINGS = frozenset({"pydantic_settings", "pydantic_settings.main", "pydantic.v1", "pydantic.v1.env_settings"})
16
+ _TYPING = frozenset({"typing", "typing_extensions"})
17
+ _MAX_ANCESTORS = 32
18
+
19
+
20
+ def value_model(model: DeclaredClass, contracts: DeclaredContracts, *, include_settings: bool = False) -> bool:
21
+ pending = [model]
22
+ seen: set[ast.ClassDef] = set()
23
+ while pending and len(seen) < _MAX_ANCESTORS:
24
+ current = pending.pop()
25
+ owner = current.declaration
26
+ if owner in seen:
27
+ continue
28
+ seen.add(owner)
29
+ if not _supported_declaration(current, contracts):
30
+ continue
31
+ if _native_value_identity(current, contracts, include_settings=include_settings):
32
+ return True
33
+ for base in owner.bases:
34
+ parent = contracts.class_type(base, current.unit)
35
+ if parent is not None:
36
+ pending.append(parent)
37
+ return False
38
+
39
+
40
+ def _supported_declaration(model: DeclaredClass, contracts: DeclaredContracts) -> bool:
41
+ owner = model.declaration
42
+ tree = model.unit.tree
43
+ if owner.keywords or owner.type_params or tree is None or _wildcard(tree):
44
+ return False
45
+ imports = contracts.imports_for(model.unit)
46
+ return all(_identity_decorator(node, model, imports) for node in owner.decorator_list)
47
+
48
+
49
+ def _identity_decorator(decorator: ast.expr, model: DeclaredClass, imports: ImportIndex) -> bool:
50
+ target = decorator.func if isinstance(decorator, ast.Call) else decorator
51
+ return _stable_native(target, model) and (
52
+ imports.resolves(target, sources=_DATACLASSES, symbol="dataclass")
53
+ or imports.resolves(target, sources=_TYPING, symbol="final")
54
+ )
55
+
56
+
57
+ def _native_value_identity(model: DeclaredClass, contracts: DeclaredContracts, *, include_settings: bool) -> bool:
58
+ imports = contracts.imports_for(model.unit)
59
+ decorators = [node.func if isinstance(node, ast.Call) else node for node in model.declaration.decorator_list]
60
+ if any(imports.resolves(node, sources=_DATACLASSES, symbol="dataclass") for node in decorators):
61
+ return True
62
+ return any(
63
+ _native_model_base(base, model, imports, include_settings=include_settings) for base in model.declaration.bases
64
+ )
65
+
66
+
67
+ def _native_model_base(base: ast.expr, model: DeclaredClass, imports: ImportIndex, *, include_settings: bool) -> bool:
68
+ return _stable_native(base, model) and (
69
+ imports.resolves(base, sources=_MODELS, symbol="BaseModel")
70
+ or (include_settings and imports.resolves(base, sources=_SETTINGS, symbol="BaseSettings"))
71
+ )
72
+
73
+
74
+ def _wildcard(tree: ast.Module) -> bool:
75
+ return any(alias.name == "*" for node in ast.walk(tree) if isinstance(node, ast.ImportFrom) for alias in node.names)
76
+
77
+
78
+ def _stable_native(expression: ast.expr, model: DeclaredClass) -> bool:
79
+ root = expression
80
+ while isinstance(root, ast.Attribute):
81
+ root = root.value
82
+ return (
83
+ isinstance(root, ast.Name)
84
+ and model.unit.tree is not None
85
+ and root.id not in written_attribute_roots(model.unit.tree)
86
+ )