sarj-python-lint 1.143.0__tar.gz → 1.144.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (344) hide show
  1. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/PKG-INFO +1 -1
  2. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/pyproject.toml +1 -1
  3. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/_rule_descriptors.py +10 -1
  4. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_registry.py +2 -0
  5. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_excessive_cognitive_complexity.py +5 -7
  6. sarj_python_lint-1.144.1/src/sarj_python_lint/rules/no_nonlocal_statement.py +103 -0
  7. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_coordinated_state_owner.py +6 -55
  8. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_self_type_annotation.py +5 -6
  9. sarj_python_lint-1.143.0/src/sarj_python_lint/rules/_coordinated_scalar_state.py +0 -301
  10. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/.gitignore +0 -0
  11. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/LICENSE +0 -0
  12. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/README.md +0 -0
  13. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/__init__.py +0 -0
  14. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/__main__.py +0 -0
  15. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/_analysis_session.py +0 -0
  16. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/_autofix.py +0 -0
  17. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/_autofix_aliases.py +0 -0
  18. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/_autofix_annotations.py +0 -0
  19. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/_autofix_comments.py +0 -0
  20. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/_autofix_declared_contracts.py +0 -0
  21. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/_autofix_declared_tests.py +0 -0
  22. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/_autofix_docs.py +0 -0
  23. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/_autofix_enums.py +0 -0
  24. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/_autofix_exhaustiveness.py +0 -0
  25. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/_autofix_inert.py +0 -0
  26. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/_autofix_parameters.py +0 -0
  27. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/_autofix_repeated.py +0 -0
  28. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/_autofix_security.py +0 -0
  29. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/_autofix_sql_projection.py +0 -0
  30. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/_autofix_tests.py +0 -0
  31. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/_closed_sql_literal.py +0 -0
  32. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/_file_context.py +0 -0
  33. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/_filesystem.py +0 -0
  34. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/_fixes.py +0 -0
  35. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/_parallel.py +0 -0
  36. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/_prepared_sources.py +0 -0
  37. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/_python_target.py +0 -0
  38. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/_ratchet_cli.py +0 -0
  39. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/_secret_names.py +0 -0
  40. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/_source.py +0 -0
  41. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/_version.py +0 -0
  42. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/application_logging.py +0 -0
  43. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/autofix.py +0 -0
  44. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/benchmark.py +0 -0
  45. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/cast_access.py +0 -0
  46. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/interpreter_argv.py +0 -0
  47. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/json_boundary.py +0 -0
  48. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/py.typed +0 -0
  49. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/ratchet.py +0 -0
  50. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rule_base.py +0 -0
  51. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rule_metadata.py +0 -0
  52. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/__init__.py +0 -0
  53. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_annotation_origins.py +0 -0
  54. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_annotation_semantics.py +0 -0
  55. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_ast_index.py +0 -0
  56. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_ast_names.py +0 -0
  57. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_ast_position.py +0 -0
  58. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_async_lifecycle.py +0 -0
  59. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_binding_inventory.py +0 -0
  60. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_closed_helpers.py +0 -0
  61. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_comment_narration.py +0 -0
  62. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_comments.py +0 -0
  63. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_contract_annotation.py +0 -0
  64. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_copy_on_write.py +0 -0
  65. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_data_union_discriminator.py +0 -0
  66. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_declared_contracts.py +0 -0
  67. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_dict_key_views.py +0 -0
  68. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_docstrings.py +0 -0
  69. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_exports.py +0 -0
  70. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_fastapi.py +0 -0
  71. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_fastapi_access.py +0 -0
  72. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_first_party.py +0 -0
  73. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_fixed_record.py +0 -0
  74. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_fixture_contracts.py +0 -0
  75. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_generic_payload.py +0 -0
  76. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_httpx_clients.py +0 -0
  77. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_imports.py +0 -0
  78. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_inert_model_annotation.py +0 -0
  79. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_inherited_contract.py +0 -0
  80. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_local_alias_fix.py +0 -0
  81. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_local_source.py +0 -0
  82. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_logging.py +0 -0
  83. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_loguru.py +0 -0
  84. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_mapping_shape_callbacks.py +0 -0
  85. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_namespace_access.py +0 -0
  86. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_native_namespace_capability.py +0 -0
  87. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_native_object_contracts.py +0 -0
  88. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_nominal_project.py +0 -0
  89. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_nullable_outcome.py +0 -0
  90. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_numeric_proof.py +0 -0
  91. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_opaque_contracts.py +0 -0
  92. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_paths.py +0 -0
  93. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_postgres.py +0 -0
  94. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_project_index.py +0 -0
  95. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_prose_budget.py +0 -0
  96. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_pydantic_field_contract.py +0 -0
  97. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_pytest.py +0 -0
  98. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_pytest_contract_parameters.py +0 -0
  99. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_resolved_operation_signature.py +0 -0
  100. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_resource_provenance.py +0 -0
  101. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_route_shapes.py +0 -0
  102. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_runtime_bindings.py +0 -0
  103. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_runtime_names.py +0 -0
  104. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_runtime_registry.py +0 -0
  105. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_service_http_callbacks.py +0 -0
  106. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_set_fields.py +0 -0
  107. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_sql.py +0 -0
  108. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_static_json_alias.py +0 -0
  109. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_store_sql.py +0 -0
  110. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_store_writes.py +0 -0
  111. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_suppression_comments.py +0 -0
  112. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_test_assertions.py +0 -0
  113. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_test_composition.py +0 -0
  114. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_test_provenance.py +0 -0
  115. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_transactional_sql.py +0 -0
  116. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_type_guard_symbols.py +0 -0
  117. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/_value_models.py +0 -0
  118. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/async_cleanup_registered_synchronously.py +0 -0
  119. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/async_executor_shutdown.py +0 -0
  120. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/async_mock_call_without_await_assertion.py +0 -0
  121. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/async_subprocess_cancellation_cleanup.py +0 -0
  122. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/cancel_owned_task_without_join.py +0 -0
  123. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/complex_postgres_query_requires_architecture_review.py +0 -0
  124. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/defect_xfail_requires_explicit_strict.py +0 -0
  125. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/delete_route_returns_no_content.py +0 -0
  126. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/docstring_args_restate_signature.py +0 -0
  127. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/docstring_returns_restate_signature.py +0 -0
  128. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/duplicate_adjacent_exception_handler.py +0 -0
  129. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/duplicate_closed_pure_helper.py +0 -0
  130. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/duplicate_pytest_fixture_params.py +0 -0
  131. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/excessive_commentary.py +0 -0
  132. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/failed_probe_zero_threshold.py +0 -0
  133. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/fakes_in_shared_location.py +0 -0
  134. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/fastapi_class_router_contract.py +0 -0
  135. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/fastapi_explicit_openapi_contract.py +0 -0
  136. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/fastapi_route_declares_security.py +0 -0
  137. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/iac_source_coupled_test.py +0 -0
  138. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/invalid_pydantic_field_default.py +0 -0
  139. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/mock_without_spec.py +0 -0
  140. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/named_record_at_boundaries.py +0 -0
  141. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/nan_hidden_by_builtin_min.py +0 -0
  142. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/negative_only_http_status_assertion.py +0 -0
  143. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_analytical_aggregation_in_postgres_store.py +0 -0
  144. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_any_mapping_types.py +0 -0
  145. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_async_client_in_constructor.py +0 -0
  146. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_async_function_cache.py +0 -0
  147. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_before_validator_input_mutation.py +0 -0
  148. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_blanket_suppression.py +0 -0
  149. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_broad_keyword_capture.py +0 -0
  150. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_comment_cruft.py +0 -0
  151. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_conflicting_pydantic_alias_validation.py +0 -0
  152. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_conftest_test_module_import.py +0 -0
  153. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_contradictory_type_guard.py +0 -0
  154. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_copied_inherited_docstring.py +0 -0
  155. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_cors_wildcard_with_credentials.py +0 -0
  156. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_create_verb_in_post_path.py +0 -0
  157. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_custom_control_flow_exception.py +0 -0
  158. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_database_programmability.py +0 -0
  159. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_defaulted_environment_setting.py +0 -0
  160. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_delete_statement.py +0 -0
  161. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_discarded_tagged_outcome.py +0 -0
  162. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_discarded_validation_result.py +0 -0
  163. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_dual_shape_model_field_reader.py +0 -0
  164. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_dunder_all.py +0 -0
  165. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_duplicate_dunder_all_entry.py +0 -0
  166. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_duplicate_field_validator_body.py +0 -0
  167. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_dynamic_builtins.py +0 -0
  168. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_exception_text_in_500_detail.py +0 -0
  169. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_fastapi_on_event.py +0 -0
  170. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_file_level_escape_hatch_suppression.py +0 -0
  171. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_first_party_private_import.py +0 -0
  172. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_fixed_sleep_before_assert.py +0 -0
  173. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_fixed_sleep_in_loop.py +0 -0
  174. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_folded_bad_request_not_found.py +0 -0
  175. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_frozen_after_validator_field_write.py +0 -0
  176. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_generic_json_parser.py +0 -0
  177. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_generic_single_export_module.py +0 -0
  178. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_hasattr.py +0 -0
  179. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_hidden_constructor_fallback.py +0 -0
  180. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_impossible_pydantic_field_bounds.py +0 -0
  181. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_injected_module_loader.py +0 -0
  182. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_input_model_mutation.py +0 -0
  183. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_interpreter_source_arguments.py +0 -0
  184. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_invalid_argument_name_suppression.py +0 -0
  185. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_invalid_pydantic_bypass.py +0 -0
  186. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_invalid_pydantic_validator_return.py +0 -0
  187. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_loguru_exc_info.py +0 -0
  188. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_loguru_printf_format.py +0 -0
  189. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_magic_arithmetic.py +0 -0
  190. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_mocked_pydantic_value_object.py +0 -0
  191. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_mutating_container_transform.py +0 -0
  192. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_mutating_input_with_result.py +0 -0
  193. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_nested_pydantic_field_validator.py +0 -0
  194. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_nullable_dependency_fallback.py +0 -0
  195. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_offset_pagination.py +0 -0
  196. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_partial_type_is.py +0 -0
  197. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_positional_psycopg_row_escape.py +0 -0
  198. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_psycopg_execution_in_loop.py +0 -0
  199. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_psycopg_execution_outside_injected_owner.py +0 -0
  200. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_random_uuid_in_sql.py +0 -0
  201. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_raw_connection_in_tests.py +0 -0
  202. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_raw_source_text_test_oracle.py +0 -0
  203. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_recording_store.py +0 -0
  204. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_redundant_attribute_unpacking.py +0 -0
  205. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_redundant_literal_description.py +0 -0
  206. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_redundant_local_alias.py +0 -0
  207. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_redundant_module_alias_exports.py +0 -0
  208. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_redundant_sql_alias.py +0 -0
  209. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_repeated_string_literal.py +0 -0
  210. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_repeated_test_body.py +0 -0
  211. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_restated_comment.py +0 -0
  212. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_secret_in_log.py +0 -0
  213. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_select_star.py +0 -0
  214. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_service_behavior_in_settings.py +0 -0
  215. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_shallow_container_type_guard.py +0 -0
  216. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_shallow_record_type_guard.py +0 -0
  217. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_shared_mutable_default.py +0 -0
  218. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_slash_collection_root_under_prefix.py +0 -0
  219. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_string_concat_in_loop.py +0 -0
  220. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_swallowed_asyncio_cancellation.py +0 -0
  221. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_sys_path_mutation.py +0 -0
  222. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_tautological_expect.py +0 -0
  223. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_test_comments.py +0 -0
  224. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_test_method_grafting.py +0 -0
  225. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_typed_doc_sections.py +0 -0
  226. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_unique_violation_message_match.py +0 -0
  227. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_unknown_pydantic_validator_field.py +0 -0
  228. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_unnecessary_docstring.py +0 -0
  229. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_unobserved_task_exception.py +0 -0
  230. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_unscoped_async_client_factory.py +0 -0
  231. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_unused_copy_result.py +0 -0
  232. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_unused_underscored_keyword_parameter.py +0 -0
  233. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_unused_value_marker.py +0 -0
  234. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_vague_suppression_description.py +0 -0
  235. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_whole_request_response_payload_in_log.py +0 -0
  236. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/no_work_verb_get_route.py +0 -0
  237. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/numeric_literal_separators.py +0 -0
  238. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/opaque_parametrize_case_needs_id.py +0 -0
  239. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/over_mocked_test.py +0 -0
  240. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/phase_label_comment.py +0 -0
  241. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_application_model_joins.py +0 -0
  242. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_autospec_for_callable_mock.py +0 -0
  243. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_bulk_upsert.py +0 -0
  244. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_class_row.py +0 -0
  245. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_collection_comprehension.py +0 -0
  246. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_configured_cloud_scope.py +0 -0
  247. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_constant_time_secret_compare.py +0 -0
  248. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_declarative_batch_validation.py +0 -0
  249. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_direct_import_module.py +0 -0
  250. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_discriminated_model_union.py +0 -0
  251. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_explicit_class_contract.py +0 -0
  252. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_explicit_value_model_construction.py +0 -0
  253. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_fstring_over_concat.py +0 -0
  254. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_grouped_settings.py +0 -0
  255. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_immutable_module_constant.py +0 -0
  256. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_injected_dependency_over_monkeypatch.py +0 -0
  257. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_injected_service.py +0 -0
  258. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_library_fake.py +0 -0
  259. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_match_assert_never.py +0 -0
  260. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_match_exception_dispatch.py +0 -0
  261. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_match_type_dispatch.py +0 -0
  262. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_match_value_dispatch.py +0 -0
  263. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_module_level_constant.py +0 -0
  264. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_monkeypatch_for_process_state_in_test.py +0 -0
  265. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_monotonic_for_elapsed_time.py +0 -0
  266. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_namedtuple_over_tuple_return.py +0 -0
  267. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_native_string_check.py +0 -0
  268. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_nominal_id_types.py +0 -0
  269. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_nominal_mapping_keys.py +0 -0
  270. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_non_nullable_collection.py +0 -0
  271. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_optional_composite.py +0 -0
  272. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_or_pattern.py +0 -0
  273. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_outcome_variants.py +0 -0
  274. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_precise_object_contract.py +0 -0
  275. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_psycopg_executemany.py +0 -0
  276. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_pydantic_json_value.py +0 -0
  277. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_pydantic_model_assertion.py +0 -0
  278. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_pytest_dependency_fixtures.py +0 -0
  279. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_pytest_fixture_contract.py +0 -0
  280. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_pytest_fixture_injection.py +0 -0
  281. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_regex_fullmatch.py +0 -0
  282. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_required_constructor_parameters.py +0 -0
  283. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_runtime_validation.py +0 -0
  284. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_self_documenting_constant.py +0 -0
  285. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_semantic_temporal_types.py +0 -0
  286. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_set_isdisjoint.py +0 -0
  287. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_single_psycopg_cursor.py +0 -0
  288. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_str_enum.py +0 -0
  289. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_struct_over_namedtuple.py +0 -0
  290. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_typed_cli.py +0 -0
  291. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_typed_mapping_get.py +0 -0
  292. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_typed_settings_field.py +0 -0
  293. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_validated_uuid_comparison.py +0 -0
  294. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_walrus_awaited_none_guard.py +0 -0
  295. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_walrus_comprehension_filter.py +0 -0
  296. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_walrus_regex_match.py +0 -0
  297. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/prefer_walrus_stream_loop.py +0 -0
  298. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/production_derived_test_cases.py +0 -0
  299. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/psycopg_sql_format_field_mismatch.py +0 -0
  300. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/pytest_fixture_returns_bare_tuple.py +0 -0
  301. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/pytest_fixture_returns_closed_resource.py +0 -0
  302. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/redundant_class_docstring.py +0 -0
  303. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/redundant_docstring.py +0 -0
  304. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/redundant_module_docstring.py +0 -0
  305. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/redundant_test_constructor_forwarder.py +0 -0
  306. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/repeated_kwarg_heavy_call_in_test.py +0 -0
  307. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/repeated_static_call_cases.py +0 -0
  308. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/repeated_test_composition.py +0 -0
  309. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/repeated_unimplemented_test_contract.py +0 -0
  310. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/require_constrained_api_integer.py +0 -0
  311. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/require_exp_on_jwt_decode.py +0 -0
  312. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/require_explicit_contract_implementation.py +0 -0
  313. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/require_explicit_psycopg_transaction.py +0 -0
  314. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/require_explicit_service_contract.py +0 -0
  315. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/require_hidden_settings_input.py +0 -0
  316. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/require_injectable_retry_sleep.py +0 -0
  317. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/require_keyword_only_swap_prone_params.py +0 -0
  318. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/require_nodecode_for_splitting_settings_field.py +0 -0
  319. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/require_port_for_service.py +0 -0
  320. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/require_precise_factory_signature.py +0 -0
  321. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/require_public_dependency_contract.py +0 -0
  322. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/require_pydantic_for_external_json.py +0 -0
  323. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/require_pydantic_for_mapping_shape.py +0 -0
  324. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/require_pydantic_for_structured_payload.py +0 -0
  325. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/require_pydantic_ordinal_lower_bound.py +0 -0
  326. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/restated_test_docstring.py +0 -0
  327. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/service_singleton_delegates_to_bulk.py +0 -0
  328. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/shared_mutable_pydantic_factory.py +0 -0
  329. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/stepdown.py +0 -0
  330. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/store_field_update_reuses_upsert.py +0 -0
  331. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/store_get_delegates_to_bulk_read.py +0 -0
  332. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/store_insert_requires_explicit_conflict_policy.py +0 -0
  333. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/store_insert_requires_on_conflict.py +0 -0
  334. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/store_mutation_command_fanout.py +0 -0
  335. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/subprocess_kill_without_reap.py +0 -0
  336. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/test_without_explicit_oracle.py +0 -0
  337. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/timestamp_order_requires_tiebreaker.py +0 -0
  338. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/trailing_value_narration.py +0 -0
  339. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/typed_error_reasons.py +0 -0
  340. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/uncontrolled_randomness_in_test.py +0 -0
  341. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/unused_mock_setup.py +0 -0
  342. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/rules/unused_test_factory_option.py +0 -0
  343. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/sql_literals.py +0 -0
  344. {sarj_python_lint-1.143.0 → sarj_python_lint-1.144.1}/src/sarj_python_lint/suppression_policy.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: sarj-python-lint
