sarj-python-lint 1.154.0__tar.gz → 1.156.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.154.0 → sarj_python_lint-1.156.0}/PKG-INFO +1 -1
  2. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/pyproject.toml +1 -1
  3. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/_autofix_declared_tests.py +12 -5
  4. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/_autofix_enums.py +9 -6
  5. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/_autofix_security.py +7 -7
  6. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_annotation_origins.py +11 -9
  7. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_async_lifecycle.py +15 -12
  8. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_data_union_discriminator.py +18 -15
  9. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_docstrings.py +7 -4
  10. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_fastapi.py +38 -27
  11. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_fixture_contracts.py +11 -0
  12. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_httpx_clients.py +9 -6
  13. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_native_object_contracts.py +26 -20
  14. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_opaque_contracts.py +25 -15
  15. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_project_index.py +10 -7
  16. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_route_shapes.py +3 -2
  17. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_runtime_names.py +28 -19
  18. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_sdk_prerequisite.py +16 -20
  19. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_transactional_sql.py +7 -6
  20. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/duplicate_pytest_fixture_params.py +2 -2
  21. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/excessive_commentary.py +26 -34
  22. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/mock_without_spec.py +11 -10
  23. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_any_mapping_types.py +15 -9
  24. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_discarded_validation_result.py +13 -11
  25. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_dunder_all.py +7 -4
  26. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_fastapi_on_event.py +7 -4
  27. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_first_party_private_import.py +9 -6
  28. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_invalid_pydantic_bypass.py +12 -9
  29. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_invalid_pydantic_validator_return.py +12 -9
  30. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_magic_arithmetic.py +14 -20
  31. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_mutating_container_transform.py +10 -11
  32. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_psycopg_execution_in_loop.py +21 -19
  33. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_raw_source_text_test_oracle.py +7 -4
  34. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_redundant_attribute_unpacking.py +3 -3
  35. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_repeated_test_body.py +3 -3
  36. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_restated_comment.py +3 -2
  37. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_unnecessary_docstring.py +15 -9
  38. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/opaque_parametrize_case_needs_id.py +7 -4
  39. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/over_mocked_test.py +22 -18
  40. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_autospec_for_callable_mock.py +11 -8
  41. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_collection_comprehension.py +138 -1
  42. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_constant_time_secret_compare.py +7 -6
  43. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_defaultdict.py +3 -3
  44. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_direct_import_module.py +3 -3
  45. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_discriminated_model_union.py +23 -19
  46. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_explicit_class_contract.py +13 -17
  47. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_fstring_over_concat.py +9 -6
  48. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_injected_service.py +13 -10
  49. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_library_fake.py +16 -10
  50. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_match_type_dispatch.py +36 -2
  51. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_pytest_dependency_fixtures.py +102 -3
  52. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_required_constructor_parameters.py +7 -4
  53. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_self_type_annotation.py +7 -4
  54. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_single_psycopg_cursor.py +3 -2
  55. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_struct_over_namedtuple.py +7 -4
  56. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_typed_settings_field.py +5 -4
  57. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/pytest_fixture_returns_closed_resource.py +3 -3
  58. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/repeated_unimplemented_test_contract.py +3 -2
  59. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/require_explicit_psycopg_transaction.py +8 -5
  60. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/require_keyword_only_swap_prone_params.py +3 -2
  61. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/require_pydantic_for_external_json.py +10 -6
  62. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/require_pydantic_for_mapping_shape.py +33 -4
  63. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/restated_test_docstring.py +7 -4
  64. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/stepdown.py +21 -17
  65. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/test_without_explicit_oracle.py +8 -5
  66. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/uncontrolled_randomness_in_test.py +31 -25
  67. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/.gitignore +0 -0
  68. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/LICENSE +0 -0
  69. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/README.md +0 -0
  70. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/__init__.py +0 -0
  71. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/__main__.py +0 -0
  72. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/_analysis_session.py +0 -0
  73. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/_autofix.py +0 -0
  74. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/_autofix_aliases.py +0 -0
  75. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/_autofix_annotations.py +0 -0
  76. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/_autofix_comments.py +0 -0
  77. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/_autofix_declared_contracts.py +0 -0
  78. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/_autofix_docs.py +0 -0
  79. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/_autofix_exhaustiveness.py +0 -0
  80. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/_autofix_inert.py +0 -0
  81. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/_autofix_parameters.py +0 -0
  82. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/_autofix_repeated.py +0 -0
  83. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/_autofix_sql_projection.py +0 -0
  84. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/_autofix_tests.py +0 -0
  85. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/_closed_sql_literal.py +0 -0
  86. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/_file_context.py +0 -0
  87. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/_filesystem.py +0 -0
  88. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/_fixes.py +0 -0
  89. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/_parallel.py +0 -0
  90. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/_prepared_sources.py +0 -0
  91. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/_python_target.py +0 -0
  92. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/_ratchet_cli.py +0 -0
  93. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/_rule_descriptors.py +0 -0
  94. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/_secret_names.py +0 -0
  95. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/_source.py +0 -0
  96. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/_version.py +0 -0
  97. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/application_logging.py +0 -0
  98. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/autofix.py +0 -0
  99. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/benchmark.py +0 -0
  100. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/cast_access.py +0 -0
  101. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/interpreter_argv.py +0 -0
  102. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/json_boundary.py +0 -0
  103. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/py.typed +0 -0
  104. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/ratchet.py +0 -0
  105. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rule_base.py +0 -0
  106. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rule_metadata.py +0 -0
  107. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/__init__.py +0 -0
  108. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_annotation_semantics.py +0 -0
  109. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_ast_index.py +0 -0
  110. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_ast_names.py +0 -0
  111. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_ast_position.py +0 -0
  112. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_binding_inventory.py +0 -0
  113. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_closed_helpers.py +0 -0
  114. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_comment_narration.py +0 -0
  115. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_comments.py +0 -0
  116. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_contract_annotation.py +0 -0
  117. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_copy_on_write.py +0 -0
  118. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_declared_contracts.py +0 -0
  119. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_dict_key_views.py +0 -0
  120. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_domain_boundaries.py +0 -0
  121. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_exports.py +0 -0
  122. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_fastapi_access.py +0 -0
  123. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_first_party.py +0 -0
  124. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_fixed_record.py +0 -0
  125. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_generic_payload.py +0 -0
  126. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_imports.py +0 -0
  127. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_inert_model_annotation.py +0 -0
  128. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_inherited_contract.py +0 -0
  129. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_local_alias_fix.py +0 -0
  130. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_local_source.py +0 -0
  131. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_logging.py +0 -0
  132. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_loguru.py +0 -0
  133. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_mapping_shape_callbacks.py +0 -0
  134. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_namespace_access.py +0 -0
  135. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_native_namespace_capability.py +0 -0
  136. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_nominal_project.py +0 -0
  137. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_nullable_outcome.py +0 -0
  138. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_numeric_proof.py +0 -0
  139. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_paths.py +0 -0
  140. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_postgres.py +0 -0
  141. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_prose_budget.py +0 -0
  142. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_pydantic_field_contract.py +0 -0
  143. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_pytest.py +0 -0
  144. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_pytest_contract_parameters.py +0 -0
  145. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_registry.py +0 -0
  146. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_resolved_operation_signature.py +0 -0
  147. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_resource_provenance.py +0 -0
  148. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_runtime_bindings.py +0 -0
  149. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_runtime_registry.py +0 -0
  150. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_sdk_metadata_fields.py +0 -0
  151. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_service_http_callbacks.py +0 -0
  152. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_set_fields.py +0 -0
  153. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_sql.py +0 -0
  154. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_static_json_alias.py +0 -0
  155. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_store_sql.py +0 -0
  156. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_store_writes.py +0 -0
  157. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_suppression_comments.py +0 -0
  158. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_test_assertions.py +0 -0
  159. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_test_composition.py +0 -0
  160. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_test_provenance.py +0 -0
  161. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_type_guard_symbols.py +0 -0
  162. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/_value_models.py +0 -0
  163. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/async_cleanup_registered_synchronously.py +0 -0
  164. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/async_executor_shutdown.py +0 -0
  165. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/async_mock_call_without_await_assertion.py +0 -0
  166. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/async_subprocess_cancellation_cleanup.py +0 -0
  167. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/cancel_owned_task_without_join.py +0 -0
  168. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/complex_postgres_query_requires_architecture_review.py +0 -0
  169. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/defect_xfail_requires_explicit_strict.py +0 -0
  170. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/delete_route_returns_no_content.py +0 -0
  171. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/docstring_args_restate_signature.py +0 -0
  172. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/docstring_returns_restate_signature.py +0 -0
  173. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/duplicate_adjacent_exception_handler.py +0 -0
  174. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/duplicate_closed_pure_helper.py +0 -0
  175. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/failed_probe_zero_threshold.py +0 -0
  176. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/fakes_in_shared_location.py +0 -0
  177. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/fastapi_class_router_contract.py +0 -0
  178. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/fastapi_explicit_openapi_contract.py +0 -0
  179. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/fastapi_route_declares_security.py +0 -0
  180. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/iac_source_coupled_test.py +0 -0
  181. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/invalid_pydantic_field_default.py +0 -0
  182. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/named_record_at_boundaries.py +0 -0
  183. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/nan_hidden_by_builtin_min.py +0 -0
  184. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/negative_only_http_status_assertion.py +0 -0
  185. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_analytical_aggregation_in_postgres_store.py +0 -0
  186. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_async_client_in_constructor.py +0 -0
  187. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_async_function_cache.py +0 -0
  188. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_before_validator_input_mutation.py +0 -0
  189. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_blanket_suppression.py +0 -0
  190. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_broad_keyword_capture.py +0 -0
  191. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_comment_cruft.py +0 -0
  192. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_conflicting_pydantic_alias_validation.py +0 -0
  193. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_conftest_test_module_import.py +0 -0
  194. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_contradictory_type_guard.py +0 -0
  195. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_copied_inherited_docstring.py +0 -0
  196. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_cors_wildcard_with_credentials.py +0 -0
  197. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_create_verb_in_post_path.py +0 -0
  198. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_custom_control_flow_exception.py +0 -0
  199. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_database_programmability.py +0 -0
  200. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_defaulted_environment_setting.py +0 -0
  201. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_delete_statement.py +0 -0
  202. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_discarded_tagged_outcome.py +0 -0
  203. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_dual_shape_model_field_reader.py +0 -0
  204. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_duplicate_dunder_all_entry.py +0 -0
  205. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_duplicate_field_validator_body.py +0 -0
  206. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_dynamic_builtins.py +0 -0
  207. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_exception_text_in_500_detail.py +0 -0
  208. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_excessive_cognitive_complexity.py +0 -0
  209. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_file_level_escape_hatch_suppression.py +0 -0
  210. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_fixed_sleep_before_assert.py +0 -0
  211. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_fixed_sleep_in_loop.py +0 -0
  212. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_folded_bad_request_not_found.py +0 -0
  213. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_frozen_after_validator_field_write.py +0 -0
  214. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_generic_json_parser.py +0 -0
  215. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_generic_single_export_module.py +0 -0
  216. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_hasattr.py +0 -0
  217. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_hidden_constructor_fallback.py +0 -0
  218. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_impossible_pydantic_field_bounds.py +0 -0
  219. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_injected_module_loader.py +0 -0
  220. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_input_model_mutation.py +0 -0
  221. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_interpreter_source_arguments.py +0 -0
  222. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_invalid_argument_name_suppression.py +0 -0
  223. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_loguru_exc_info.py +0 -0
  224. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_loguru_printf_format.py +0 -0
  225. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_mocked_pydantic_value_object.py +0 -0
  226. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_mutating_input_with_result.py +0 -0
  227. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_nested_pydantic_field_validator.py +0 -0
  228. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_nonlocal_statement.py +0 -0
  229. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_nullable_dependency_fallback.py +0 -0
  230. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_offset_pagination.py +0 -0
  231. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_partial_type_is.py +0 -0
  232. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_positional_psycopg_row_escape.py +0 -0
  233. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_psycopg_execution_outside_injected_owner.py +0 -0
  234. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_random_uuid_in_sql.py +0 -0
  235. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_raw_connection_in_tests.py +0 -0
  236. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_recording_store.py +0 -0
  237. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_redundant_literal_description.py +0 -0
  238. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_redundant_local_alias.py +0 -0
  239. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_redundant_module_alias_exports.py +0 -0
  240. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_redundant_sql_alias.py +0 -0
  241. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_repeated_string_literal.py +0 -0
  242. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_secret_in_log.py +0 -0
  243. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_select_star.py +0 -0
  244. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_service_behavior_in_settings.py +0 -0
  245. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_shallow_container_type_guard.py +0 -0
  246. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_shallow_record_type_guard.py +0 -0
  247. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_shared_mutable_default.py +0 -0
  248. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_slash_collection_root_under_prefix.py +0 -0
  249. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_string_concat_in_loop.py +0 -0
  250. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_swallowed_asyncio_cancellation.py +0 -0
  251. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_sys_path_mutation.py +0 -0
  252. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_tautological_expect.py +0 -0
  253. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_test_comments.py +0 -0
  254. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_test_method_grafting.py +0 -0
  255. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_typed_doc_sections.py +0 -0
  256. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_unique_violation_message_match.py +0 -0
  257. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_unknown_pydantic_validator_field.py +0 -0
  258. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_unobserved_task_exception.py +0 -0
  259. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_unscoped_async_client_factory.py +0 -0
  260. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_unused_copy_result.py +0 -0
  261. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_unused_underscored_keyword_parameter.py +0 -0
  262. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_unused_value_marker.py +0 -0
  263. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_vague_suppression_description.py +0 -0
  264. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_value_error_forwarder.py +0 -0
  265. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_whole_request_response_payload_in_log.py +0 -0
  266. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/no_work_verb_get_route.py +0 -0
  267. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/numeric_literal_separators.py +0 -0
  268. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/phase_label_comment.py +0 -0
  269. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_application_model_joins.py +0 -0
  270. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_bulk_upsert.py +0 -0
  271. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_class_row.py +0 -0
  272. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_configured_cloud_scope.py +0 -0
  273. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_coordinated_state_owner.py +0 -0
  274. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_declarative_batch_validation.py +0 -0
  275. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_exception_propagation.py +0 -0
  276. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_explicit_value_model_construction.py +0 -0
  277. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_grouped_settings.py +0 -0
  278. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_immutable_module_constant.py +0 -0
  279. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_injected_dependency_over_monkeypatch.py +0 -0
  280. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_match_assert_never.py +0 -0
  281. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_match_exception_dispatch.py +0 -0
  282. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_match_value_dispatch.py +0 -0
  283. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_module_level_constant.py +0 -0
  284. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_monkeypatch_for_process_state_in_test.py +0 -0
  285. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_monotonic_for_elapsed_time.py +0 -0
  286. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_namedtuple_over_tuple_return.py +0 -0
  287. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_native_string_check.py +0 -0
  288. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_nominal_id_types.py +0 -0
  289. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_nominal_mapping_keys.py +0 -0
  290. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_non_nullable_collection.py +0 -0
  291. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_optional_composite.py +0 -0
  292. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_or_pattern.py +0 -0
  293. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_outcome_variants.py +0 -0
  294. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_precise_object_contract.py +0 -0
  295. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_psycopg_executemany.py +0 -0
  296. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_pydantic_field_bounds.py +0 -0
  297. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_pydantic_json_value.py +0 -0
  298. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_pydantic_model_assertion.py +0 -0
  299. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_pytest_fixture_contract.py +0 -0
  300. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_pytest_fixture_injection.py +0 -0
  301. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_regex_fullmatch.py +0 -0
  302. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_required_prerequisite.py +0 -0
  303. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_runtime_validation.py +0 -0
  304. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_self_documenting_constant.py +0 -0
  305. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_semantic_temporal_types.py +0 -0
  306. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_set_isdisjoint.py +0 -0
  307. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_single_parametrize_contract.py +0 -0
  308. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_str_enum.py +0 -0
  309. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_typed_cli.py +0 -0
  310. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_typed_mapping_get.py +0 -0
  311. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_validated_uuid_comparison.py +0 -0
  312. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_walrus_awaited_none_guard.py +0 -0
  313. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_walrus_comprehension_filter.py +0 -0
  314. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_walrus_regex_match.py +0 -0
  315. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/prefer_walrus_stream_loop.py +0 -0
  316. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/production_derived_test_cases.py +0 -0
  317. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/psycopg_sql_format_field_mismatch.py +0 -0
  318. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/pytest_fixture_returns_bare_tuple.py +0 -0
  319. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/redundant_class_docstring.py +0 -0
  320. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/redundant_docstring.py +0 -0
  321. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/redundant_module_docstring.py +0 -0
  322. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/redundant_test_constructor_forwarder.py +0 -0
  323. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/repeated_kwarg_heavy_call_in_test.py +0 -0
  324. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/repeated_static_call_cases.py +0 -0
  325. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/repeated_test_composition.py +0 -0
  326. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/require_constrained_api_integer.py +0 -0
  327. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/require_exp_on_jwt_decode.py +0 -0
  328. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/require_explicit_contract_implementation.py +0 -0
  329. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/require_explicit_service_contract.py +0 -0
  330. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/require_hidden_settings_input.py +0 -0
  331. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/require_injectable_retry_sleep.py +0 -0
  332. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/require_nodecode_for_splitting_settings_field.py +0 -0
  333. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/require_port_for_service.py +0 -0
  334. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/require_precise_factory_signature.py +0 -0
  335. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/require_public_dependency_contract.py +0 -0
  336. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/require_pydantic_for_structured_payload.py +0 -0
  337. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/require_pydantic_ordinal_lower_bound.py +0 -0
  338. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/service_singleton_delegates_to_bulk.py +0 -0
  339. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/shared_mutable_pydantic_factory.py +0 -0
  340. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/store_field_update_reuses_upsert.py +0 -0
  341. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/store_get_delegates_to_bulk_read.py +0 -0
  342. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/store_insert_requires_explicit_conflict_policy.py +0 -0
  343. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/store_insert_requires_on_conflict.py +0 -0
  344. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/store_mutation_command_fanout.py +0 -0
  345. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/subprocess_kill_without_reap.py +0 -0
  346. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/timestamp_order_requires_tiebreaker.py +0 -0
  347. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/trailing_value_narration.py +0 -0
  348. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/typed_error_reasons.py +0 -0
  349. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/unused_mock_setup.py +0 -0
  350. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/rules/unused_test_factory_option.py +0 -0
  351. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.0}/src/sarj_python_lint/sql_literals.py +0 -0
  352. {sarj_python_lint-1.154.0 → sarj_python_lint-1.156.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.154.0
3
+ Version: 1.156.0
4
4
  Summary: Custom Python lint rules — AST-based, pre-commit-friendly, hypermodern defaults
5
5
  Project-URL: Homepage, https://code-standards.sarj.ai/rules/python/
6
6
  Project-URL: Documentation, https://code-standards.sarj.ai/rules/python/
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "sarj-python-lint"
3
- version = "1.154.0"
3
+ version = "1.156.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" }]
@@ -103,12 +103,19 @@ def _returns_int(owner: ast.FunctionDef) -> bool:
103
103
 
