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