sarj-python-lint 1.130.0__tar.gz → 1.131.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.130.0 → sarj_python_lint-1.131.0}/PKG-INFO +1 -1
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/pyproject.toml +1 -1
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_pydantic_field_contract.py +80 -26
- sarj_python_lint-1.131.0/src/sarj_python_lint/rules/no_defaulted_environment_setting.py +281 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_invalid_pydantic_bypass.py +68 -13
- sarj_python_lint-1.130.0/src/sarj_python_lint/rules/no_defaulted_environment_setting.py +0 -165
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/.gitignore +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/LICENSE +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/README.md +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/__init__.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/__main__.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/_analysis_session.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/_autofix.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/_autofix_aliases.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/_autofix_annotations.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/_autofix_comments.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/_autofix_declared_contracts.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/_autofix_declared_tests.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/_autofix_docs.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/_autofix_enums.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/_autofix_exhaustiveness.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/_autofix_inert.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/_autofix_parameters.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/_autofix_repeated.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/_autofix_security.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/_autofix_sql_projection.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/_autofix_tests.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/_closed_sql_literal.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/_file_context.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/_filesystem.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/_fixes.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/_parallel.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/_prepared_sources.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/_python_target.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/_ratchet_cli.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/_rule_descriptors.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/_secret_names.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/_source.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/_version.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/application_logging.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/autofix.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/benchmark.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/cast_access.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/interpreter_argv.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/json_boundary.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/py.typed +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/ratchet.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rule_base.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rule_metadata.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/__init__.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_annotation_origins.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_annotation_semantics.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_ast_index.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_ast_names.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_ast_position.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_async_lifecycle.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_binding_inventory.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_closed_helpers.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_comment_narration.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_comments.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_contract_annotation.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_copy_on_write.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_data_union_discriminator.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_declared_contracts.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_dict_key_views.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_docstrings.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_exports.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_fastapi.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_fastapi_access.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_first_party.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_fixed_record.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_fixture_contracts.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_generic_payload.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_imports.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_inert_model_annotation.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_inherited_contract.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_local_alias_fix.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_local_source.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_logging.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_loguru.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_mapping_shape_callbacks.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_namespace_access.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_native_namespace_capability.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_native_object_contracts.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_nominal_project.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_numeric_proof.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_opaque_contracts.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_paths.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_postgres.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_project_index.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_prose_budget.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_pytest.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_pytest_contract_parameters.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_registry.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_resolved_operation_signature.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_resource_provenance.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_route_shapes.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_runtime_bindings.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_runtime_names.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_runtime_registry.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_service_http_callbacks.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_set_fields.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_sql.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_static_json_alias.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_store_sql.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_store_writes.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_suppression_comments.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_test_assertions.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_test_composition.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_test_provenance.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_transactional_sql.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/_type_guard_symbols.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/async_cleanup_registered_synchronously.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/async_executor_shutdown.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/async_mock_call_without_await_assertion.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/async_subprocess_cancellation_cleanup.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/cancel_owned_task_without_join.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/complex_postgres_query_requires_architecture_review.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/defect_xfail_requires_explicit_strict.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/delete_route_returns_no_content.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/docstring_args_restate_signature.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/docstring_returns_restate_signature.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/duplicate_adjacent_exception_handler.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/duplicate_closed_pure_helper.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/duplicate_pytest_fixture_params.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/excessive_commentary.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/failed_probe_zero_threshold.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/fakes_in_shared_location.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/fastapi_class_router_contract.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/fastapi_explicit_openapi_contract.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/fastapi_route_declares_security.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/iac_source_coupled_test.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/invalid_pydantic_field_default.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/mock_without_spec.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/named_record_at_boundaries.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/nan_hidden_by_builtin_min.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/negative_only_http_status_assertion.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_analytical_aggregation_in_postgres_store.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_any_mapping_types.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_async_client_in_constructor.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_async_function_cache.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_before_validator_input_mutation.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_blanket_suppression.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_broad_keyword_capture.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_comment_cruft.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_conflicting_pydantic_alias_validation.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_conftest_test_module_import.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_contradictory_type_guard.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_copied_inherited_docstring.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_cors_wildcard_with_credentials.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_create_verb_in_post_path.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_custom_control_flow_exception.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_database_programmability.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_delete_statement.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_discarded_tagged_outcome.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_discarded_validation_result.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_dual_shape_model_field_reader.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_dunder_all.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_duplicate_dunder_all_entry.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_duplicate_field_validator_body.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_dynamic_builtins.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_exception_text_in_500_detail.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_excessive_cognitive_complexity.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_fastapi_on_event.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_file_level_escape_hatch_suppression.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_first_party_private_import.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_fixed_sleep_before_assert.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_fixed_sleep_in_loop.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_folded_bad_request_not_found.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_frozen_after_validator_field_write.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_generic_json_parser.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_generic_single_export_module.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_hasattr.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_hidden_constructor_fallback.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_impossible_pydantic_field_bounds.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_injected_module_loader.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_input_model_mutation.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_interpreter_source_arguments.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_invalid_argument_name_suppression.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_invalid_pydantic_validator_return.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_loguru_exc_info.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_loguru_printf_format.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_mocked_pydantic_value_object.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_mutating_container_transform.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_mutating_input_with_result.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_nested_pydantic_field_validator.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_nullable_dependency_fallback.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_offset_pagination.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_partial_type_is.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_positional_psycopg_row_escape.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_psycopg_execution_in_loop.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_psycopg_execution_outside_injected_owner.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_random_uuid_in_sql.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_raw_connection_in_tests.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_raw_source_text_test_oracle.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_recording_store.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_redundant_attribute_unpacking.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_redundant_literal_description.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_redundant_local_alias.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_redundant_module_alias_exports.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_redundant_sql_alias.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_repeated_string_literal.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_repeated_test_body.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_restated_comment.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_secret_in_log.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_select_star.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_service_behavior_in_settings.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_shallow_container_type_guard.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_shallow_record_type_guard.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_shared_mutable_default.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_slash_collection_root_under_prefix.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_string_concat_in_loop.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_swallowed_asyncio_cancellation.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_sys_path_mutation.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_tautological_expect.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_test_comments.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_test_method_grafting.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_typed_doc_sections.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_unique_violation_message_match.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_unknown_pydantic_validator_field.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_unnecessary_docstring.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_unused_copy_result.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_unused_underscored_keyword_parameter.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_unused_value_marker.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_vague_suppression_description.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_whole_request_response_payload_in_log.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/no_work_verb_get_route.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/opaque_parametrize_case_needs_id.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/over_mocked_test.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/phase_label_comment.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_application_model_joins.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_autospec_for_callable_mock.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_bulk_upsert.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_class_row.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_collection_comprehension.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_configured_cloud_scope.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_constant_time_secret_compare.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_coordinated_state_owner.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_declarative_batch_validation.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_direct_import_module.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_discriminated_model_union.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_fstring_over_concat.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_grouped_settings.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_immutable_module_constant.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_injected_dependency_over_monkeypatch.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_injected_service.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_library_fake.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_match_assert_never.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_match_exception_dispatch.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_match_type_dispatch.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_match_value_dispatch.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_module_level_constant.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_monkeypatch_for_process_state_in_test.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_monotonic_for_elapsed_time.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_namedtuple_over_tuple_return.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_native_string_check.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_nominal_id_types.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_non_nullable_collection.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_optional_composite.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_or_pattern.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_precise_object_contract.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_psycopg_executemany.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_pydantic_json_value.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_pydantic_model_assertion.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_pytest_dependency_fixtures.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_pytest_fixture_contract.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_pytest_fixture_injection.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_regex_fullmatch.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_required_constructor_parameters.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_runtime_validation.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_self_documenting_constant.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_self_type_annotation.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_set_isdisjoint.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_single_psycopg_cursor.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_str_enum.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_struct_over_namedtuple.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_typed_cli.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_typed_mapping_get.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_typed_settings_field.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_validated_uuid_comparison.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_walrus_awaited_none_guard.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_walrus_comprehension_filter.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_walrus_regex_match.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/prefer_walrus_stream_loop.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/production_derived_test_cases.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/pytest_fixture_returns_bare_tuple.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/pytest_fixture_returns_closed_resource.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/redundant_class_docstring.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/redundant_docstring.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/redundant_module_docstring.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/redundant_test_constructor_forwarder.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/repeated_kwarg_heavy_call_in_test.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/repeated_static_call_cases.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/repeated_test_composition.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/repeated_unimplemented_test_contract.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/require_constrained_api_integer.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/require_exp_on_jwt_decode.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/require_explicit_contract_implementation.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/require_explicit_psycopg_transaction.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/require_explicit_service_contract.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/require_injectable_retry_sleep.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/require_keyword_only_swap_prone_params.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/require_nodecode_for_splitting_settings_field.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/require_port_for_service.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/require_precise_factory_signature.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/require_public_dependency_contract.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/require_pydantic_for_external_json.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/require_pydantic_for_mapping_shape.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/require_pydantic_for_structured_payload.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/require_pydantic_ordinal_lower_bound.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/restated_test_docstring.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/service_singleton_delegates_to_bulk.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/shared_mutable_pydantic_factory.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/stepdown.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/store_field_update_reuses_upsert.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/store_get_delegates_to_bulk_read.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/store_insert_requires_explicit_conflict_policy.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/store_insert_requires_on_conflict.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/store_mutation_command_fanout.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/subprocess_kill_without_reap.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/test_without_explicit_oracle.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/timestamp_order_requires_tiebreaker.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/trailing_value_narration.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/typed_error_reasons.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/uncontrolled_randomness_in_test.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/unused_mock_setup.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/rules/unused_test_factory_option.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.0}/src/sarj_python_lint/sql_literals.py +0 -0
- {sarj_python_lint-1.130.0 → sarj_python_lint-1.131.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.131.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/
|
|
@@ -10,6 +10,7 @@ from packaging.requirements import InvalidRequirement, Requirement
|
|
|
10
10
|
from packaging.version import InvalidVersion, Version
|
|
11
11
|
|
|
12
12
|
from sarj_python_lint.json_boundary import is_object_mapping
|
|
13
|
+
from sarj_python_lint.rules._annotation_origins import type_parameter_shadow
|
|
13
14
|
from sarj_python_lint.rules._first_party import distribution_root
|
|
14
15
|
from sarj_python_lint.rules._namespace_access import dynamic_namespace_access
|
|
15
16
|
from sarj_python_lint.rules._native_namespace_capability import native_namespace_capability_escapes
|
|
@@ -21,6 +22,7 @@ if TYPE_CHECKING:
|
|
|
21
22
|
|
|
22
23
|
|
|
23
24
|
MODEL_SOURCES = frozenset({"pydantic", "pydantic.main"})
|
|
25
|
+
SETTINGS_SOURCES = frozenset({"pydantic_settings", "pydantic_settings.main"})
|
|
24
26
|
FIELD_SOURCES = frozenset({"pydantic", "pydantic.fields"})
|
|
25
27
|
DECORATOR_SOURCES = frozenset({"pydantic", "pydantic.functional_validators", "pydantic.functional_serializers"})
|
|
26
28
|
TYPING_SOURCES = frozenset({"typing", "typing_extensions"})
|
|
@@ -31,17 +33,46 @@ _BUILTIN_SOURCES = frozenset({"builtins"})
|
|
|
31
33
|
_SENSITIVE_MODULES = frozenset({"pydantic", "typing", "typing_extensions", "builtins"})
|
|
32
34
|
|
|
33
35
|
|
|
34
|
-
def
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
def required_default_sentinel(value: ast.expr, context: PythonFileContext, *, at: ast.AST | None = None) -> bool:
|
|
37
|
+
if isinstance(value, ast.Constant):
|
|
38
|
+
return value.value is Ellipsis
|
|
39
|
+
if not isinstance(value, ast.Name) or value.id != "Ellipsis":
|
|
40
|
+
return False
|
|
41
|
+
anchor = value if at is None else at
|
|
42
|
+
inventory = context.binding_inventory
|
|
38
43
|
if (
|
|
39
|
-
|
|
40
|
-
or
|
|
41
|
-
or
|
|
42
|
-
or _escaped_imports(context)
|
|
43
|
-
or dynamic_namespace_access(context.nodes(ast.AST), context.imports, context.parents)
|
|
44
|
+
inventory.wildcard
|
|
45
|
+
or not context.static_resource_provenance.builtin_namespace_untouched
|
|
46
|
+
or type_parameter_shadow("Ellipsis", anchor, context)
|
|
44
47
|
):
|
|
48
|
+
return False
|
|
49
|
+
scope = inventory.scope(anchor)
|
|
50
|
+
while scope is not None:
|
|
51
|
+
if "Ellipsis" in inventory.bindings.get(scope, {}):
|
|
52
|
+
return False
|
|
53
|
+
scope = inventory.scope(scope)
|
|
54
|
+
return True
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def model_namespace_hazards(
|
|
58
|
+
context: PythonFileContext, *, include_settings: bool = False, escape_symbols: frozenset[str] | None = None
|
|
59
|
+
) -> bool:
|
|
60
|
+
modules = _SENSITIVE_MODULES | {"pydantic_settings"} if include_settings else _SENSITIVE_MODULES
|
|
61
|
+
return (
|
|
62
|
+
context.has_wildcard_import
|
|
63
|
+
or native_namespace_capability_escapes(context)
|
|
64
|
+
or _mutated_imports(context, modules)
|
|
65
|
+
or _ambiguous_imports(context, modules)
|
|
66
|
+
or _escaped_imports(context, modules, escape_symbols)
|
|
67
|
+
or dynamic_namespace_access(context.nodes(ast.AST), context.imports, context.parents)
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
def direct_models(
|
|
72
|
+
context: PythonFileContext, *, methods: bool = False, include_settings: bool = False
|
|
73
|
+
) -> tuple[ast.ClassDef, ...]:
|
|
74
|
+
tree = context.tree
|
|
75
|
+
if tree is None or context.generated or model_namespace_hazards(context, include_settings=include_settings):
|
|
45
76
|
return ()
|
|
46
77
|
provenance = context.static_resource_provenance
|
|
47
78
|
return tuple(
|
|
@@ -49,7 +80,13 @@ def direct_models(context: PythonFileContext, *, methods: bool = False) -> tuple
|
|
|
49
80
|
for node in tree.body
|
|
50
81
|
if isinstance(node, ast.ClassDef)
|
|
51
82
|
and len(node.bases) == 1
|
|
52
|
-
and
|
|
83
|
+
and (
|
|
84
|
+
context.imports.resolves(node.bases[0], sources=MODEL_SOURCES, symbol="BaseModel")
|
|
85
|
+
or (
|
|
86
|
+
include_settings
|
|
87
|
+
and context.module_imports.resolves(node.bases[0], sources=SETTINGS_SOURCES, symbol="BaseSettings")
|
|
88
|
+
)
|
|
89
|
+
)
|
|
53
90
|
and not node.decorator_list
|
|
54
91
|
and not node.keywords
|
|
55
92
|
and not node.type_params
|
|
@@ -187,7 +224,7 @@ def inert_class_value(
|
|
|
187
224
|
context: PythonFileContext, value: ast.expr, provenance: ResourceProvenance, *, pydantic_fields: bool
|
|
188
225
|
) -> bool:
|
|
189
226
|
if not isinstance(value, ast.Call):
|
|
190
|
-
return literal_value(value)
|
|
227
|
+
return literal_value(value) or required_default_sentinel(value, context)
|
|
191
228
|
qualified = context.module_imports.resolved_qualified_name(value.func)
|
|
192
229
|
if (
|
|
193
230
|
not pydantic_fields
|
|
@@ -196,10 +233,15 @@ def inert_class_value(
|
|
|
196
233
|
or not provenance.imported(value.func, qualified)
|
|
197
234
|
):
|
|
198
235
|
return False
|
|
199
|
-
|
|
236
|
+
field_call = qualified in {"pydantic.Field", "pydantic.fields.Field"}
|
|
237
|
+
return all(
|
|
238
|
+
literal_value(argument) or (field_call and index == 0 and required_default_sentinel(argument, context))
|
|
239
|
+
for index, argument in enumerate(value.args)
|
|
240
|
+
) and all(
|
|
200
241
|
keyword.arg is not None
|
|
201
242
|
and (
|
|
202
243
|
literal_value(keyword.value)
|
|
244
|
+
or (field_call and keyword.arg == "default" and required_default_sentinel(keyword.value, context))
|
|
203
245
|
or (
|
|
204
246
|
keyword.arg == "default_factory"
|
|
205
247
|
and isinstance(keyword.value, ast.Name)
|
|
@@ -212,26 +254,26 @@ def inert_class_value(
|
|
|
212
254
|
)
|
|
213
255
|
|
|
214
256
|
|
|
215
|
-
def _mutated_imports(context: PythonFileContext) -> bool:
|
|
257
|
+
def _mutated_imports(context: PythonFileContext, modules: frozenset[str]) -> bool:
|
|
216
258
|
for node in context.nodes(ast.Attribute, ast.Subscript, ast.Call):
|
|
217
259
|
if isinstance(node, (ast.Attribute, ast.Subscript)) and isinstance(node.ctx, (ast.Store, ast.Del)):
|
|
218
|
-
if _sensitive_import_root(node, context):
|
|
260
|
+
if _sensitive_import_root(node, context, modules):
|
|
219
261
|
return True
|
|
220
262
|
elif (
|
|
221
263
|
isinstance(node, ast.Call)
|
|
222
264
|
and node.args
|
|
223
265
|
and _is_attribute_mutator(node.func, context)
|
|
224
|
-
and _sensitive_import_root(node.args[0], context)
|
|
266
|
+
and _sensitive_import_root(node.args[0], context, modules)
|
|
225
267
|
):
|
|
226
268
|
return True
|
|
227
269
|
return False
|
|
228
270
|
|
|
229
271
|
|
|
230
|
-
def _sensitive_import_root(node: ast.expr, context: PythonFileContext) -> bool:
|
|
272
|
+
def _sensitive_import_root(node: ast.expr, context: PythonFileContext, modules: frozenset[str]) -> bool:
|
|
231
273
|
while isinstance(node, (ast.Attribute, ast.Subscript)):
|
|
232
274
|
node = node.value
|
|
233
275
|
binding = context.module_imports.bindings.get(node.id) if isinstance(node, ast.Name) else None
|
|
234
|
-
return binding is not None and binding.module.partition(".")[0] in
|
|
276
|
+
return binding is not None and binding.module.partition(".")[0] in modules
|
|
235
277
|
|
|
236
278
|
|
|
237
279
|
def _is_attribute_mutator(node: ast.expr, context: PythonFileContext) -> bool:
|
|
@@ -241,19 +283,29 @@ def _is_attribute_mutator(node: ast.expr, context: PythonFileContext) -> bool:
|
|
|
241
283
|
) or context.imports.resolved_symbol(node, sources=frozenset({"builtins"})) in names
|
|
242
284
|
|
|
243
285
|
|
|
244
|
-
def _escaped_imports(
|
|
286
|
+
def _escaped_imports(
|
|
287
|
+
context: PythonFileContext, modules: frozenset[str], symbols: frozenset[str] | None = None
|
|
288
|
+
) -> bool:
|
|
245
289
|
for node in context.nodes(ast.Name, ast.Attribute):
|
|
246
|
-
if not isinstance(node.ctx, ast.Load) or not _sensitive_import_root(node, context):
|
|
290
|
+
if not isinstance(node.ctx, ast.Load) or not _sensitive_import_root(node, context, modules):
|
|
247
291
|
continue
|
|
248
292
|
parent = context.parents.get(node)
|
|
249
293
|
if isinstance(parent, ast.Attribute) and parent.value is node:
|
|
250
294
|
continue
|
|
295
|
+
if symbols is not None and not _escape_in_scope(node, context, symbols):
|
|
296
|
+
continue
|
|
251
297
|
if (isinstance(node, ast.Name) and node.id == "TYPE_CHECKING") or _type_reference(node, parent):
|
|
252
298
|
continue
|
|
253
299
|
return True
|
|
254
300
|
return False
|
|
255
301
|
|
|
256
302
|
|
|
303
|
+
def _escape_in_scope(node: ast.expr, context: PythonFileContext, symbols: frozenset[str]) -> bool:
|
|
304
|
+
qualified = context.module_imports.resolved_qualified_name(node)
|
|
305
|
+
# A whole module stays a namespace capability even when named symbols are narrowed.
|
|
306
|
+
return qualified is None or any(qualified == symbol or symbol.startswith(f"{qualified}.") for symbol in symbols)
|
|
307
|
+
|
|
308
|
+
|
|
257
309
|
def _type_reference(node: ast.expr, parent: ast.AST | None) -> bool:
|
|
258
310
|
match parent:
|
|
259
311
|
case ast.Call(func=func):
|
|
@@ -273,28 +325,30 @@ def _type_reference(node: ast.expr, parent: ast.AST | None) -> bool:
|
|
|
273
325
|
return False
|
|
274
326
|
|
|
275
327
|
|
|
276
|
-
def _ambiguous_imports(context: PythonFileContext) -> bool:
|
|
328
|
+
def _ambiguous_imports(context: PythonFileContext, modules: frozenset[str]) -> bool:
|
|
277
329
|
return any(
|
|
278
|
-
_nested_namespace_import(node, context) or _ambiguous_import(node, context)
|
|
330
|
+
_nested_namespace_import(node, context, modules) or _ambiguous_import(node, context, modules)
|
|
279
331
|
for node in context.nodes(ast.Import, ast.ImportFrom)
|
|
280
332
|
)
|
|
281
333
|
|
|
282
334
|
|
|
283
|
-
def _nested_namespace_import(
|
|
335
|
+
def _nested_namespace_import(
|
|
336
|
+
node: ast.Import | ast.ImportFrom, context: PythonFileContext, modules: frozenset[str]
|
|
337
|
+
) -> bool:
|
|
284
338
|
if context.parents.get(node) is context.tree:
|
|
285
339
|
return False
|
|
286
340
|
if isinstance(node, ast.ImportFrom):
|
|
287
|
-
return (node.module or "").partition(".")[0] in
|
|
288
|
-
return any(alias.name.partition(".")[0] in
|
|
341
|
+
return (node.module or "").partition(".")[0] in modules
|
|
342
|
+
return any(alias.name.partition(".")[0] in modules for alias in node.names)
|
|
289
343
|
|
|
290
344
|
|
|
291
|
-
def _ambiguous_import(node: ast.Import | ast.ImportFrom, context: PythonFileContext) -> bool:
|
|
345
|
+
def _ambiguous_import(node: ast.Import | ast.ImportFrom, context: PythonFileContext, modules: frozenset[str]) -> bool:
|
|
292
346
|
for alias in node.names:
|
|
293
347
|
name = alias.asname or alias.name.partition(".")[0]
|
|
294
348
|
if name in _BUILTIN_BINDINGS:
|
|
295
349
|
return True
|
|
296
350
|
binding = context.module_imports.bindings.get(name)
|
|
297
|
-
if binding is None or binding.module.partition(".")[0] not in
|
|
351
|
+
if binding is None or binding.module.partition(".")[0] not in modules - {"builtins"}:
|
|
298
352
|
continue
|
|
299
353
|
if context.parents.get(node) is not context.tree:
|
|
300
354
|
return True
|
|
@@ -0,0 +1,281 @@
|
|
|
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._pydantic_field_contract import model_namespace_hazards, required_default_sentinel
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
if TYPE_CHECKING:
|
|
23
|
+
from sarj_python_lint._file_context import PythonFileContext
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
_SETTINGS_BASES = frozenset({"pydantic_settings.BaseSettings", "pydantic_settings.main.BaseSettings"})
|
|
27
|
+
_FIELD_PROVIDERS = frozenset({"pydantic.Field", "pydantic.fields.Field"})
|
|
28
|
+
_ANNOTATED = frozenset({"typing.Annotated", "typing_extensions.Annotated"})
|
|
29
|
+
_METADATA_WRAPPERS = frozenset(
|
|
30
|
+
{"typing.ClassVar", "typing_extensions.ClassVar", "typing.Final", "typing_extensions.Final"}
|
|
31
|
+
)
|
|
32
|
+
_NATIVE_PROVIDERS = (
|
|
33
|
+
_SETTINGS_BASES
|
|
34
|
+
| _FIELD_PROVIDERS
|
|
35
|
+
| _ANNOTATED
|
|
36
|
+
| _METADATA_WRAPPERS
|
|
37
|
+
| {"typing.TypeAlias", "typing_extensions.TypeAlias"}
|
|
38
|
+
)
|
|
39
|
+
_MAX_METADATA_DEPTH = 16
|
|
40
|
+
_MAX_METADATA_FIELDS = 64
|
|
41
|
+
_ENVIRONMENT = "environment"
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
@final
|
|
45
|
+
class NoDefaultedEnvironmentSetting(Rule):
|
|
46
|
+
id = "no-defaulted-environment-setting"
|
|
47
|
+
code = "SARJ497"
|
|
48
|
+
documentation = RuleDocumentation(
|
|
49
|
+
default_level=Severity.WARNING,
|
|
50
|
+
summary="A settings field that names the deployment environment must not declare a default.",
|
|
51
|
+
rationale=(
|
|
52
|
+
"A defaulted environment setting lets a deployment that forgot the variable start as the default "
|
|
53
|
+
"environment, so it quietly behaves like local or development code and can share state with another stack."
|
|
54
|
+
),
|
|
55
|
+
remediation=(
|
|
56
|
+
'Declare the field without a default, for example `environment: Environment = Field(alias="ENVIRONMENT")`, '
|
|
57
|
+
"so a missing value fails at startup."
|
|
58
|
+
),
|
|
59
|
+
category=RuleCategory.CORRECTNESS,
|
|
60
|
+
autofix=AutofixPolicy.NONE,
|
|
61
|
+
limitations=(
|
|
62
|
+
"Only classes deriving from pydantic-settings BaseSettings directly or through a class in the same file are checked.",
|
|
63
|
+
"A field qualifies when its name or literal alias is `environment` in any letter case.",
|
|
64
|
+
"Other environment-isolating settings, such as resource-name prefixes, have no stable name and are not checked.",
|
|
65
|
+
"Source-proven Annotated Field metadata and assignment defaults are merged in order; literal Ellipsis and the proven unshadowed bare builtin Ellipsis are equivalent required markers. Field Ellipsis retains an earlier default, bare Ellipsis resets it and default_factory=None clears an earlier factory. Only literal input aliases are followed; private fields, model_config, ClassVar/Final metadata and opaque Annotated metadata are excluded. Namespace mutation/escape, ambiguous imports and bounded metadata overflow abstain.",
|
|
66
|
+
),
|
|
67
|
+
examples=(
|
|
68
|
+
RuleExample(
|
|
69
|
+
example_id="annotated-defaulted-environment",
|
|
70
|
+
scenario="annotated-environment",
|
|
71
|
+
title="Annotated metadata still supplies a deployment default",
|
|
72
|
+
outcome=ExampleOutcome.MATCH,
|
|
73
|
+
files=(
|
|
74
|
+
ExampleFile.python(
|
|
75
|
+
"service/settings.py",
|
|
76
|
+
"from typing import Annotated\nfrom pydantic import Field\n"
|
|
77
|
+
"from pydantic_settings import BaseSettings\nclass Settings(BaseSettings):\n"
|
|
78
|
+
" deployment: Annotated[str, Field(default='prod', alias='ENVIRONMENT')]\n",
|
|
79
|
+
),
|
|
80
|
+
),
|
|
81
|
+
focus_path=PurePosixPath("service/settings.py"),
|
|
82
|
+
expected_count=1,
|
|
83
|
+
public=True,
|
|
84
|
+
),
|
|
85
|
+
RuleExample(
|
|
86
|
+
example_id="annotated-required-environment",
|
|
87
|
+
scenario="annotated-environment",
|
|
88
|
+
title="Annotated metadata can leave the input required",
|
|
89
|
+
outcome=ExampleOutcome.NO_MATCH,
|
|
90
|
+
files=(
|
|
91
|
+
ExampleFile.python(
|
|
92
|
+
"service/settings.py",
|
|
93
|
+
"from typing import Annotated\nfrom pydantic import Field\n"
|
|
94
|
+
"from pydantic_settings import BaseSettings\nclass Settings(BaseSettings):\n"
|
|
95
|
+
" deployment: Annotated[str, Field(alias='ENVIRONMENT')]\n",
|
|
96
|
+
),
|
|
97
|
+
),
|
|
98
|
+
focus_path=PurePosixPath("service/settings.py"),
|
|
99
|
+
expected_count=0,
|
|
100
|
+
public=True,
|
|
101
|
+
),
|
|
102
|
+
RuleExample(
|
|
103
|
+
example_id="defaulted-environment",
|
|
104
|
+
title="A defaulted environment pretends to be local",
|
|
105
|
+
outcome=ExampleOutcome.MATCH,
|
|
106
|
+
files=(
|
|
107
|
+
ExampleFile.python(
|
|
108
|
+
"service/settings.py",
|
|
109
|
+
"from pydantic import Field\nfrom pydantic_settings import BaseSettings\n\n"
|
|
110
|
+
"class Settings(BaseSettings):\n"
|
|
111
|
+
" environment: str = Field(default='local', alias='ENVIRONMENT')\n",
|
|
112
|
+
),
|
|
113
|
+
),
|
|
114
|
+
focus_path=PurePosixPath("service/settings.py"),
|
|
115
|
+
expected_count=1,
|
|
116
|
+
public=True,
|
|
117
|
+
),
|
|
118
|
+
RuleExample(
|
|
119
|
+
example_id="required-environment",
|
|
120
|
+
title="A required environment fails at startup when missing",
|
|
121
|
+
outcome=ExampleOutcome.NO_MATCH,
|
|
122
|
+
files=(
|
|
123
|
+
ExampleFile.python(
|
|
124
|
+
"service/settings.py",
|
|
125
|
+
"from pydantic import Field\nfrom pydantic_settings import BaseSettings\n\n"
|
|
126
|
+
"class Settings(BaseSettings):\n"
|
|
127
|
+
" environment: str = Field(alias='ENVIRONMENT')\n",
|
|
128
|
+
),
|
|
129
|
+
),
|
|
130
|
+
focus_path=PurePosixPath("service/settings.py"),
|
|
131
|
+
expected_count=0,
|
|
132
|
+
public=True,
|
|
133
|
+
),
|
|
134
|
+
),
|
|
135
|
+
)
|
|
136
|
+
description = documentation.summary
|
|
137
|
+
|
|
138
|
+
@override
|
|
139
|
+
def check_context(self, context: PythonFileContext) -> list[Diagnostic]:
|
|
140
|
+
tree = context.tree
|
|
141
|
+
if tree is None or context.generated or "BaseSettings" not in context.symbol_source:
|
|
142
|
+
return []
|
|
143
|
+
if model_namespace_hazards(context, include_settings=True, escape_symbols=_NATIVE_PROVIDERS):
|
|
144
|
+
return []
|
|
145
|
+
facts = AnnotationOrigins(context)
|
|
146
|
+
settings_classes: set[ast.ClassDef] = set()
|
|
147
|
+
diagnostics: list[Diagnostic] = []
|
|
148
|
+
for model in tree.body:
|
|
149
|
+
if not isinstance(model, ast.ClassDef) or not _is_settings_class(model, settings_classes, facts):
|
|
150
|
+
continue
|
|
151
|
+
settings_classes.add(model)
|
|
152
|
+
diagnostics.extend(
|
|
153
|
+
Diagnostic(
|
|
154
|
+
context.path,
|
|
155
|
+
field.lineno,
|
|
156
|
+
field.col_offset + 1,
|
|
157
|
+
self.code,
|
|
158
|
+
"This environment setting has a default, so a deployment missing the variable starts as that "
|
|
159
|
+
"environment. Remove the default so startup fails instead.",
|
|
160
|
+
severity=Severity.WARNING,
|
|
161
|
+
)
|
|
162
|
+
for field in model.body
|
|
163
|
+
if isinstance(field, ast.AnnAssign) and _is_defaulted_environment(field, facts)
|
|
164
|
+
)
|
|
165
|
+
return diagnostics
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
def _is_settings_class(model: ast.ClassDef, known: set[ast.ClassDef], facts: AnnotationOrigins) -> bool:
|
|
169
|
+
return any(
|
|
170
|
+
facts.qualified(base, base) in _SETTINGS_BASES
|
|
171
|
+
or (isinstance(base, ast.Name) and facts.provenance.binding(base.id, base) in known)
|
|
172
|
+
for base in model.bases
|
|
173
|
+
)
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
def _is_defaulted_environment(field: ast.AnnAssign, facts: AnnotationOrigins) -> bool:
|
|
177
|
+
if not isinstance(field.target, ast.Name) or field.target.id.startswith("_") or field.target.id == "model_config":
|
|
178
|
+
return False
|
|
179
|
+
options = _field_options(field, facts)
|
|
180
|
+
if options is None:
|
|
181
|
+
return False
|
|
182
|
+
alias = options.get("validation_alias")
|
|
183
|
+
if not _is_environment_name(
|
|
184
|
+
field.target.id, alias.value if isinstance(alias, ast.Constant) and isinstance(alias.value, str) else None
|
|
185
|
+
):
|
|
186
|
+
return False
|
|
187
|
+
factory = options.get("default_factory")
|
|
188
|
+
if factory is not None and not _is_none(factory):
|
|
189
|
+
return True
|
|
190
|
+
default = options.get("default")
|
|
191
|
+
return default is not None and not _is_none(default)
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
def _field_options(field: ast.AnnAssign, facts: AnnotationOrigins) -> dict[str, ast.expr] | None:
|
|
195
|
+
calls = _annotated_fields(field.annotation, facts)
|
|
196
|
+
if calls is None:
|
|
197
|
+
return None
|
|
198
|
+
bare_default = field.value
|
|
199
|
+
if isinstance(bare_default, ast.Call) and facts.qualified(bare_default.func, bare_default) in _FIELD_PROVIDERS:
|
|
200
|
+
calls.append((bare_default, bare_default))
|
|
201
|
+
bare_default = None
|
|
202
|
+
options: dict[str, ast.expr] = {}
|
|
203
|
+
for call, at in calls:
|
|
204
|
+
if not _merge_field_options(call, at, options, facts):
|
|
205
|
+
return None
|
|
206
|
+
if bare_default is not None:
|
|
207
|
+
if required_default_sentinel(bare_default, facts.context):
|
|
208
|
+
options.pop("default", None)
|
|
209
|
+
else:
|
|
210
|
+
options["default"] = bare_default
|
|
211
|
+
return options
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
def _merge_field_options(call: ast.Call, at: ast.expr, options: dict[str, ast.expr], facts: AnnotationOrigins) -> bool:
|
|
215
|
+
if (
|
|
216
|
+
len(call.args) > 1
|
|
217
|
+
or any(keyword.arg is None for keyword in call.keywords)
|
|
218
|
+
or any(isinstance(argument, ast.Starred) for argument in call.args)
|
|
219
|
+
):
|
|
220
|
+
return False
|
|
221
|
+
supplied = {keyword.arg: keyword.value for keyword in call.keywords if keyword.arg is not None}
|
|
222
|
+
default = supplied.get("default", call.args[0] if call.args else None)
|
|
223
|
+
if default is not None and not required_default_sentinel(default, facts.context, at=at):
|
|
224
|
+
options["default"] = default
|
|
225
|
+
if "default_factory" in supplied:
|
|
226
|
+
options["default_factory"] = supplied["default_factory"]
|
|
227
|
+
if "alias" in supplied:
|
|
228
|
+
options["validation_alias"] = supplied["alias"]
|
|
229
|
+
validation_alias = supplied.get("validation_alias")
|
|
230
|
+
# Field maps None to its own alias; without one, the earlier input alias remains.
|
|
231
|
+
if validation_alias is not None and not _is_none(validation_alias):
|
|
232
|
+
options["validation_alias"] = validation_alias
|
|
233
|
+
return True
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
def _annotated_fields(annotation: ast.expr, facts: AnnotationOrigins) -> list[tuple[ast.Call, ast.expr]] | None:
|
|
237
|
+
layers = _annotated_layers(annotation, facts)
|
|
238
|
+
if layers is None:
|
|
239
|
+
return None
|
|
240
|
+
calls: list[tuple[ast.Call, ast.expr]] = []
|
|
241
|
+
for metadata, at in reversed(layers):
|
|
242
|
+
for value in metadata:
|
|
243
|
+
if (
|
|
244
|
+
not isinstance(value, ast.Call)
|
|
245
|
+
or facts.qualified(value.func, at) not in _FIELD_PROVIDERS
|
|
246
|
+
or len(calls) >= _MAX_METADATA_FIELDS
|
|
247
|
+
):
|
|
248
|
+
return None
|
|
249
|
+
calls.append((value, at))
|
|
250
|
+
return calls
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
def _annotated_layers(annotation: ast.expr, facts: AnnotationOrigins) -> list[tuple[list[ast.expr], ast.expr]] | None:
|
|
254
|
+
layers: list[tuple[list[ast.expr], ast.expr]] = []
|
|
255
|
+
current = at = annotation
|
|
256
|
+
for _ in range(_MAX_METADATA_DEPTH):
|
|
257
|
+
resolved = facts.resolve_annotation(current, at=at)
|
|
258
|
+
if resolved is None:
|
|
259
|
+
return None
|
|
260
|
+
current, at = resolved.expression, resolved.at
|
|
261
|
+
if not isinstance(current, ast.Subscript):
|
|
262
|
+
return layers
|
|
263
|
+
wrapper = facts.qualified(current.value, at)
|
|
264
|
+
if wrapper in _METADATA_WRAPPERS:
|
|
265
|
+
return None
|
|
266
|
+
if wrapper not in _ANNOTATED:
|
|
267
|
+
return layers
|
|
268
|
+
members = current.slice.elts if isinstance(current.slice, ast.Tuple) else [current.slice]
|
|
269
|
+
if not members[1:]:
|
|
270
|
+
return None
|
|
271
|
+
layers.append((members[1:], at))
|
|
272
|
+
current = members[0]
|
|
273
|
+
return None
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
def _is_environment_name(name: str, alias: str | None) -> bool:
|
|
277
|
+
return name.lower() == _ENVIRONMENT or (alias is not None and alias.lower() == _ENVIRONMENT)
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
def _is_none(value: ast.expr) -> bool:
|
|
281
|
+
return isinstance(value, ast.Constant) and value.value is None
|