104
104
 
105
105
  def _closed_classes(profile: _Profile) -> bool:
106
- port, store, service = profile.port, profile.store, profile.service
107
- if not all(_plain_class(owner) for owner in (port, store, service)) or store.bases or service.bases:
106
+ if (
107
+ not all(_plain_class(owner) for owner in (profile.port, profile.store, profile.service))
108
+ or profile.store.bases
109
+ or profile.service.bases
110
+ ):
108
111
  return False
109
- if len(port.bases) != 1 or not isinstance(port.bases[0], ast.Name) or port.bases[0].id != "Protocol":
112
+ if (
113
+ len(profile.port.bases) != 1
114
+ or not isinstance(profile.port.bases[0], ast.Name)
115
+ or profile.port.bases[0].id != "Protocol"
116
+ ):
110
117
  return False
111
- match port.body, store.body, service.body:
118
+ match profile.port.body, profile.store.body, profile.service.body:
112
119
  case [ast.FunctionDef() as abstract], [ast.FunctionDef() as concrete], [
113
120
  ast.FunctionDef() as initializer,
114
121
  ast.FunctionDef() as reader,
@@ -116,7 +123,7 @@ def _closed_classes(profile: _Profile) -> bool:
116
123
  return (
117
124
  _port_method(abstract)
118
125
  and _store_method(concrete)
119
- and _service_initializer(initializer, port.name)
126
+ and _service_initializer(initializer, profile.port.name)
120
127
  and _service_reader(reader)
121
128
  )
122
129
  case _:
@@ -21,12 +21,15 @@ _MIN_MATCH_CASES = 3
21
21
 
22
22
  def _annotation_reference(node: ast.AST, context: PythonFileContext) -> bool:
23
23
  while (parent := context.parents.get(node)) is not None:
24
- if isinstance(parent, ast.arg | ast.AnnAssign) and parent.annotation is node:
25
- return True
26
- if isinstance(parent, ast.FunctionDef | ast.AsyncFunctionDef) and parent.returns is node:
27
- return True
28
- if isinstance(parent, ast.stmt):
29
- return False
24
+ match parent:
25
+ case ast.arg() | ast.AnnAssign() if parent.annotation is node:
26
+ return True
27
+ case ast.FunctionDef() | ast.AsyncFunctionDef() if parent.returns is node:
28
+ return True
29
+ case ast.stmt():
30
+ return False
31
+ case _:
32
+ pass
30
33
  node = parent
31
34
  return False
32
35
 
@@ -77,21 +77,21 @@ def _comparison_edit(context: PythonFileContext, diagnostic: Diagnostic, compari
77
77
  guarded = _guarded_owner(context, comparison, names)
78
78
  if guarded is None:
79
79
  return None
80
- owner, guard = guarded.owner, guarded.guard
81
- captures = _captured_parameters(context, owner)
80
+ captures = _captured_parameters(context, guarded.owner)
82
81
  if captures is None or not names.isdisjoint(
83
82
  (captures.compare.arg, captures.type_check.arg, captures.bytes_type.arg)
84
83
  ):
85
84
  return None
86
- guards = _bytes_guard(guard, names, captures)
87
- if guards is None or not _canonical_captures(context, owner, guards, captures):
85
+ guards = _bytes_guard(guarded.guard, names, captures)
86
+ if guards is None or not _canonical_captures(context, guarded.owner, guards, captures):
88
87
  return None
89
88
  parameters = ParameterFixes(context)
90
- calls = parameters.closed_calls(owner)
91
- if not calls or not _forwarded_parameter_call(context, owner, calls):
89
+ calls = parameters.closed_calls(guarded.owner)
90
+ if not calls or not _forwarded_parameter_call(context, guarded.owner, calls):
92
91
  return None
93
92
  if any(
94
- token.type == tokenize.COMMENT and owner.lineno <= token.start[0] <= (owner.end_lineno or owner.lineno)
93
+ token.type == tokenize.COMMENT
94
+ and guarded.owner.lineno <= token.start[0] <= (guarded.owner.end_lineno or guarded.owner.lineno)
95
95
  for token in parameters.tokens
96
96
  ):
97
97
  return None
@@ -104,15 +104,17 @@ class AnnotationOrigins:
104
104
  def _lookup_at(self, at: ast.AST) -> ast.AST:
105
105
  current = at
106
106
  while (parent := self.context.parents.get(current)) is not None:
107
- if isinstance(parent, ast.Lambda | ast.ListComp | ast.SetComp | ast.DictComp | ast.GeneratorExp):
108
- return at
109
- if isinstance(parent, ast.arg) and current is parent.annotation:
110
- arguments = self.context.parents.get(parent)
111
- function = self.context.parents.get(arguments) if arguments is not None else None
112
- return function if isinstance(function, ast.FunctionDef | ast.AsyncFunctionDef) else at
113
- if isinstance(parent, ast.FunctionDef | ast.AsyncFunctionDef) and current is parent.returns:
114
- return parent
115
- current = parent
107
+ match parent:
108
+ case ast.Lambda() | ast.ListComp() | ast.SetComp() | ast.DictComp() | ast.GeneratorExp():
109
+ return at
110
+ case ast.arg() if current is parent.annotation:
111
+ arguments = self.context.parents.get(parent)
112
+ function = self.context.parents.get(arguments) if arguments is not None else None
113
+ return function if isinstance(function, ast.FunctionDef | ast.AsyncFunctionDef) else at
114
+ case ast.FunctionDef() | ast.AsyncFunctionDef() if current is parent.returns:
115
+ return parent
116
+ case _:
117
+ current = parent
116
118
  return at
117
119
 
118
120
 
@@ -91,18 +91,21 @@ class AsyncApiProof:
91
91
 
92
92
  def _safe_api_read(self, node: ast.Name | ast.Attribute, qualified: str) -> bool:
93
93
  parent = self.context.parents.get(node)
94
- if isinstance(parent, ast.Attribute) and parent.value is node:
95
- return parent.attr not in _INTROSPECTION
96
- if isinstance(parent, ast.Call) and parent.func is node:
97
- return True
98
- if isinstance(parent, ast.Subscript) and parent.value is node:
99
- return True
100
- if isinstance(parent, ast.arg | ast.AnnAssign) and parent.annotation is node:
101
- return True
102
- if isinstance(parent, ast.FunctionDef | ast.AsyncFunctionDef):
103
- return parent.returns is node or (
104
- qualified == "contextlib.asynccontextmanager" and node in parent.decorator_list
105
- )
94
+ match parent:
95
+ case ast.Attribute() if parent.value is node:
96
+ return parent.attr not in _INTROSPECTION
97
+ case ast.Call() if parent.func is node:
98
+ return True
99
+ case ast.Subscript() if parent.value is node:
100
+ return True
101
+ case ast.arg() | ast.AnnAssign() if parent.annotation is node:
102
+ return True
103
+ case ast.FunctionDef() | ast.AsyncFunctionDef():
104
+ return parent.returns is node or (
105
+ qualified == "contextlib.asynccontextmanager" and node in parent.decorator_list
106
+ )
107
+ case _:
108
+ pass
106
109
  return isinstance(parent, ast.ExceptHandler) and parent.type is node
107
110
 
108
111
  def assignment(self, name: ast.Name, at: ast.AST) -> _LocalAssignment | None:
@@ -553,21 +553,24 @@ class _DataUnions:
553
553
 
554
554
  def _literal_piece(self, item: _Expansion) -> _Domain | list[_Expansion]:
555
555
  member = item.node
556
- if isinstance(member, ast.Name) and member.id in self.aliases:
557
- if member.id in item.aliases:
558
- return _Domain(opaque=True)
559
- parsed = _string_expression(self.aliases[member.id])
560
- if parsed is None:
561
- return _Domain(opaque=True)
562
- return [_Expansion(parsed, item.aliases | {member.id})]
563
- if isinstance(member, ast.Subscript):
564
- children = (
565
- _subscript_members(member)
566
- if self._typing_symbol(member.value) == "Literal"
567
- else self._union_members(member)
568
- )
569
- if children is not None:
570
- return [_Expansion(child, item.aliases) for child in children]
556
+ match member:
557
+ case ast.Name() if member.id in self.aliases:
558
+ if member.id in item.aliases:
559
+ return _Domain(opaque=True)
560
+ parsed = _string_expression(self.aliases[member.id])
561
+ if parsed is None:
562
+ return _Domain(opaque=True)
563
+ return [_Expansion(parsed, item.aliases | {member.id})]
564
+ case ast.Subscript():
565
+ children = (
566
+ _subscript_members(member)
567
+ if self._typing_symbol(member.value) == "Literal"
568
+ else self._union_members(member)
569
+ )
570
+ if children is not None:
571
+ return [_Expansion(child, item.aliases) for child in children]
572
+ case _:
573
+ pass
571
574
  return _literal_value(member)
572
575
 
573
576
 
@@ -416,10 +416,13 @@ def _is_docstring_reader(node: ast.Call) -> bool:
416
416
  if not node.args:
417
417
  return False
418
418
  function = node.func
419
- if isinstance(function, ast.Name) and function.id == "help":
420
- return True
421
- if isinstance(function, ast.Attribute) and function.attr in {"getdoc", "render_doc"}:
422
- return True
419
+ match function:
420
+ case ast.Name() if function.id == "help":
421
+ return True
422
+ case ast.Attribute() if function.attr in {"getdoc", "render_doc"}:
423
+ return True
424
+ case _:
425
+ pass
423
426
  return (
424
427
  isinstance(function, ast.Name)
425
428
  and function.id == "getattr"
@@ -327,21 +327,25 @@ class FastapiIndex:
327
327
  for target in targets
328
328
  for name in self._target_names(target)
329
329
  )
330
- elif isinstance(node, (ast.MatchAs, ast.MatchStar)) and node.name is not None:
331
- self.bound_names.add(_ReceiverKey(self._node_scopes[id(node)], node.name))
332
- elif isinstance(node, ast.MatchMapping) and node.rest is not None:
333
- self.bound_names.add(_ReceiverKey(self._node_scopes[id(node)], node.rest))
334
- elif isinstance(node, (ast.FunctionDef, ast.AsyncFunctionDef)):
335
- self._bind_function_names(node)
336
- elif isinstance(node, ast.ClassDef):
337
- self.bound_names.add(_ReceiverKey(self._node_scopes[id(node)], node.name))
338
- elif isinstance(node, (ast.Import, ast.ImportFrom)):
339
- self.bound_names.update(
340
- _ReceiverKey(self._node_scopes[id(node)], alias.asname or alias.name.split(".")[0])
341
- for alias in node.names
342
- )
343
- elif isinstance(node, ast.ExceptHandler) and node.name is not None:
344
- self.bound_names.add(_ReceiverKey(self._node_scopes[id(node)], node.name))
330
+ return
331
+ match node:
332
+ case ast.MatchAs() | ast.MatchStar() if node.name is not None:
333
+ self.bound_names.add(_ReceiverKey(self._node_scopes[id(node)], node.name))
334
+ case ast.MatchMapping() if node.rest is not None:
335
+ self.bound_names.add(_ReceiverKey(self._node_scopes[id(node)], node.rest))
336
+ case ast.FunctionDef() | ast.AsyncFunctionDef():
337
+ self._bind_function_names(node)
338
+ case ast.ClassDef():
339
+ self.bound_names.add(_ReceiverKey(self._node_scopes[id(node)], node.name))
340
+ case ast.Import() | ast.ImportFrom():
341
+ self.bound_names.update(
342
+ _ReceiverKey(self._node_scopes[id(node)], alias.asname or alias.name.split(".")[0])
343
+ for alias in node.names
344
+ )
345
+ case ast.ExceptHandler() if node.name is not None:
346
+ self.bound_names.add(_ReceiverKey(self._node_scopes[id(node)], node.name))
347
+ case _:
348
+ pass
345
349
 
346
350
  def _binding_scope(self, node: ast.AST) -> int:
347
351
  scope = self._node_scopes[id(node)]
@@ -370,12 +374,16 @@ class FastapiIndex:
370
374
  name = _binding_name(node.targets[0])
371
375
  if name:
372
376
  return self._assignment_scope(node, name), name, node.value
373
- elif isinstance(node, ast.AnnAssign) and node.value is not None:
374
- name = _binding_name(node.target)
375
- if name:
376
- return self._assignment_scope(node, name), name, node.value
377
- elif isinstance(node, ast.TypeAlias):
378
- return self._node_scopes[id(node)], node.name.id, node.value
377
+ else:
378
+ match node:
379
+ case ast.AnnAssign() if node.value is not None:
380
+ name = _binding_name(node.target)
381
+ if name:
382
+ return self._assignment_scope(node, name), name, node.value
383
+ case ast.TypeAlias():
384
+ return self._node_scopes[id(node)], node.name.id, node.value
385
+ case _:
386
+ pass
379
387
  return None
380
388
 
381
389
  def _resolve_alias(self, key: _ReceiverKey, value: ast.expr) -> bool:
@@ -646,12 +654,15 @@ class FastapiIndex:
646
654
  if not isinstance(node, (ast.Name, ast.Attribute)) or self._is_shadowed_in_enclosing_scope(node):
647
655
  return None
648
656
  qualified = self.imports.resolved_qualified_name(node)
649
- if isinstance(node, ast.Name) and qualified is None:
650
- binding = self.imports.bindings.get(node.id)
651
- return binding.module if binding is not None and binding.symbol is None else None
652
- if isinstance(node, ast.Attribute) and qualified is None:
653
- module = self.imports.resolved_qualified_name(node.value)
654
- return f"{module}.{node.attr}" if module is not None else None
657
+ match node:
658
+ case ast.Name() if qualified is None:
659
+ binding = self.imports.bindings.get(node.id)
660
+ return binding.module if binding is not None and binding.symbol is None else None
661
+ case ast.Attribute() if qualified is None:
662
+ module = self.imports.resolved_qualified_name(node.value)
663
+ return f"{module}.{node.attr}" if module is not None else None
664
+ case _:
665
+ pass
655
666
  return qualified
656
667
 
657
668
  def _status_provider(self, node: ast.expr) -> str | None:
@@ -160,6 +160,17 @@ def _hook_parents(model: DeclaredClass, contracts: DeclaredContracts) -> tuple[D
160
160
  return tuple(parents)
161
161
 
162
162
 
163
+ def direct_method_definition(model: DeclaredClass, name: str) -> DeclaredMethod | None:
164
+ if model.declaration.type_params or _method_replaced(model.declaration, name):
165
+ return None
166
+ definitions = [
167
+ member
168
+ for member in model.declaration.body
169
+ if isinstance(member, ast.FunctionDef | ast.AsyncFunctionDef) and member.name == name
170
+ ]
171
+ return DeclaredMethod(definitions[0], model) if len(definitions) == 1 else None
172
+
173
+
163
174
  def method_definition(
164
175
  model: DeclaredClass,
165
176
  name: str,
@@ -98,12 +98,15 @@ def runtime_expression(context: PythonFileContext, expression: ast.expr) -> bool
98
98
  child: ast.AST = expression
99
99
  parent = context.parents.get(child)
100
100
  while parent is not None:
101
- if isinstance(parent, ast.TypeAlias | ast.type_param):
102
- return False
103
- if isinstance(parent, ast.AnnAssign | ast.arg) and parent.annotation is child:
104
- return False
105
- if isinstance(parent, ast.FunctionDef | ast.AsyncFunctionDef) and parent.returns is child:
106
- return False
101
+ match parent:
102
+ case ast.TypeAlias() | ast.type_param():
103
+ return False
104
+ case ast.AnnAssign() | ast.arg() if parent.annotation is child:
105
+ return False
106
+ case ast.FunctionDef() | ast.AsyncFunctionDef() if parent.returns is child:
107
+ return False
108
+ case _:
109
+ pass
107
110
  child, parent = parent, context.parents.get(parent)
108
111
  return True
109
112
 
@@ -99,20 +99,23 @@ class NativeObjectContracts:
99
99
  if not isinstance(value, ast.Name) or value.id in self.facts.provenance.mutated:
100
100
  return False
101
101
  binding = self.facts.provenance.runtime_binding(value.id, value)
102
- if isinstance(binding, ast.arg) and binding.annotation is not None:
103
- annotation = self.context.annotation_semantics.parse(binding.annotation)
104
- return (
105
- annotation is not None
106
- and self.qualified(annotation, binding.annotation) in _FUNCTION_TYPES
107
- and not self.namespace_rebound(value.id)
108
- )
109
- if isinstance(binding, ast.Name):
110
- assigned = self.facts.provenance.assignment_value(binding, value)
111
- return (
112
- isinstance(assigned, ast.Call)
113
- and self.qualified(assigned.func, assigned) in _FUNCTION_TYPES
114
- and not self.namespace_rebound(value.id)
115
- )
102
+ match binding:
103
+ case ast.arg() if binding.annotation is not None:
104
+ annotation = self.context.annotation_semantics.parse(binding.annotation)
105
+ return (
106
+ annotation is not None
107
+ and self.qualified(annotation, binding.annotation) in _FUNCTION_TYPES
108
+ and not self.namespace_rebound(value.id)
109
+ )
110
+ case ast.Name():
111
+ assigned = self.facts.provenance.assignment_value(binding, value)
112
+ return (
113
+ isinstance(assigned, ast.Call)
114
+ and self.qualified(assigned.func, assigned) in _FUNCTION_TYPES
115
+ and not self.namespace_rebound(value.id)
116
+ )
117
+ case _:
118
+ pass
116
119
  return False
117
120
 
118
121
  def _constant(self, value: ast.expr) -> bool:
@@ -294,12 +297,15 @@ class _NamespaceFlow:
294
297
 
295
298
  def _namespace_input_read(self, read: ast.Name) -> bool:
296
299
  parent = self.native.context.parents.get(read)
297
- if isinstance(parent, ast.Assign | ast.AnnAssign) and parent.value is read:
298
- return True
299
- if isinstance(parent, ast.Subscript) and parent.value is read:
300
- return isinstance(parent.ctx, ast.Store)
301
- if isinstance(parent, ast.Call):
302
- return self.native.dict_call(parent) or any(namespace is read for namespace in self.arguments(parent))
300
+ match parent:
301
+ case ast.Assign() | ast.AnnAssign() if parent.value is read:
302
+ return True
303
+ case ast.Subscript() if parent.value is read:
304
+ return isinstance(parent.ctx, ast.Store)
305
+ case ast.Call():
306
+ return self.native.dict_call(parent) or any(namespace is read for namespace in self.arguments(parent))
307
+ case _:
308
+ pass
303
309
  return False
304
310
 
305
311
  def evaluates(self, call: ast.Call) -> bool:
@@ -304,20 +304,27 @@ class OpaqueContractFacts:
304
304
 
305
305
  def _key_read(self, read: ast.Name) -> bool:
306
306
  parent = self.context.parents.get(read)
307
- if isinstance(parent, ast.Assign | ast.AnnAssign) and parent.value is read:
308
- return True
309
- if isinstance(parent, ast.Compare):
310
- return all(isinstance(operator, ast.Is | ast.IsNot) for operator in parent.ops) or (
311
- read in parent.comparators and all(isinstance(operator, ast.In | ast.NotIn) for operator in parent.ops)
312
- )
307
+ match parent:
308
+ case ast.Assign() | ast.AnnAssign() if parent.value is read:
309
+ return True
310
+ case ast.Compare():
311
+ return all(isinstance(operator, ast.Is | ast.IsNot) for operator in parent.ops) or (
312
+ read in parent.comparators
313
+ and all(isinstance(operator, ast.In | ast.NotIn) for operator in parent.ops)
314
+ )
315
+ case _:
316
+ pass
313
317
  return self._key_operation(read)
314
318
 
315
319
  def _key_operation(self, read: ast.Name) -> bool:
316
320
  parent = self.context.parents.get(read)
317
- if isinstance(parent, ast.For | ast.comprehension) and parent.iter is read:
318
- return True
319
- if isinstance(parent, ast.Attribute) and parent.value is read and parent.attr == "keys":
320
- return True
321
+ match parent:
322
+ case ast.For() | ast.comprehension() if parent.iter is read:
323
+ return True
324
+ case ast.Attribute() if parent.value is read and parent.attr == "keys":
325
+ return True
326
+ case _:
327
+ pass
321
328
  return (
322
329
  isinstance(parent, ast.Call)
323
330
  and parent.args == [read]
@@ -920,11 +927,14 @@ class OpaqueContractFacts:
920
927
  if not isinstance(receiver, ast.Name):
921
928
  return False
922
929
  binding = self.facts.provenance.runtime_binding(receiver.id, receiver)
923
- if isinstance(binding, ast.arg) and binding.annotation is not None:
924
- return self.facts.qualified(binding.annotation, binding.annotation) in _DECODERS
925
- if isinstance(binding, ast.Name):
926
- value = self.facts.provenance.assignment_value(binding, receiver)
927
- return isinstance(value, ast.Call) and self.facts.qualified(value.func, value) in _DECODERS
930
+ match binding:
931
+ case ast.arg() if binding.annotation is not None:
932
+ return self.facts.qualified(binding.annotation, binding.annotation) in _DECODERS
933
+ case ast.Name():
934
+ value = self.facts.provenance.assignment_value(binding, receiver)
935
+ return isinstance(value, ast.Call) and self.facts.qualified(value.func, value) in _DECODERS
936
+ case _:
937
+ pass
928
938
  return False
929
939
 
930
940
 
@@ -1863,13 +1863,16 @@ def _absolute_import_symbols(tree: ast.Module) -> Mapping[str, SymbolRef]:
1863
1863
  return symbols
1864
1864
  first: dict[str, SymbolRef] = {}
1865
1865
  for statement in _module_import_statements(tree):
1866
- if isinstance(statement, ast.ImportFrom) and statement.level == 0 and statement.module is not None:
1867
- for alias in statement.names:
1868
- first.setdefault(alias.asname or alias.name, SymbolRef(statement.module, alias.name))
1869
- elif isinstance(statement, ast.Import):
1870
- for alias in statement.names:
1871
- local = alias.asname or alias.name.partition(".")[0]
1872
- first.setdefault(local, SymbolRef(alias.name if alias.asname else alias.name.partition(".")[0], ""))
1866
+ match statement:
1867
+ case ast.ImportFrom() if statement.level == 0 and statement.module is not None:
1868
+ for alias in statement.names:
1869
+ first.setdefault(alias.asname or alias.name, SymbolRef(statement.module, alias.name))
1870
+ case ast.Import():
1871
+ for alias in statement.names:
1872
+ local = alias.asname or alias.name.partition(".")[0]
1873
+ first.setdefault(local, SymbolRef(alias.name if alias.asname else alias.name.partition(".")[0], ""))
1874
+ case _:
1875
+ pass
1873
1876
  symbols = _ABSOLUTE_IMPORT_SYMBOLS[tree] = MappingProxyType(first)
1874
1877
  return symbols
1875
1878
 
@@ -1,6 +1,7 @@
1
1
  from __future__ import annotations
2
2
 
3
3
  import ast
4
+ from collections import defaultdict
4
5
  from dataclasses import dataclass
5
6
  from http import HTTPStatus
6
7
  import re
@@ -35,12 +36,12 @@ def route_decorators(context: PythonFileContext) -> Iterator[RouteDecorator]:
35
36
  return
36
37
  index = context.fastapi
37
38
  for function in context.nodes(ast.FunctionDef, ast.AsyncFunctionDef):
38
- grouped: dict[int, list[str]] = {}
39
+ grouped: dict[int, list[str]] = defaultdict(list)
39
40
  first: dict[int, RouteDecorator] = {}
40
41
  for route in index.routes(function):
41
42
  if route.has_unpack:
42
43
  continue
43
- grouped.setdefault(id(route.decorator), []).append(route.method)
44
+ grouped[id(route.decorator)].append(route.method)
44
45
  first.setdefault(
45
46
  id(route.decorator), RouteDecorator(route.decorator, frozenset(), route.path, route.inherited_prefix)
46
47
  )
@@ -195,15 +195,18 @@ class RuntimeNames:
195
195
  original = node
196
196
  parent = self.context.parents.get(node)
197
197
  while parent is not None:
198
- if isinstance(parent, ast.TypeAlias):
199
- return parent
200
- if isinstance(parent, ast.comprehension) and parent.iter is node:
201
- owner = self.context.parents.get(parent)
202
- if (
203
- isinstance(owner, ast.ListComp | ast.SetComp | ast.DictComp | ast.GeneratorExp)
204
- and owner.generators[0] is parent
205
- ):
206
- return self._scope(owner)
198
+ match parent:
199
+ case ast.TypeAlias():
200
+ return parent
201
+ case ast.comprehension() if parent.iter is node:
202
+ owner = self.context.parents.get(parent)
203
+ if (
204
+ isinstance(owner, ast.ListComp | ast.SetComp | ast.DictComp | ast.GeneratorExp)
205
+ and owner.generators[0] is parent
206
+ ):
207
+ return self._scope(owner)
208
+ case _:
209
+ pass
207
210
  if isinstance(parent, (ast.Module, ast.ClassDef, *_FUNCTION_SCOPES)):
208
211
  break
209
212
  node, parent = parent, self.context.parents.get(parent)
@@ -235,22 +238,28 @@ class RuntimeNames:
235
238
  return None
236
239
  parent = self.context.parents.get(node)
237
240
  if isinstance(node, ast.alias):
238
- if isinstance(parent, ast.Import):
239
- return node.name if node.asname else node.name.partition(".")[0]
240
- if isinstance(parent, ast.ImportFrom) and parent.level == 0 and parent.module is not None:
241
- return f"{parent.module}.{node.name}"
241
+ match parent:
242
+ case ast.Import():
243
+ return node.name if node.asname else node.name.partition(".")[0]
244
+ case ast.ImportFrom() if parent.level == 0 and parent.module is not None:
245
+ return f"{parent.module}.{node.name}"
246
+ case _:
247
+ pass
242
248
  if assignments and isinstance(node, ast.Name) and (value := self._assignment(node)) is not None:
243
249
  return self._qualified(value, seen | {node}, assignments=assignments)
244
250
  return None
245
251
 
246
252
  def _assignment(self, node: ast.Name) -> ast.expr | None:
247
253
  parent = self.context.parents.get(node)
248
- if isinstance(parent, ast.Assign) and node in parent.targets:
249
- return parent.value
250
- if isinstance(parent, ast.AnnAssign) and parent.target is node:
251
- return parent.value
252
- if isinstance(parent, ast.NamedExpr) and parent.target is node:
253
- return parent.value
254
+ match parent:
255
+ case ast.Assign() if node in parent.targets:
256
+ return parent.value
257
+ case ast.AnnAssign() if parent.target is node:
258
+ return parent.value
259
+ case ast.NamedExpr() if parent.target is node:
260
+ return parent.value
261
+ case _:
262
+ pass
254
263
  return None
255
264
 
256
265
  def _inplace_target(self, node: ast.AST) -> bool: