sarj-python-lint 1.156.0__tar.gz → 1.158.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.156.0 → sarj_python_lint-1.158.0}/PKG-INFO +2 -2
  2. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/pyproject.toml +2 -2
  3. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/_autofix.py +34 -23
  4. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/_autofix_inert.py +23 -18
  5. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/_autofix_security.py +29 -26
  6. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/cast_access.py +14 -8
  7. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_comment_narration.py +22 -17
  8. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_copy_on_write.py +9 -6
  9. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_docstrings.py +31 -28
  10. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_fastapi.py +14 -8
  11. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_fastapi_access.py +23 -20
  12. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_httpx_clients.py +7 -6
  13. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_inert_model_annotation.py +9 -6
  14. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_logging.py +7 -4
  15. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_native_object_contracts.py +54 -38
  16. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_opaque_contracts.py +112 -85
  17. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_prose_budget.py +9 -6
  18. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_pydantic_field_contract.py +43 -38
  19. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_pytest_contract_parameters.py +10 -7
  20. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_sdk_prerequisite.py +28 -18
  21. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_set_fields.py +13 -10
  22. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_sql.py +10 -7
  23. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_store_sql.py +12 -14
  24. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_store_writes.py +14 -11
  25. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_test_composition.py +23 -24
  26. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_test_provenance.py +23 -20
  27. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_transactional_sql.py +19 -16
  28. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/async_executor_shutdown.py +7 -8
  29. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/async_mock_call_without_await_assertion.py +12 -9
  30. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/async_subprocess_cancellation_cleanup.py +9 -7
  31. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/complex_postgres_query_requires_architecture_review.py +7 -4
  32. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/defect_xfail_requires_explicit_strict.py +9 -6
  33. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_match_type_dispatch.py +75 -20
  34. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_match_value_dispatch.py +52 -5
  35. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/.gitignore +0 -0
  36. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/LICENSE +0 -0
  37. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/README.md +0 -0
  38. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/__init__.py +0 -0
  39. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/__main__.py +0 -0
  40. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/_analysis_session.py +0 -0
  41. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/_autofix_aliases.py +0 -0
  42. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/_autofix_annotations.py +0 -0
  43. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/_autofix_comments.py +0 -0
  44. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/_autofix_declared_contracts.py +0 -0
  45. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/_autofix_declared_tests.py +0 -0
  46. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/_autofix_docs.py +0 -0
  47. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/_autofix_enums.py +0 -0
  48. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/_autofix_exhaustiveness.py +0 -0
  49. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/_autofix_parameters.py +0 -0
  50. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/_autofix_repeated.py +0 -0
  51. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/_autofix_sql_projection.py +0 -0
  52. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/_autofix_tests.py +0 -0
  53. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/_closed_sql_literal.py +0 -0
  54. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/_file_context.py +0 -0
  55. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/_filesystem.py +0 -0
  56. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/_fixes.py +0 -0
  57. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/_parallel.py +0 -0
  58. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/_prepared_sources.py +0 -0
  59. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/_python_target.py +0 -0
  60. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/_ratchet_cli.py +0 -0
  61. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/_rule_descriptors.py +0 -0
  62. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/_secret_names.py +0 -0
  63. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/_source.py +0 -0
  64. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/_version.py +0 -0
  65. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/application_logging.py +0 -0
  66. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/autofix.py +0 -0
  67. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/benchmark.py +0 -0
  68. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/interpreter_argv.py +0 -0
  69. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/json_boundary.py +0 -0
  70. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/py.typed +0 -0
  71. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/ratchet.py +0 -0
  72. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rule_base.py +0 -0
  73. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rule_metadata.py +0 -0
  74. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/__init__.py +0 -0
  75. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_annotation_origins.py +0 -0
  76. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_annotation_semantics.py +0 -0
  77. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_ast_index.py +0 -0
  78. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_ast_names.py +0 -0
  79. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_ast_position.py +0 -0
  80. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_async_lifecycle.py +0 -0
  81. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_binding_inventory.py +0 -0
  82. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_closed_helpers.py +0 -0
  83. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_comments.py +0 -0
  84. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_contract_annotation.py +0 -0
  85. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_data_union_discriminator.py +0 -0
  86. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_declared_contracts.py +0 -0
  87. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_dict_key_views.py +0 -0
  88. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_domain_boundaries.py +0 -0
  89. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_exports.py +0 -0
  90. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_first_party.py +0 -0
  91. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_fixed_record.py +0 -0
  92. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_fixture_contracts.py +0 -0
  93. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_generic_payload.py +0 -0
  94. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_imports.py +0 -0
  95. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_inherited_contract.py +0 -0
  96. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_local_alias_fix.py +0 -0
  97. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_local_source.py +0 -0
  98. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_loguru.py +0 -0
  99. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_mapping_shape_callbacks.py +0 -0
  100. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_namespace_access.py +0 -0
  101. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_native_namespace_capability.py +0 -0
  102. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_nominal_project.py +0 -0
  103. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_nullable_outcome.py +0 -0
  104. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_numeric_proof.py +0 -0
  105. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_paths.py +0 -0
  106. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_postgres.py +0 -0
  107. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_project_index.py +0 -0
  108. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_pytest.py +0 -0
  109. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_registry.py +0 -0
  110. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_resolved_operation_signature.py +0 -0
  111. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_resource_provenance.py +0 -0
  112. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_route_shapes.py +0 -0
  113. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_runtime_bindings.py +0 -0
  114. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_runtime_names.py +0 -0
  115. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_runtime_registry.py +0 -0
  116. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_sdk_metadata_fields.py +0 -0
  117. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_service_http_callbacks.py +0 -0
  118. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_static_json_alias.py +0 -0
  119. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_suppression_comments.py +0 -0
  120. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_test_assertions.py +0 -0
  121. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_type_guard_symbols.py +0 -0
  122. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/_value_models.py +0 -0
  123. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/async_cleanup_registered_synchronously.py +0 -0
  124. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/cancel_owned_task_without_join.py +0 -0
  125. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/delete_route_returns_no_content.py +0 -0
  126. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/docstring_args_restate_signature.py +0 -0
  127. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/docstring_returns_restate_signature.py +0 -0
  128. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/duplicate_adjacent_exception_handler.py +0 -0
  129. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/duplicate_closed_pure_helper.py +0 -0
  130. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/duplicate_pytest_fixture_params.py +0 -0
  131. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/excessive_commentary.py +0 -0
  132. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/failed_probe_zero_threshold.py +0 -0
  133. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/fakes_in_shared_location.py +0 -0
  134. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/fastapi_class_router_contract.py +0 -0
  135. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/fastapi_explicit_openapi_contract.py +0 -0
  136. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/fastapi_route_declares_security.py +0 -0
  137. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/iac_source_coupled_test.py +0 -0
  138. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/invalid_pydantic_field_default.py +0 -0
  139. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/mock_without_spec.py +0 -0
  140. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/named_record_at_boundaries.py +0 -0
  141. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/nan_hidden_by_builtin_min.py +0 -0
  142. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/negative_only_http_status_assertion.py +0 -0
  143. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_analytical_aggregation_in_postgres_store.py +0 -0
  144. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_any_mapping_types.py +0 -0
  145. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_async_client_in_constructor.py +0 -0
  146. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_async_function_cache.py +0 -0
  147. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_before_validator_input_mutation.py +0 -0
  148. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_blanket_suppression.py +0 -0
  149. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_broad_keyword_capture.py +0 -0
  150. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_comment_cruft.py +0 -0
  151. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_conflicting_pydantic_alias_validation.py +0 -0
  152. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_conftest_test_module_import.py +0 -0
  153. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_contradictory_type_guard.py +0 -0
  154. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_copied_inherited_docstring.py +0 -0
  155. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_cors_wildcard_with_credentials.py +0 -0
  156. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_create_verb_in_post_path.py +0 -0
  157. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_custom_control_flow_exception.py +0 -0
  158. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_database_programmability.py +0 -0
  159. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_defaulted_environment_setting.py +0 -0
  160. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_delete_statement.py +0 -0
  161. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_discarded_tagged_outcome.py +0 -0
  162. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_discarded_validation_result.py +0 -0
  163. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_dual_shape_model_field_reader.py +0 -0
  164. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_dunder_all.py +0 -0
  165. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_duplicate_dunder_all_entry.py +0 -0
  166. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_duplicate_field_validator_body.py +0 -0
  167. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_dynamic_builtins.py +0 -0
  168. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_exception_text_in_500_detail.py +0 -0
  169. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_excessive_cognitive_complexity.py +0 -0
  170. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_fastapi_on_event.py +0 -0
  171. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_file_level_escape_hatch_suppression.py +0 -0
  172. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_first_party_private_import.py +0 -0
  173. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_fixed_sleep_before_assert.py +0 -0
  174. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_fixed_sleep_in_loop.py +0 -0
  175. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_folded_bad_request_not_found.py +0 -0
  176. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_frozen_after_validator_field_write.py +0 -0
  177. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_generic_json_parser.py +0 -0
  178. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_generic_single_export_module.py +0 -0
  179. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_hasattr.py +0 -0
  180. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_hidden_constructor_fallback.py +0 -0
  181. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_impossible_pydantic_field_bounds.py +0 -0
  182. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_injected_module_loader.py +0 -0
  183. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_input_model_mutation.py +0 -0
  184. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_interpreter_source_arguments.py +0 -0
  185. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_invalid_argument_name_suppression.py +0 -0
  186. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_invalid_pydantic_bypass.py +0 -0
  187. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_invalid_pydantic_validator_return.py +0 -0
  188. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_loguru_exc_info.py +0 -0
  189. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_loguru_printf_format.py +0 -0
  190. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_magic_arithmetic.py +0 -0
  191. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_mocked_pydantic_value_object.py +0 -0
  192. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_mutating_container_transform.py +0 -0
  193. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_mutating_input_with_result.py +0 -0
  194. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_nested_pydantic_field_validator.py +0 -0
  195. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_nonlocal_statement.py +0 -0
  196. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_nullable_dependency_fallback.py +0 -0
  197. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_offset_pagination.py +0 -0
  198. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_partial_type_is.py +0 -0
  199. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_positional_psycopg_row_escape.py +0 -0
  200. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_psycopg_execution_in_loop.py +0 -0
  201. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_psycopg_execution_outside_injected_owner.py +0 -0
  202. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_random_uuid_in_sql.py +0 -0
  203. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_raw_connection_in_tests.py +0 -0
  204. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_raw_source_text_test_oracle.py +0 -0
  205. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_recording_store.py +0 -0
  206. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_redundant_attribute_unpacking.py +0 -0
  207. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_redundant_literal_description.py +0 -0
  208. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_redundant_local_alias.py +0 -0
  209. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_redundant_module_alias_exports.py +0 -0
  210. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_redundant_sql_alias.py +0 -0
  211. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_repeated_string_literal.py +0 -0
  212. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_repeated_test_body.py +0 -0
  213. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_restated_comment.py +0 -0
  214. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_secret_in_log.py +0 -0
  215. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_select_star.py +0 -0
  216. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_service_behavior_in_settings.py +0 -0
  217. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_shallow_container_type_guard.py +0 -0
  218. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_shallow_record_type_guard.py +0 -0
  219. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_shared_mutable_default.py +0 -0
  220. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_slash_collection_root_under_prefix.py +0 -0
  221. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_string_concat_in_loop.py +0 -0
  222. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_swallowed_asyncio_cancellation.py +0 -0
  223. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_sys_path_mutation.py +0 -0
  224. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_tautological_expect.py +0 -0
  225. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_test_comments.py +0 -0
  226. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_test_method_grafting.py +0 -0
  227. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_typed_doc_sections.py +0 -0
  228. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_unique_violation_message_match.py +0 -0
  229. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_unknown_pydantic_validator_field.py +0 -0
  230. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_unnecessary_docstring.py +0 -0
  231. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_unobserved_task_exception.py +0 -0
  232. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_unscoped_async_client_factory.py +0 -0
  233. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_unused_copy_result.py +0 -0
  234. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_unused_underscored_keyword_parameter.py +0 -0
  235. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_unused_value_marker.py +0 -0
  236. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_vague_suppression_description.py +0 -0
  237. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_value_error_forwarder.py +0 -0
  238. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_whole_request_response_payload_in_log.py +0 -0
  239. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/no_work_verb_get_route.py +0 -0
  240. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/numeric_literal_separators.py +0 -0
  241. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/opaque_parametrize_case_needs_id.py +0 -0
  242. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/over_mocked_test.py +0 -0
  243. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/phase_label_comment.py +0 -0
  244. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_application_model_joins.py +0 -0
  245. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_autospec_for_callable_mock.py +0 -0
  246. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_bulk_upsert.py +0 -0
  247. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_class_row.py +0 -0
  248. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_collection_comprehension.py +0 -0
  249. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_configured_cloud_scope.py +0 -0
  250. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_constant_time_secret_compare.py +0 -0
  251. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_coordinated_state_owner.py +0 -0
  252. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_declarative_batch_validation.py +0 -0
  253. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_defaultdict.py +0 -0
  254. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_direct_import_module.py +0 -0
  255. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_discriminated_model_union.py +0 -0
  256. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_exception_propagation.py +0 -0
  257. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_explicit_class_contract.py +0 -0
  258. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_explicit_value_model_construction.py +0 -0
  259. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_fstring_over_concat.py +0 -0
  260. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_grouped_settings.py +0 -0
  261. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_immutable_module_constant.py +0 -0
  262. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_injected_dependency_over_monkeypatch.py +0 -0
  263. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_injected_service.py +0 -0
  264. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_library_fake.py +0 -0
  265. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_match_assert_never.py +0 -0
  266. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_match_exception_dispatch.py +0 -0
  267. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_module_level_constant.py +0 -0
  268. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_monkeypatch_for_process_state_in_test.py +0 -0
  269. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_monotonic_for_elapsed_time.py +0 -0
  270. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_namedtuple_over_tuple_return.py +0 -0
  271. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_native_string_check.py +0 -0
  272. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_nominal_id_types.py +0 -0
  273. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_nominal_mapping_keys.py +0 -0
  274. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_non_nullable_collection.py +0 -0
  275. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_optional_composite.py +0 -0
  276. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_or_pattern.py +0 -0
  277. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_outcome_variants.py +0 -0
  278. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_precise_object_contract.py +0 -0
  279. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_psycopg_executemany.py +0 -0
  280. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_pydantic_field_bounds.py +0 -0
  281. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_pydantic_json_value.py +0 -0
  282. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_pydantic_model_assertion.py +0 -0
  283. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_pytest_dependency_fixtures.py +0 -0
  284. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_pytest_fixture_contract.py +0 -0
  285. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_pytest_fixture_injection.py +0 -0
  286. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_regex_fullmatch.py +0 -0
  287. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_required_constructor_parameters.py +0 -0
  288. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_required_prerequisite.py +0 -0
  289. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_runtime_validation.py +0 -0
  290. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_self_documenting_constant.py +0 -0
  291. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_self_type_annotation.py +0 -0
  292. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_semantic_temporal_types.py +0 -0
  293. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_set_isdisjoint.py +0 -0
  294. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_single_parametrize_contract.py +0 -0
  295. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_single_psycopg_cursor.py +0 -0
  296. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_str_enum.py +0 -0
  297. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_struct_over_namedtuple.py +0 -0
  298. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_typed_cli.py +0 -0
  299. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_typed_mapping_get.py +0 -0
  300. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_typed_settings_field.py +0 -0
  301. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_validated_uuid_comparison.py +0 -0
  302. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_walrus_awaited_none_guard.py +0 -0
  303. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_walrus_comprehension_filter.py +0 -0
  304. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_walrus_regex_match.py +0 -0
  305. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/prefer_walrus_stream_loop.py +0 -0
  306. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/production_derived_test_cases.py +0 -0
  307. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/psycopg_sql_format_field_mismatch.py +0 -0
  308. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/pytest_fixture_returns_bare_tuple.py +0 -0
  309. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/pytest_fixture_returns_closed_resource.py +0 -0
  310. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/redundant_class_docstring.py +0 -0
  311. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/redundant_docstring.py +0 -0
  312. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/redundant_module_docstring.py +0 -0
  313. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/redundant_test_constructor_forwarder.py +0 -0
  314. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/repeated_kwarg_heavy_call_in_test.py +0 -0
  315. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/repeated_static_call_cases.py +0 -0
  316. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/repeated_test_composition.py +0 -0
  317. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/repeated_unimplemented_test_contract.py +0 -0
  318. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/require_constrained_api_integer.py +0 -0
  319. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/require_exp_on_jwt_decode.py +0 -0
  320. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/require_explicit_contract_implementation.py +0 -0
  321. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/require_explicit_psycopg_transaction.py +0 -0
  322. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/require_explicit_service_contract.py +0 -0
  323. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/require_hidden_settings_input.py +0 -0
  324. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/require_injectable_retry_sleep.py +0 -0
  325. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/require_keyword_only_swap_prone_params.py +0 -0
  326. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/require_nodecode_for_splitting_settings_field.py +0 -0
  327. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/require_port_for_service.py +0 -0
  328. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/require_precise_factory_signature.py +0 -0
  329. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/require_public_dependency_contract.py +0 -0
  330. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/require_pydantic_for_external_json.py +0 -0
  331. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/require_pydantic_for_mapping_shape.py +0 -0
  332. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/require_pydantic_for_structured_payload.py +0 -0
  333. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/require_pydantic_ordinal_lower_bound.py +0 -0
  334. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/restated_test_docstring.py +0 -0
  335. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/service_singleton_delegates_to_bulk.py +0 -0
  336. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/shared_mutable_pydantic_factory.py +0 -0
  337. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/stepdown.py +0 -0
  338. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/store_field_update_reuses_upsert.py +0 -0
  339. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/store_get_delegates_to_bulk_read.py +0 -0
  340. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/store_insert_requires_explicit_conflict_policy.py +0 -0
  341. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/store_insert_requires_on_conflict.py +0 -0
  342. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/store_mutation_command_fanout.py +0 -0
  343. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/subprocess_kill_without_reap.py +0 -0
  344. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/test_without_explicit_oracle.py +0 -0
  345. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/timestamp_order_requires_tiebreaker.py +0 -0
  346. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/trailing_value_narration.py +0 -0
  347. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/typed_error_reasons.py +0 -0
  348. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/uncontrolled_randomness_in_test.py +0 -0
  349. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/unused_mock_setup.py +0 -0
  350. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/rules/unused_test_factory_option.py +0 -0
  351. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.0}/src/sarj_python_lint/sql_literals.py +0 -0
  352. {sarj_python_lint-1.156.0 → sarj_python_lint-1.158.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.156.0
3
+ Version: 1.158.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/
@@ -20,7 +20,7 @@ Requires-Python: >=3.14
20
20
  Requires-Dist: packaging==26.3
21
21
  Requires-Dist: ruff>=0.17.2
22
22
  Requires-Dist: sarj-rule-contracts==0.8.2
23
- Requires-Dist: sarj-sql-lint==0.50.3
23
+ Requires-Dist: sarj-sql-lint==0.50.4
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.156.0"
3
+ version = "1.158.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.2", "sarj-sql-lint==0.50.3", "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.4", "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"
@@ -609,15 +609,16 @@ def _exception_fix(source: _Source, diagnostic: Diagnostic) -> list[TextEdit]:
609
609
  def _exception_types(
610
610
  node: ast.expr | None, context: PythonFileContext, provenance: ResourceProvenance
611
611
  ) -> list[ast.Name]:
612
- if (
613
- isinstance(node, ast.Name)
614
- and not _type_parameter_reference(node, context)
615
- and exception_rule.is_builtin_exception_type(node, context, provenance)
616
- ):
617
- return [node]
618
- if isinstance(node, ast.Tuple):
619
- members = [_exception_types(element, context, provenance) for element in node.elts]
620
- return [name for member in members for name in member] if all(members) else []
612
+ match node:
613
+ case ast.Name() if not _type_parameter_reference(node, context) and exception_rule.is_builtin_exception_type(
614
+ node, context, provenance
615
+ ):
616
+ return [node]
617
+ case ast.Tuple():
618
+ members = [_exception_types(element, context, provenance) for element in node.elts]
619
+ return [name for member in members for name in member] if all(members) else []
620
+ case _:
621
+ pass
621
622
  return []
622
623
 
623
624
 
@@ -755,18 +756,18 @@ def _disjoint_fix(source: _Source, diagnostic: Diagnostic) -> list[TextEdit]:
755
756
  for expression in source.context.nodes(ast.BinOp, ast.Call):
756
757
  if not _at(expression, diagnostic) or source.comments_between(expression.lineno, _last_line(expression)):
757
758
  continue
758
- if isinstance(expression, ast.BinOp) and isinstance(expression.op, ast.BitAnd):
759
- left, right = expression.left, expression.right
760
- elif (
761
- isinstance(expression, ast.Call)
762
- and isinstance(expression.func, ast.Attribute)
763
- and expression.func.attr == "intersection"
764
- and len(expression.args) == 1
765
- and not expression.keywords
766
- ):
767
- left, right = expression.func.value, expression.args[0]
768
- else:
769
- continue
759
+ match expression:
760
+ case ast.BinOp() if isinstance(expression.op, ast.BitAnd):
761
+ left, right = expression.left, expression.right
762
+ case ast.Call() if (
763
+ isinstance(expression.func, ast.Attribute)
764
+ and expression.func.attr == "intersection"
765
+ and len(expression.args) == 1
766
+ and not expression.keywords
767
+ ):
768
+ left, right = expression.func.value, expression.args[0]
769
+ case _:
770
+ continue
770
771
  if _primitive_set(left) and _primitive_set(right):
771
772
  return [source.replace(expression, f"(not ({source.segment(left)}).isdisjoint({source.segment(right)}))")]
772
773
  return []
@@ -787,8 +788,10 @@ def _dispatch_fix(source: _Source, diagnostic: Diagnostic) -> list[TextEdit]:
787
788
  continue
788
789
  type_dispatch = diagnostic.code == "SARJ080"
789
790
  roots = _dispatch_roots(root, source.context) if type_dispatch else [root]
790
- if source.comments_between(root.lineno, _last_line(roots[-1])) or (
791
- len(roots) > 1 and any(source.full_statement(branch) is None for branch in roots)
791
+ if (
792
+ not _fixable_ladder(root, type_dispatch=type_dispatch)
793
+ or source.comments_between(root.lineno, _last_line(roots[-1]))
794
+ or (len(roots) > 1 and any(source.full_statement(branch) is None for branch in roots))
792
795
  ):
793
796
  continue
794
797
  matched = _dispatch_match(roots, source.context, type_dispatch=type_dispatch)
@@ -807,6 +810,14 @@ def _dispatch_fix(source: _Source, diagnostic: Diagnostic) -> list[TextEdit]:
807
810
  return []
808
811
 
809
812
 
813
+ def _fixable_ladder(root: ast.If, *, type_dispatch: bool) -> bool:
814
+ if type_dispatch:
815
+ return True
816
+ while len(root.orelse) == 1 and isinstance(root.orelse[0], ast.If):
817
+ root = root.orelse[0]
818
+ return bool(root.orelse)
819
+
820
+
810
821
  def _dispatch_roots(root: ast.If, context: PythonFileContext) -> list[ast.If]:
811
822
  if root.orelse:
812
823
  return [root]
@@ -117,10 +117,13 @@ def inert_private_scope(owner: ast.FunctionDef, context: PythonFileContext) -> b
117
117
  containing = [owner]
118
118
  parent = context.parents.get(owner)
119
119
  while parent is not None:
120
- if isinstance(parent, (ast.AsyncFunctionDef, ast.ClassDef, ast.Lambda)):
121
- return False
122
- if isinstance(parent, ast.FunctionDef):
123
- containing.append(parent)
120
+ match parent:
121
+ case ast.AsyncFunctionDef() | ast.ClassDef() | ast.Lambda():
122
+ return False
123
+ case ast.FunctionDef():
124
+ containing.append(parent)
125
+ case _:
126
+ pass
124
127
  parent = context.parents.get(parent)
125
128
  analyzer = _Analysis(context, containing[-1])
126
129
  try:
@@ -353,14 +356,15 @@ class _Analysis:
353
356
  statement = self.context.parents.get(binding) if binding is not None else None
354
357
  if isinstance(binding, ast.FunctionDef) and self.context.parents.get(binding) is self.context.tree:
355
358
  statement = binding
356
- if isinstance(statement, ast.AnnAssign) and statement.value is None:
357
- raise _UnsafeError
358
- if (
359
- isinstance(statement, (ast.Import, ast.ImportFrom, ast.Assign, ast.AnnAssign, ast.FunctionDef))
360
- and statement.lineno < self.outer.lineno
361
- and self.context.parents.get(statement) is self.context.tree
362
- ):
363
- return _Value(_Kind.UNKNOWN)
359
+ match statement:
360
+ case ast.AnnAssign() if statement.value is None:
361
+ raise _UnsafeError
362
+ case ast.Import() | ast.ImportFrom() | ast.Assign() | ast.AnnAssign() | ast.FunctionDef() if (
363
+ statement.lineno < self.outer.lineno and self.context.parents.get(statement) is self.context.tree
364
+ ):
365
+ return _Value(_Kind.UNKNOWN)
366
+ case _:
367
+ pass
364
368
  raise _UnsafeError
365
369
 
366
370
  def _call(self, call: ast.Call, environment: dict[str, _Value]) -> _Value:
@@ -506,12 +510,13 @@ class _Analysis:
506
510
  if case.guard is not None:
507
511
  raise _UnsafeError
508
512
  pattern = case.pattern
509
- if isinstance(pattern, ast.MatchValue) and isinstance(pattern.value, ast.Constant):
510
- selected = subject.literal == pattern.value.value
511
- elif isinstance(pattern, ast.MatchAs) and pattern.pattern is None and pattern.name is None:
512
- selected = True
513
- else:
514
- raise _UnsafeError
513
+ match pattern:
514
+ case ast.MatchValue() if isinstance(pattern.value, ast.Constant):
515
+ selected = subject.literal == pattern.value.value
516
+ case ast.MatchAs() if pattern.pattern is None and pattern.name is None:
517
+ selected = True
518
+ case _:
519
+ raise _UnsafeError
515
520
  if selected:
516
521
  return self._body(case.body, environment)
517
522
  return _Result(returned=False, value=_constant(None))
@@ -268,14 +268,17 @@ def _captured_namespace_untouched(
268
268
  for node in context.nodes(ast.AST):
269
269
  if not _namespace_node_safe(node, ancestors) or not _allowed_call(node, namespace.guards, name, owner.name):
270
270
  return False
271
- if isinstance(node, ast.Name) and not _captured_read_safe(context, node, namespace.captures, namespace.guards):
272
- return False
273
- if isinstance(node, ast.Name) and node.id == name:
274
- if node is namespace.captures.compare_default:
275
- continue
276
- if not _canonical_value_read(context, node, namespace.provenance, namespace.alias):
271
+ match node:
272
+ case ast.Name() if not _captured_read_safe(context, node, namespace.captures, namespace.guards):
277
273
  return False
278
- actual_read = True
274
+ case ast.Name() if node.id == name:
275
+ if node is namespace.captures.compare_default:
276
+ continue
277
+ if not _canonical_value_read(context, node, namespace.provenance, namespace.alias):
278
+ return False
279
+ actual_read = True
280
+ case _:
281
+ pass
279
282
  return actual_read
280
283
 
281
284
 
@@ -333,25 +336,25 @@ def _contains_local_hmac(path: Path, root: Path) -> bool:
333
336
 
334
337
 
335
338
  def _namespace_node_safe(node: ast.AST, ancestors: set[ast.AST]) -> bool:
336
- if isinstance(
337
- node,
338
- (
339
- ast.AsyncFunctionDef,
340
- ast.ClassDef,
341
- ast.Lambda,
342
- ast.TypeAlias,
343
- ast.Global,
344
- ast.Nonlocal,
345
- ast.Yield,
346
- ast.YieldFrom,
347
- ast.GeneratorExp,
348
- ),
349
- ):
350
- return False
351
- if isinstance(node, ast.FunctionDef) and node not in ancestors:
352
- return False
353
- if isinstance(node, (ast.Attribute, ast.Subscript)) and not isinstance(node.ctx, ast.Load):
354
- return False
339
+ match node:
340
+ case (
341
+ ast.AsyncFunctionDef()
342
+ | ast.ClassDef()
343
+ | ast.Lambda()
344
+ | ast.TypeAlias()
345
+ | ast.Global()
346
+ | ast.Nonlocal()
347
+ | ast.Yield()
348
+ | ast.YieldFrom()
349
+ | ast.GeneratorExp()
350
+ ):
351
+ return False
352
+ case ast.FunctionDef() if node not in ancestors:
353
+ return False
354
+ case ast.Attribute() | ast.Subscript() if not isinstance(node.ctx, ast.Load):
355
+ return False
356
+ case _:
357
+ pass
355
358
  return not isinstance(node, ast.Attribute) or not node.attr.startswith("__")
356
359
 
357
360
 
@@ -74,10 +74,13 @@ def _cast_receiver(node: ast.Call | ast.Subscript, provenance: ResourceProvenanc
74
74
  if not isinstance(node.ctx, ast.Load) or _static_text(node.slice) != "cast":
75
75
  return None
76
76
  namespace = node.value
77
- if isinstance(namespace, ast.Attribute) and namespace.attr == "__dict__" and isinstance(namespace.value, ast.Name):
78
- return namespace.value
79
- if isinstance(namespace, ast.Call) and len(namespace.args) == 1 and _builtin_call(namespace, "vars", provenance):
80
- return namespace.args[0] if isinstance(namespace.args[0], ast.Name) else None
77
+ match namespace:
78
+ case ast.Attribute() if namespace.attr == "__dict__" and isinstance(namespace.value, ast.Name):
79
+ return namespace.value
80
+ case ast.Call() if len(namespace.args) == 1 and _builtin_call(namespace, "vars", provenance):
81
+ return namespace.args[0] if isinstance(namespace.args[0], ast.Name) else None
82
+ case _:
83
+ pass
81
84
  return None
82
85
 
83
86
 
@@ -214,10 +217,13 @@ def _static_text(node: ast.expr, depth: int = 0) -> str | None:
214
217
 
215
218
 
216
219
  def _reflection_carrier(node: ast.Call | ast.Subscript) -> ast.AST | None:
217
- if isinstance(node, ast.Call) and isinstance(node.func, ast.Attribute):
218
- return node.func
219
- if isinstance(node, ast.Subscript):
220
- return node.value.func if isinstance(node.value, ast.Call) else node.value
220
+ match node:
221
+ case ast.Call() if isinstance(node.func, ast.Attribute):
222
+ return node.func
223
+ case ast.Subscript():
224
+ return node.value.func if isinstance(node.value, ast.Call) else node.value
225
+ case _:
226
+ pass
221
227
  return None
222
228
 
223
229
 
@@ -103,26 +103,31 @@ def same_words(body: str, identifier: str) -> bool:
103
103
  def empty_collection_name(statement: ast.stmt, context: PythonFileContext) -> str | None:
104
104
  target: ast.expr | None = None
105
105
  value: ast.expr | None = None
106
- if isinstance(statement, ast.AnnAssign):
107
- target, value = statement.target, statement.value
108
- elif isinstance(statement, ast.Assign) and len(statement.targets) == 1:
109
- target, value = statement.targets[0], statement.value
106
+ match statement:
107
+ case ast.AnnAssign():
108
+ target, value = statement.target, statement.value
109
+ case ast.Assign() if len(statement.targets) == 1:
110
+ target, value = statement.targets[0], statement.value
111
+ case _:
112
+ pass
110
113
  if not isinstance(target, ast.Name) or value is None:
111
114
  return None
112
- if isinstance(value, (ast.List, ast.Set)) and not value.elts:
113
- return target.id
114
- if isinstance(value, ast.Dict) and not value.keys:
115
- return target.id
116
- if (
117
- isinstance(value, ast.Call)
118
- and isinstance(value.func, ast.Name)
119
- and value.func.id in {"dict", "list", "set"}
120
- and not value.args
121
- and not value.keywords
122
- ):
123
- provenance = context.static_resource_provenance
124
- if provenance.builtin_namespace_untouched and provenance.binding(value.func.id, value.func) is None:
115
+ match value:
116
+ case ast.List() | ast.Set() if not value.elts:
125
117
  return target.id
118
+ case ast.Dict() if not value.keys:
119
+ return target.id
120
+ case ast.Call() if (
121
+ isinstance(value.func, ast.Name)
122
+ and value.func.id in {"dict", "list", "set"}
123
+ and not value.args
124
+ and not value.keywords
125
+ ):
126
+ provenance = context.static_resource_provenance
127
+ if provenance.builtin_namespace_untouched and provenance.binding(value.func.id, value.func) is None:
128
+ return target.id
129
+ case _:
130
+ pass
126
131
  return None
127
132
 
128
133
 
@@ -286,12 +286,15 @@ class _Models:
286
286
  if qualified is not None:
287
287
  module, _, name = qualified.rpartition(".")
288
288
  return SymbolRef(module, name)
289
- if isinstance(expression, ast.Name) and expression.id in imports.shadowed_names:
290
- return SymbolRef(owner.module or "__copy_source__", expression.id)
291
- if isinstance(expression, ast.Attribute) and any(
292
- isinstance(node, ast.Name) and node.id in imports.shadowed_names for node in ast.walk(expression)
293
- ):
294
- return None
289
+ match expression:
290
+ case ast.Name() if expression.id in imports.shadowed_names:
291
+ return SymbolRef(owner.module or "__copy_source__", expression.id)
292
+ case ast.Attribute() if any(
293
+ isinstance(node, ast.Name) and node.id in imports.shadowed_names for node in ast.walk(expression)
294
+ ):
295
+ return None
296
+ case _:
297
+ pass
295
298
  return self.indexes.resolve(owner, expression)
296
299
 
297
300
  def class_node(self, symbol: SymbolRef) -> tuple[SourceUnit, ast.ClassDef] | None:
@@ -388,27 +388,31 @@ def _terminal_name(node: ast.expr) -> str | None:
388
388
 
389
389
 
390
390
  def _record_docstring_use(node: ast.AST, consumed: set[str], aliases: dict[str, set[str]]) -> None:
391
- if isinstance(node, ast.Attribute) and node.attr == "__doc__":
392
- if name := _terminal_name(node.value):
393
- consumed.add(name)
394
- elif isinstance(node, ast.Call) and _is_docstring_reader(node):
395
- if name := _terminal_name(node.args[0]):
396
- consumed.add(name)
397
- elif isinstance(node, ast.Subscript):
398
- if name := _subscripted_docstring_owner(node):
399
- consumed.add(name)
400
- else:
401
- _record_docstring_alias(node, aliases)
391
+ match node:
392
+ case ast.Attribute() if node.attr == "__doc__":
393
+ if name := _terminal_name(node.value):
394
+ consumed.add(name)
395
+ case ast.Call() if _is_docstring_reader(node):
396
+ if name := _terminal_name(node.args[0]):
397
+ consumed.add(name)
398
+ case ast.Subscript():
399
+ if name := _subscripted_docstring_owner(node):
400
+ consumed.add(name)
401
+ case _:
402
+ _record_docstring_alias(node, aliases)
402
403
 
403
404
 
404
405
  def _subscripted_docstring_owner(node: ast.Subscript) -> str | None:
405
406
  if not isinstance(node.slice, ast.Constant) or node.slice.value != "__doc__":
406
407
  return None
407
408
  value = node.value
408
- if isinstance(value, ast.Attribute) and value.attr == "__dict__":
409
- return _terminal_name(value.value)
410
- if isinstance(value, ast.Call) and isinstance(value.func, ast.Name) and value.func.id == "vars" and value.args:
411
- return _terminal_name(value.args[0])
409
+ match value:
410
+ case ast.Attribute() if value.attr == "__dict__":
411
+ return _terminal_name(value.value)
412
+ case ast.Call() if isinstance(value.func, ast.Name) and value.func.id == "vars" and value.args:
413
+ return _terminal_name(value.args[0])
414
+ case _:
415
+ pass
412
416
  return None
413
417
 
414
418
 
@@ -433,16 +437,15 @@ def _is_docstring_reader(node: ast.Call) -> bool:
433
437
 
434
438
 
435
439
  def _record_docstring_alias(node: ast.AST, aliases: dict[str, set[str]]) -> None:
436
- if isinstance(node, ast.Assign) and isinstance(node.value, (ast.Name, ast.Attribute)):
437
- original = _terminal_name(node.value)
438
- for target in node.targets:
439
- if isinstance(target, ast.Name) and original is not None:
440
- aliases.setdefault(target.id, set()).add(original)
441
- elif (
442
- isinstance(node, ast.AnnAssign)
443
- and isinstance(node.target, ast.Name)
444
- and isinstance(node.value, (ast.Name, ast.Attribute))
445
- ):
446
- original = _terminal_name(node.value)
447
- if original is not None:
448
- aliases.setdefault(node.target.id, set()).add(original)
440
+ match node:
441
+ case ast.Assign() if isinstance(node.value, (ast.Name, ast.Attribute)):
442
+ original = _terminal_name(node.value)
443
+ for target in node.targets:
444
+ if isinstance(target, ast.Name) and original is not None:
445
+ aliases.setdefault(target.id, set()).add(original)
446
+ case ast.AnnAssign() if isinstance(node.target, ast.Name) and isinstance(node.value, (ast.Name, ast.Attribute)):
447
+ original = _terminal_name(node.value)
448
+ if original is not None:
449
+ aliases.setdefault(node.target.id, set()).add(original)
450
+ case _:
451
+ pass
@@ -120,10 +120,13 @@ def flat_name(node: ast.expr) -> str:
120
120
 
121
121
 
122
122
  def _binding_name(node: ast.expr) -> str:
123
- if isinstance(node, ast.Name):
124
- return node.id
125
- if isinstance(node, ast.Attribute) and isinstance(node.value, ast.Name) and node.value.id == "self":
126
- return f"self.{node.attr}"
123
+ match node:
124
+ case ast.Name():
125
+ return node.id
126
+ case ast.Attribute() if isinstance(node.value, ast.Name) and node.value.id == "self":
127
+ return f"self.{node.attr}"
128
+ case _:
129
+ pass
127
130
  return ""
128
131
 
129
132
 
@@ -1155,10 +1158,13 @@ def _binding_expression(binding: ast.stmt | None, symbol: str) -> ast.expr | Non
1155
1158
  target = binding.targets[0]
1156
1159
  if isinstance(target, ast.Name) and target.id == symbol:
1157
1160
  return binding.value
1158
- if isinstance(binding, ast.AnnAssign) and isinstance(binding.target, ast.Name) and binding.target.id == symbol:
1159
- return binding.value
1160
- if isinstance(binding, ast.TypeAlias) and binding.name.id == symbol:
1161
- return binding.value
1161
+ match binding:
1162
+ case ast.AnnAssign() if isinstance(binding.target, ast.Name) and binding.target.id == symbol:
1163
+ return binding.value
1164
+ case ast.TypeAlias() if binding.name.id == symbol:
1165
+ return binding.value
1166
+ case _:
1167
+ pass
1162
1168
  return None
1163
1169
 
1164
1170
 
@@ -280,26 +280,29 @@ class SecurityResolver:
280
280
  def _annotation_declares(self, annotation: ast.expr | None, at: ast.AST | None, depth: int) -> bool:
281
281
  if annotation is None or depth > _MAX_ALIAS_DEPTH:
282
282
  return False
283
- if isinstance(annotation, ast.Constant) and isinstance(annotation.value, str):
284
- try:
285
- parsed = ast.parse(annotation.value, mode="eval").body
286
- except SyntaxError:
287
- return False
288
- return self._annotation_declares(parsed, at, depth + 1)
289
- if isinstance(annotation, ast.Name) and at is not None:
290
- binding = self._context.static_resource_provenance.binding(annotation.id, at)
291
- if binding is None:
292
- return False
293
- value = self._bound_value(binding)
294
- if value is not None:
295
- return self._annotation_declares(value, value, depth + 1)
296
- return isinstance(binding, ast.alias) and self._index.is_imported_security_alias(annotation)
297
- if isinstance(annotation, ast.Subscript) and self._import_name(annotation.value, at, annotation=True) in {
298
- "typing.Annotated",
299
- "typing_extensions.Annotated",
300
- }:
301
- parts = annotation.slice.elts if isinstance(annotation.slice, ast.Tuple) else [annotation.slice]
302
- return any(self._is_security(item, at, annotation=True) for item in parts[1:])
283
+ match annotation:
284
+ case ast.Constant() if isinstance(annotation.value, str):
285
+ try:
286
+ parsed = ast.parse(annotation.value, mode="eval").body
287
+ except SyntaxError:
288
+ return False
289
+ return self._annotation_declares(parsed, at, depth + 1)
290
+ case ast.Name() if at is not None:
291
+ binding = self._context.static_resource_provenance.binding(annotation.id, at)
292
+ if binding is None:
293
+ return False
294
+ value = self._bound_value(binding)
295
+ if value is not None:
296
+ return self._annotation_declares(value, value, depth + 1)
297
+ return isinstance(binding, ast.alias) and self._index.is_imported_security_alias(annotation)
298
+ case ast.Subscript() if self._import_name(annotation.value, at, annotation=True) in {
299
+ "typing.Annotated",
300
+ "typing_extensions.Annotated",
301
+ }:
302
+ parts = annotation.slice.elts if isinstance(annotation.slice, ast.Tuple) else [annotation.slice]
303
+ return any(self._is_security(item, at, annotation=True) for item in parts[1:])
304
+ case _:
305
+ pass
303
306
  return False
304
307
 
305
308
  def _is_security(self, node: ast.expr, at: ast.AST | None, *, annotation: bool) -> bool:
@@ -83,12 +83,13 @@ def _reference_untouched(
83
83
 
84
84
 
85
85
  def _alias_target(context: PythonFileContext, statement: ast.AST | None, value: ast.expr) -> ast.Name | None:
86
- if isinstance(statement, ast.Assign) and len(statement.targets) == 1 and statement.value is value:
87
- target = statement.targets[0]
88
- elif isinstance(statement, ast.AnnAssign) and statement.value is value:
89
- target = statement.target
90
- else:
91
- return None
86
+ match statement:
87
+ case ast.Assign() if len(statement.targets) == 1 and statement.value is value:
88
+ target = statement.targets[0]
89
+ case ast.AnnAssign() if statement.value is value:
90
+ target = statement.target
91
+ case _:
92
+ return None
92
93
  if not isinstance(context.parents.get(statement), ast.Module | ast.FunctionDef | ast.AsyncFunctionDef):
93
94
  return None
94
95
  return target if isinstance(target, ast.Name) and stable_binding(context, target.id, target) is target else None
@@ -146,12 +146,15 @@ def inert_direct_model_body(cls: ast.ClassDef, imports: ImportIndex) -> bool:
146
146
 
147
147
 
148
148
  def _model_literal_value(node: ast.expr | None) -> PythonLiteral:
149
- if isinstance(node, ast.Constant):
150
- return node.value
151
- if isinstance(node, ast.UnaryOp) and isinstance(node.op, ast.USub) and isinstance(node.operand, ast.Constant):
152
- numeric = _model_numeric_value(node.operand.value)
153
- if numeric is not None:
154
- return -numeric
149
+ match node:
150
+ case ast.Constant():
151
+ return node.value
152
+ case ast.UnaryOp() if isinstance(node.op, ast.USub) and isinstance(node.operand, ast.Constant):
153
+ numeric = _model_numeric_value(node.operand.value)
154
+ if numeric is not None:
155
+ return -numeric
156
+ case _:
157
+ pass
155
158
  return None
156
159
 
157
160
 
@@ -37,10 +37,13 @@ def is_logger_expr(expr: ast.expr) -> bool:
37
37
  return is_logger_expr(value)
38
38
  case ast.Call(func=callee):
39
39
  # A factory name denotes a logger only when called; otherwise it is merely a function.
40
- if isinstance(callee, ast.Attribute) and callee.attr.lower() in _LOGGER_FACTORIES:
41
- return True
42
- if isinstance(callee, ast.Name) and callee.id.lower() in _LOGGER_FACTORIES:
43
- return True
40
+ match callee:
41
+ case ast.Attribute() if callee.attr.lower() in _LOGGER_FACTORIES:
42
+ return True
43
+ case ast.Name() if callee.id.lower() in _LOGGER_FACTORIES:
44
+ return True
45
+ case _:
46
+ pass
44
47
  return is_logger_expr(callee)
45
48
  case _:
46
49
  return False