3
- Version: 1.143.0
3
+ Version: 1.144.1
4
4
  Summary: Custom Python lint rules — AST-based, pre-commit-friendly, hypermodern defaults
5
5
  Project-URL: Homepage, https://code-standards.sarj.ai/rules/python/
6
6
  Project-URL: Documentation, https://code-standards.sarj.ai/rules/python/
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "sarj-python-lint"
3
- version = "1.143.0"
3
+ version = "1.144.1"
4
4
  description = "Custom Python lint rules — AST-based, pre-commit-friendly, hypermodern defaults"
5
5
  readme = "README.md"
6
6
  authors = [{ name = "sarj-ai" }]
@@ -8,6 +8,15 @@ 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("no-nonlocal-statement"),
13
+ module="sarj_python_lint.rules.no_nonlocal_statement",
14
+ class_name="NoNonlocalStatement",
15
+ code="SARJ578",
16
+ description="Reject `nonlocal` statements; pass state explicitly or give it a typed owner.",
17
+ aliases=(),
18
+ enabled_by_default=True,
19
+ ),
11
20
  RuleDescriptor(
12
21
  rule_id=RuleId("no-unscoped-async-client-factory"),
13
22
  module="sarj_python_lint.rules.no_unscoped_async_client_factory",
@@ -112,7 +121,7 @@ DESCRIPTORS: tuple[RuleDescriptor, ...] = (
112
121
  module="sarj_python_lint.rules.prefer_coordinated_state_owner",
113
122
  class_name="PreferCoordinatedStateOwner",
114
123
  code="SARJ565",
115
- description="Review coordinated dictionary entries and ownership-guarded scalar state for one typed owner.",
124
+ description="Review dictionaries with repeated same-key writes and removals for one typed owner.",
116
125
  aliases=(),
117
126
  enabled_by_default=True,
118
127
  ),
@@ -252,6 +252,7 @@ from sarj_python_lint.rules.no_impossible_pydantic_field_bounds import NoImpossi
252
252
  from sarj_python_lint.rules.no_invalid_pydantic_bypass import NoInvalidPydanticBypass
253
253
  from sarj_python_lint.rules.no_invalid_pydantic_validator_return import NoInvalidPydanticValidatorReturn
254
254
  from sarj_python_lint.rules.no_magic_arithmetic import NoMagicArithmetic
255
+ from sarj_python_lint.rules.no_nonlocal_statement import NoNonlocalStatement
255
256
  from sarj_python_lint.rules.no_partial_type_is import NoPartialTypeIs
256
257
  from sarj_python_lint.rules.no_psycopg_execution_in_loop import NoPsycopgExecutionInLoop
257
258
  from sarj_python_lint.rules.no_recording_store import NoRecordingStore
@@ -304,6 +305,7 @@ from sarj_python_lint.rules.test_without_explicit_oracle import NoExplicitTestOr
304
305
 
305
306
  _AUTHORING_REGISTRY: Mapping[str, type[Rule]] = MappingProxyType(
306
307
  {
308
+ NoNonlocalStatement.id: NoNonlocalStatement,
307
309
  NoUnscopedAsyncClientFactory.id: NoUnscopedAsyncClientFactory,
308
310
  PsycopgSqlFormatFieldMismatch.id: PsycopgSqlFormatFieldMismatch,
309
311
  NoUnobservedTaskException.id: NoUnobservedTaskException,
@@ -126,22 +126,20 @@ class _Complexity:
126
126
  self.visit_all(body, nesting + 1)
127
127
 
128
128
  def visit_boolean(self, node: ast.BoolOp, nesting: int) -> None:
129
- previous: type[ast.boolop] | None = None
130
-
131
- def flatten(expression: ast.expr) -> None:
132
- nonlocal previous
129
+ def flatten(expression: ast.expr, previous: type[ast.boolop] | None) -> type[ast.boolop] | None:
133
130
  if not isinstance(expression, ast.BoolOp):
134
131
  self.visit(expression, nesting)
135
- return
132
+ return previous
136
133
  for index, value in enumerate(expression.values):
137
134
  if index:
138
135
  operator = type(expression.op)
139
136
  if operator is not previous:
140
137
  self.add(expression, 0, "and" if operator is ast.And else "or")
141
138
  previous = operator
142
- flatten(value)
139
+ previous = flatten(value, previous)
140
+ return previous
143
141
 
144
- flatten(node)
142
+ flatten(node, None)
145
143
 
146
144
  def visit_comprehension(
147
145
  self, node: ast.ListComp | ast.SetComp | ast.DictComp | ast.GeneratorExp, nesting: int
@@ -0,0 +1,103 @@
1
+ from __future__ import annotations
2
+
3
+ import ast
4
+ from pathlib import PurePosixPath
5
+ from typing import TYPE_CHECKING, ClassVar, final, override
6
+
7
+ from sarj_python_lint.rule_base import (
8
+ AutofixPolicy,
9
+ Diagnostic,
10
+ ExampleFile,
11
+ ExampleOutcome,
12
+ Rule,
13
+ RuleCategory,
14
+ RuleDocumentation,
15
+ RuleExample,
16
+ Severity,
17
+ )
18
+
19
+
20
+ if TYPE_CHECKING:
21
+ from sarj_python_lint._file_context import PythonFileContext
22
+
23
+
24
+ @final
25
+ class NoNonlocalStatement(Rule):
26
+ id = "no-nonlocal-statement"
27
+ code = "SARJ578"
28
+ documentation: ClassVar[RuleDocumentation | None] = RuleDocumentation(
29
+ default_level=Severity.ERROR,
30
+ summary="Reject `nonlocal` statements; pass state explicitly or give it a typed owner.",
31
+ rationale=(
32
+ "Rebinding an enclosing function's variables hides state changes across callable boundaries. "
33
+ "An explicit return value or typed state owner makes that dependency visible."
34
+ ),
35
+ remediation=(
36
+ "Return the updated value and assign it in the caller, or move callback state onto a typed owner. "
37
+ "Do not just delete the declaration: that changes Python's name binding and can break the callable."
38
+ ),
39
+ category=RuleCategory.MAINTAINABILITY,
40
+ autofix=AutofixPolicy.NONE,
41
+ limitations=(
42
+ "Every authored Python nonlocal statement is reported once, including read-only declarations and multiple names.",
43
+ "Ruff PLW0602, PLW0603 and PLW0604 own the separate global-statement ban; this rule does not duplicate them.",
44
+ "Comments, strings, generated and vendored sources are excluded. Malformed source is left to the syntax checker.",
45
+ "There is no automatic fix because rewriting closure state requires a semantic change.",
46
+ ),
47
+ examples=(
48
+ RuleExample(
49
+ example_id="hidden-closure-rebinding",
50
+ title="A callback rebinds its enclosing function's state",
51
+ outcome=ExampleOutcome.MATCH,
52
+ files=(
53
+ ExampleFile.python(
54
+ "app/counter.py",
55
+ "def increment(value: int) -> int:\n"
56
+ " def update() -> None:\n"
57
+ " nonlocal value\n"
58
+ " value += 1\n"
59
+ " update()\n"
60
+ " return value\n",
61
+ ),
62
+ ),
63
+ focus_path=PurePosixPath("app/counter.py"),
64
+ expected_count=1,
65
+ public=True,
66
+ ),
67
+ RuleExample(
68
+ example_id="explicit-state-return",
69
+ title="The caller assigns an explicit return value",
70
+ outcome=ExampleOutcome.NO_MATCH,
71
+ files=(
72
+ ExampleFile.python(
73
+ "app/counter.py",
74
+ "def increment(value: int) -> int:\n"
75
+ " def update(current: int) -> int:\n"
76
+ " return current + 1\n"
77
+ " return update(value)\n",
78
+ ),
79
+ ),
80
+ focus_path=PurePosixPath("app/counter.py"),
81
+ expected_count=0,
82
+ public=True,
83
+ ),
84
+ ),
85
+ )
86
+ description = documentation.summary
87
+
88
+ @override
89
+ def check_context(self, context: PythonFileContext) -> list[Diagnostic]:
90
+ if "nonlocal" not in context.source or context.generated or context.tree is None:
91
+ return []
92
+ return [
93
+ Diagnostic(
94
+ path=context.path,
95
+ line=node.lineno,
96
+ col=node.col_offset + 1,
97
+ code=self.code,
98
+ message="`nonlocal` hides closure rebinding; return the updated value or use an explicit typed state owner.",
99
+ severity=Severity.ERROR,
100
+ )
101
+ for node in context.nodes(ast.Nonlocal)
102
+ if not context.suppressions.is_suppressed(node.lineno, self.code)
103
+ ]
@@ -18,7 +18,6 @@ from sarj_python_lint.rule_base import (
18
18
  Severity,
19
19
  )
20
20
  from sarj_python_lint.rules._ast_index import statement_blocks
21
- from sarj_python_lint.rules._coordinated_scalar_state import coordinated_scalar_state_diagnostics
22
21
  from sarj_python_lint.rules._native_namespace_capability import native_namespace_capability_escapes
23
22
  from sarj_python_lint.rules._paths import is_test_path
24
23
 
@@ -64,27 +63,6 @@ class Playback:
64
63
  def finish(self, key: str) -> None:
65
64
  self._active.pop(key, None)
66
65
  """
67
- _SCALAR_BAD = """from app.session import Session, Handle
68
- def finish(session: Session, expected: Handle) -> None:
69
- state = session.state
70
- if state.resource is expected:
71
- state.resource = None
72
- state.started = False
73
- def answer_ready(session: Session) -> None:
74
- resource = session.state.resource
75
- if resource is not None and not session.state.started:
76
- resource.interrupt()
77
- """
78
- _SCALAR_GOOD = """from app.session import Session, Handle
79
- def finish(session: Session, expected: Handle) -> None:
80
- state = session.state
81
- if state.playback is not None and state.playback.handle is expected:
82
- state.playback = None
83
- def answer_ready(session: Session) -> None:
84
- playback = session.state.playback
85
- if playback is not None and not playback.started:
86
- playback.handle.interrupt()
87
- """
88
66
 
89
67
 
90
68
  @dataclass(frozen=True)
@@ -115,26 +93,22 @@ class PreferCoordinatedStateOwner(Rule):
115
93
  code = "SARJ565"
116
94
  documentation = RuleDocumentation(
117
95
  default_level=Severity.WARNING,
118
- summary="Review coordinated dictionary entries and ownership-guarded scalar state for one typed owner.",
96
+ summary="Review dictionaries with repeated same-key writes and removals for one typed owner.",
119
97
  rationale=(
120
98
  "Repeated same-key writes and removals in separate dictionaries distribute a possible entry-lifetime "
121
- "invariant across writers. Ownership-guarded scalar resets and joint resource-consuming guards can "
122
- "show the same split lifetime. One typed owner can hold coordinated values. This is structural evidence "
99
+ "invariant across writers. One typed owner can hold the coordinated values. This is structural evidence "
123
100
  "for review, not proof of a defect or a shared domain lifetime."
124
101
  ),
125
102
  remediation=(
126
103
  "Review the reported fields, writers and readers. If entries have one lifetime, use one dictionary "
127
- "of typed owner records, or an optional scalar owner with its required resource and flag. Preserve "
128
- "each value's annotation, task identities, start/stop order, "
104
+ "of typed owner records retaining each value's annotation. Preserve task identities, start/stop order, "
129
105
  "exception observation, cancellation and joining. Keep independent outcome reporting, historical "
130
106
  "observations, partial results and independently removed entries separate."
131
107
  ),
132
108
  category=RuleCategory.ARCHITECTURE,
133
109
  autofix=AutofixPolicy.NONE,
134
110
  limitations=(
135
- "Scalar mode requires direct undecorated module functions with matching resolved root annotations (including generic arguments) and member paths. One function must reset sibling members to None/False consecutively under resource identity against a distinct parameter. Another must jointly check presence and a falsey flag before directly invoking the same resource. Only unique immediately preceding aliases are followed; consumer functions with direct attribute writes abstain. Existing composed owners do not match.",
136
- "Scalar correspondence is nominal structural evidence, not proof of member types, shared runtime instances or a defective design. Independent authentication/cancellation flags and externally mandated records need review. Untyped/Any/object roots, ambiguous or rebound aliases, stale snapshots, arbitrary predicates, unrelated calls, decorated/generic function scopes and unsupported annotation expressions abstain. Scalar analysis is bounded to 8192 file nodes, 4096 nodes per function and alias/annotation depth 8.",
137
- "Warning only. Names and field counts never establish a finding. Dictionary groups require consecutive same-key assignments and consecutive same-key removals in different function scopes. Every observed per-key mutation of every member inside the class must participate. Writers and readers outside that receiver scope are not inferred. Maximal dictionary groups are preferred, and disjoint groups can report separately without repeating fields.",
111
+ "Warning only. Names and field counts never establish a finding. Each reported group requires consecutive same-key assignments and consecutive same-key removals in different function scopes. Every observed per-key mutation of every member inside the class must participate. Writers and readers outside that receiver scope are not inferred. Maximal groups are preferred, and disjoint groups can report separately without repeating fields.",
138
112
  "Distinct private receiver fields must be initialized directly to empty dict literals or unshadowed dict() calls in a synchronous __init__, with builtin dict annotations and the same unshadowed str, int or bytes key type. Annotations may be inline or unique annotation-only class declarations. Keys resolve to the same unchanged parameter with that explicit type. Receivers resolve by binding, including captures in nested callbacks. Shadowed parameters are distinct; ambiguous rebinding abstains. Private names use lexical class mangling, including explicitly mangled aliases; mangled names over 255 characters abstain.",
139
113
  "Subscript writes may insert or overwrite; key existence is not inferred. Only direct subscript assignment/deletion and direct pop(key[, None]) statements are mutations. Subscript reads and get/items/keys/values/copy calls are inventoried. Aliases/escapes, escaped bound methods, class/state reflection including implicit super()/__class__ access, replacement, augmented mutation, other methods, unpaired writes, unknown bases/decorators, stored class attributes, nested classes, generic scopes and ambiguous namespaces abstain. A proven builtin object base and import-proven typing.final class/method decorators are allowed. Classes over 4096 nodes, 16 candidate fields or 256 distinct mutation groups, and test/generated/malformed files, are excluded.",
140
114
  "The rule does not prove atomic updates, equal key sets, reachable paths, cross-module ownership or runtime value types. Calls can raise and async callbacks can interleave. Explicit await/yield or implicit async-comprehension suspension inside an operation, or any intervening statement, prevents a group. Helper-mediated coordination and independently removed entries remain unsupported. Mirrored indexes or protocol-mandated stores can legitimately match; use a reasoned exact-code suppression after review.",
@@ -159,26 +133,6 @@ class PreferCoordinatedStateOwner(Rule):
159
133
  expected_count=0,
160
134
  public=True,
161
135
  ),
162
- RuleExample(
163
- example_id="ownership-guarded-scalar-lifecycle",
164
- scenario="scalar-lifecycle",
165
- title="A resource and flag repeat ownership-dependent state across functions",
166
- outcome=ExampleOutcome.MATCH,
167
- files=(ExampleFile.python("playback.py", _SCALAR_BAD),),
168
- focus_path=PurePosixPath("playback.py"),
169
- expected_count=1,
170
- public=True,
171
- ),
172
- RuleExample(
173
- example_id="optional-composed-playback",
174
- scenario="scalar-lifecycle",
175
- title="An optional playback owner retains its required handle and started state",
176
- outcome=ExampleOutcome.NO_MATCH,
177
- files=(ExampleFile.python("playback.py", _SCALAR_GOOD),),
178
- focus_path=PurePosixPath("playback.py"),
179
- expected_count=0,
180
- public=True,
181
- ),
182
136
  ),
183
137
  )
184
138
  description = documentation.summary
@@ -189,10 +143,7 @@ class PreferCoordinatedStateOwner(Rule):
189
143
  context.tree is None
190
144
  or context.generated
191
145
  or is_test_path(context.path)
192
- or not (
193
- "dict" in context.symbol_source
194
- or ("None" in context.symbol_source and "False" in context.symbol_source)
195
- )
146
+ or "dict" not in context.symbol_source
196
147
  ):
197
148
  return []
198
149
  provenance = context.static_resource_provenance
@@ -203,7 +154,7 @@ class PreferCoordinatedStateOwner(Rule):
203
154
  or native_namespace_capability_escapes(context)
204
155
  ):
205
156
  return []
206
- findings = coordinated_scalar_state_diagnostics(context, self.code)
157
+ findings: list[Diagnostic] = []
207
158
  for owner in context.tree.body:
208
159
  if isinstance(owner, ast.ClassDef) and _plain_class(owner, provenance):
209
160
  findings.extend(
@@ -436,9 +436,10 @@ class _MethodScopeFacts:
436
436
 
437
437
  def _method_scope_facts(node: ast.FunctionDef | ast.AsyncFunctionDef) -> _MethodScopeFacts:
438
438
  bindings: set[str] = set()
439
- has_yield = False
440
439
 
441
440
  class Visitor(ast.NodeVisitor):
441
+ has_yield: bool = False
442
+
442
443
  @override
443
444
  def visit_FunctionDef(self, node: ast.FunctionDef) -> None:
444
445
  bindings.add(node.name)
@@ -493,20 +494,18 @@ def _method_scope_facts(node: ast.FunctionDef | ast.AsyncFunctionDef) -> _Method
493
494
 
494
495
  @override
495
496
  def visit_Yield(self, node: ast.Yield) -> None:
496
- nonlocal has_yield
497
- has_yield = True
497
+ self.has_yield = True
498
498
  self.generic_visit(node)
499
499
 
500
500
  @override
501
501
  def visit_YieldFrom(self, node: ast.YieldFrom) -> None:
502
- nonlocal has_yield
503
- has_yield = True
502
+ self.has_yield = True
504
503
  self.generic_visit(node)
505
504
 
506
505
  visitor = Visitor()
507
506
  for statement in node.body:
508
507
  visitor.visit(statement)
509
- return _MethodScopeFacts(bindings=frozenset(bindings), is_generator=has_yield)
508
+ return _MethodScopeFacts(bindings=frozenset(bindings), is_generator=visitor.has_yield)
510
509
 
511
510
 
512
511
  def _is_final_class(node: ast.ClassDef, imports: ImportIndex) -> bool:
@@ -1,301 +0,0 @@
1
- from __future__ import annotations
2
-
3
- import ast
4
- from dataclasses import dataclass
5
- from itertools import pairwise
6
- from typing import TYPE_CHECKING
7
-
8
- from sarj_python_lint.rule_base import Diagnostic, Severity
9
- from sarj_python_lint.rules._annotation_origins import AnnotationOrigins
10
- from sarj_python_lint.rules._ast_index import statement_blocks
11
-
12
-
13
- if TYPE_CHECKING:
14
- from sarj_python_lint._file_context import PythonFileContext
15
-
16
-
17
- type _Function = ast.FunctionDef | ast.AsyncFunctionDef
18
- type _TypeKey = str | ast.ClassDef | tuple[_TypeKey, ...]
19
- _MAX_NODES = 8192
20
- _MAX_FUNCTION_NODES = 4096
21
- _MAX_DEPTH = 8
22
- _SCALAR_TYPES = frozenset({"str", "int", "bool", "bytes", "float"})
23
-
24
-
25
- @dataclass(frozen=True)
26
- class _AccessPath:
27
- root: ast.arg
28
- parts: tuple[str, ...]
29
-
30
-
31
- @dataclass(frozen=True)
32
- class _Member:
33
- root: ast.arg
34
- annotation: _TypeKey
35
- path: tuple[str, ...]
36
-
37
-
38
- @dataclass(frozen=True)
39
- class _Assignment:
40
- member: _Member
41
- value: bool | None
42
-
43
-
44
- @dataclass(frozen=True)
45
- class _Pair:
46
- annotation: _TypeKey
47
- owner_path: tuple[str, ...]
48
- resource: str
49
- flag: str
50
-
51
-
52
- @dataclass(frozen=True)
53
- class _Reset:
54
- pair: _Pair
55
- statement: ast.stmt
56
- function: _Function
57
-
58
-
59
- def coordinated_scalar_state_diagnostics(context: PythonFileContext, code: str) -> list[Diagnostic]:
60
- if context.tree is None or len(context.nodes(ast.AST)) > _MAX_NODES:
61
- return []
62
- facts = AnnotationOrigins(context)
63
- functions = [
64
- node
65
- for node in context.tree.body
66
- if isinstance(node, ast.FunctionDef | ast.AsyncFunctionDef)
67
- and not node.decorator_list
68
- and not node.type_params
69
- and len(list(ast.walk(node))) <= _MAX_FUNCTION_NODES
70
- ]
71
- consumers = _consumers(functions, facts)
72
- findings: list[Diagnostic] = []
73
- reported: set[_Pair] = set()
74
- for reset in _resets(functions, facts):
75
- if reset.pair in reported or reset.pair not in consumers:
76
- continue
77
- consumer, scope = consumers[reset.pair]
78
- if scope is reset.function or context.suppressions.is_suppressed(reset.statement.lineno, code):
79
- continue
80
- reported.add(reset.pair)
81
- findings.append(_diagnostic(reset, consumer, scope, context, code))
82
- return findings
83
-
84
-
85
- def _consumers(functions: list[_Function], facts: AnnotationOrigins) -> dict[_Pair, tuple[ast.If, _Function]]:
86
- consumers: dict[_Pair, tuple[ast.If, _Function]] = {}
87
- for function in functions:
88
- nodes = _owned_nodes(function, facts)
89
- if any(isinstance(node, ast.Attribute) and isinstance(node.ctx, ast.Store | ast.Del) for node in nodes):
90
- continue
91
- for node in nodes:
92
- if isinstance(node, ast.If) and (pair := _consumer(node, facts)) is not None:
93
- consumers.setdefault(pair, (node, function))
94
- return consumers
95
-
96
-
97
- def _resets(functions: list[_Function], facts: AnnotationOrigins) -> list[_Reset]:
98
- resets: list[_Reset] = []
99
- for function in functions:
100
- for node in _owned_nodes(function, facts):
101
- if not isinstance(node, ast.If):
102
- continue
103
- for first, second in pairwise(node.body):
104
- if (pair := _reset(node, first, second, facts)) is not None:
105
- resets.append(_Reset(pair, first, function))
106
- return resets
107
-
108
-
109
- def _diagnostic(reset: _Reset, consumer: ast.If, scope: _Function, context: PythonFileContext, code: str) -> Diagnostic:
110
- prefix = ".".join(reset.pair.owner_path)
111
- fields = ", ".join(f"`{prefix + '.' if prefix else ''}{name}`" for name in (reset.pair.resource, reset.pair.flag))
112
- return Diagnostic(
113
- context.path,
114
- reset.statement.lineno,
115
- reset.statement.col_offset + 1,
116
- code,
117
- f"{fields} have an ownership-guarded None/False reset at {reset.function.name}:{reset.statement.lineno} "
118
- f"and a joint resource-consuming guard at {scope.name}:{consumer.lineno}. "
119
- "If these values share one lifetime, use an optional typed owner with a non-null resource; "
120
- "preserve independent flags and external contracts after review.",
121
- severity=Severity.WARNING,
122
- )
123
-
124
-
125
- def _owned_nodes(function: _Function, facts: AnnotationOrigins) -> list[ast.AST]:
126
- return [node for node in ast.walk(function) if facts.provenance.scope(node) is function]
127
-
128
-
129
- def _reset(guard: ast.If, first: ast.stmt, second: ast.stmt, facts: AnnotationOrigins) -> _Pair | None:
130
- left = _literal_assignment(first, guard, facts)
131
- right = _literal_assignment(second, guard, facts)
132
- if left is None or right is None:
133
- return None
134
- resource, flag = (left, right) if left.value is None else (right, left)
135
- if resource.value is not None or flag.value is not False or (pair := _pair(resource.member, flag.member)) is None:
136
- return None
137
- match guard.test:
138
- case ast.Compare(left=left, ops=[ast.Is()], comparators=[right]):
139
- for owned, expected in ((left, right), (right, left)):
140
- if _member(owned, guard, facts) != resource.member:
141
- continue
142
- path = _path(expected, guard, facts)
143
- if path is not None and not path.parts and path.root is not resource.member.root:
144
- return pair
145
- case _:
146
- pass
147
- return None
148
-
149
-
150
- def _literal_assignment(statement: ast.stmt, guard: ast.If, facts: AnnotationOrigins) -> _Assignment | None:
151
- match statement:
152
- case ast.Assign(targets=[target], value=ast.Constant(value=value)) if value is None or value is False:
153
- member = _member(target, guard, facts)
154
- return _Assignment(member, value) if member is not None else None
155
- case _:
156
- return None
157
-
158
-
159
- def _consumer(node: ast.If, facts: AnnotationOrigins) -> _Pair | None:
160
- match node.test:
161
- case ast.BoolOp(op=ast.And(), values=[left, right]):
162
- for present, flag_test in ((left, right), (right, left)):
163
- resource = _present_member(present, node, facts)
164
- flag = _negative_member(flag_test, node, facts)
165
- if resource is not None and flag is not None and _controls_operation(node, resource, facts):
166
- return _pair(resource, flag)
167
- case _:
168
- pass
169
- return None
170
-
171
-
172
- def _negative_member(flag_test: ast.expr, guard: ast.If, facts: AnnotationOrigins) -> _Member | None:
173
- if not isinstance(flag_test, ast.UnaryOp) or not isinstance(flag_test.op, ast.Not):
174
- return None
175
- return _member(flag_test.operand, guard, facts)
176
-
177
-
178
- def _controls_operation(guard: ast.If, resource: _Member, facts: AnnotationOrigins) -> bool:
179
- for statement in guard.body:
180
- if _unsafe_prefix(statement, facts):
181
- return False
182
- if _direct_operation(statement, resource, guard, facts):
183
- return True
184
- return False
185
-
186
-
187
- def _present_member(node: ast.expr, guard: ast.If, facts: AnnotationOrigins) -> _Member | None:
188
- match node:
189
- case ast.Compare(left=left, ops=[ast.IsNot()], comparators=[right]):
190
- if isinstance(right, ast.Constant) and right.value is None:
191
- return _member(left, guard, facts)
192
- if isinstance(left, ast.Constant) and left.value is None:
193
- return _member(right, guard, facts)
194
- case _:
195
- pass
196
- return None
197
-
198
-
199
- def _direct_operation(statement: ast.stmt, resource: _Member, guard: ast.If, facts: AnnotationOrigins) -> bool:
200
- match statement:
201
- case ast.Expr(value=ast.Call(func=ast.Attribute(value=receiver))):
202
- return _member(receiver, guard, facts) == resource
203
- case _:
204
- return False
205
-
206
-
207
- def _unsafe_prefix(statement: ast.stmt, facts: AnnotationOrigins) -> bool:
208
- if not isinstance(statement, ast.Expr | ast.Pass):
209
- return True
210
- for node in ast.walk(statement):
211
- if isinstance(node, ast.Await | ast.Yield | ast.YieldFrom):
212
- return True
213
- if isinstance(node, ast.comprehension) and node.is_async:
214
- return True
215
- if isinstance(node, ast.Call) and any(
216
- facts.builtin(node.func, name, node.func) for name in ("setattr", "delattr")
217
- ):
218
- return True
219
- return False
220
-
221
-
222
- def _pair(resource: _Member, flag: _Member) -> _Pair | None:
223
- if resource.root is not flag.root or resource.path[:-1] != flag.path[:-1] or resource.path == flag.path:
224
- return None
225
- return _Pair(resource.annotation, resource.path[:-1], resource.path[-1], flag.path[-1])
226
-
227
-
228
- def _member(node: ast.expr, guard: ast.If, facts: AnnotationOrigins) -> _Member | None:
229
- path = _path(node, guard, facts)
230
- if path is None or not path.parts or path.root.annotation is None:
231
- return None
232
- annotation = _annotation_key(path.root.annotation, facts)
233
- return _Member(path.root, annotation, path.parts) if annotation is not None else None
234
-
235
-
236
- def _path(node: ast.expr, control: ast.stmt, facts: AnnotationOrigins, depth: int = 0) -> _AccessPath | None:
237
- if depth >= _MAX_DEPTH:
238
- return None
239
- if isinstance(node, ast.Attribute):
240
- parent = _path(node.value, control, facts, depth + 1)
241
- return _AccessPath(parent.root, (*parent.parts, node.attr)) if parent is not None else None
242
- if not isinstance(node, ast.Name):
243
- return None
244
- binding = facts.provenance.binding(node.id, node)
245
- if isinstance(binding, ast.arg):
246
- return _AccessPath(binding, ())
247
- if not isinstance(binding, ast.Name):
248
- return None
249
- statement = facts.context.parents.get(binding)
250
- if not isinstance(statement, ast.Assign) or len(statement.targets) != 1:
251
- return None
252
- if not _immediately_precedes(statement, control, facts):
253
- return None
254
- return _path(statement.value, statement, facts, depth + 1)
255
-
256
-
257
- def _immediately_precedes(statement: ast.stmt, control: ast.stmt, facts: AnnotationOrigins) -> bool:
258
- scope = facts.provenance.scope(statement)
259
- if not isinstance(scope, ast.FunctionDef | ast.AsyncFunctionDef):
260
- return False
261
- return any(
262
- first is statement and second is control
263
- for block in statement_blocks(scope.body)
264
- for first, second in pairwise(block)
265
- )
266
-
267
-
268
- def _annotation_key(
269
- node: ast.expr, facts: AnnotationOrigins, depth: int = 0, *, at: ast.expr | None = None
270
- ) -> _TypeKey | None:
271
- if depth >= _MAX_DEPTH or (resolved := facts.resolve_annotation(node, at=at)) is None:
272
- return None
273
- value = resolved.expression
274
- if isinstance(value, ast.Name | ast.Attribute):
275
- return _nominal_type_key(value, resolved.at, facts)
276
- if not isinstance(value, ast.Subscript):
277
- return None
278
- elements = value.slice.elts if isinstance(value.slice, ast.Tuple) else [value.slice]
279
- keys: list[_TypeKey] = []
280
- for part in [value.value, *elements]:
281
- key = _annotation_key(part, facts, depth + 1, at=resolved.at)
282
- if key is None:
283
- return None
284
- keys.append(key)
285
- return tuple(keys)
286
-
287
-
288
- def _nominal_type_key(value: ast.Name | ast.Attribute, at: ast.expr, facts: AnnotationOrigins) -> _TypeKey | None:
289
- qualified = facts.qualified(value, at)
290
- if qualified in {"typing.Any", "typing_extensions.Any", "builtins.object"}:
291
- return None
292
- if qualified is not None:
293
- return qualified
294
- if not isinstance(value, ast.Name):
295
- return None
296
- binding = facts.provenance.binding(value.id, at)
297
- if isinstance(binding, ast.ClassDef):
298
- return binding
299
- if value.id in _SCALAR_TYPES and facts.builtin(value, value.id, at):
300
- return f"builtins.{value.id}"
301
- return None