sarj-python-lint 1.115.0__tar.gz → 1.116.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/PKG-INFO +1 -1
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/pyproject.toml +1 -1
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/__main__.py +5 -2
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/_analysis_session.py +2 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/_rule_descriptors.py +9 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_fastapi.py +56 -11
- sarj_python_lint-1.116.1/src/sarj_python_lint/rules/_fastapi_access.py +351 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_project_index.py +2 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_registry.py +2 -0
- sarj_python_lint-1.116.1/src/sarj_python_lint/rules/fastapi_route_declares_security.py +225 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/.gitignore +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/LICENSE +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/README.md +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/__init__.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/_autofix.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/_autofix_aliases.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/_autofix_annotations.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/_autofix_comments.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/_autofix_declared_contracts.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/_autofix_declared_tests.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/_autofix_docs.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/_autofix_enums.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/_autofix_exhaustiveness.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/_autofix_inert.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/_autofix_parameters.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/_autofix_repeated.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/_autofix_security.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/_autofix_sql_projection.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/_autofix_tests.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/_closed_sql_literal.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/_file_context.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/_filesystem.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/_fixes.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/_parallel.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/_prepared_sources.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/_python_target.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/_ratchet_cli.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/_secret_names.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/_source.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/_version.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/application_logging.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/autofix.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/benchmark.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/cast_access.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/interpreter_argv.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/json_boundary.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/py.typed +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/ratchet.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rule_base.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rule_metadata.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/__init__.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_annotation_origins.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_annotation_semantics.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_ast_index.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_ast_names.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_ast_position.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_async_lifecycle.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_binding_inventory.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_closed_helpers.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_comment_narration.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_comments.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_contract_annotation.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_copy_on_write.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_data_union_discriminator.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_declared_contracts.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_dict_key_views.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_docstrings.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_exports.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_first_party.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_fixed_record.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_fixture_contracts.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_imports.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_inert_model_annotation.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_inherited_contract.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_local_alias_fix.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_local_source.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_logging.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_loguru.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_mapping_shape_callbacks.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_namespace_access.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_native_namespace_capability.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_native_object_contracts.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_nominal_project.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_numeric_proof.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_opaque_contracts.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_paths.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_postgres.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_prose_budget.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_pydantic_field_contract.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_pytest.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_pytest_contract_parameters.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_resolved_operation_signature.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_resource_provenance.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_route_shapes.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_runtime_bindings.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_runtime_names.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_runtime_registry.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_service_http_callbacks.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_set_fields.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_sql.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_static_json_alias.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_store_sql.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_store_writes.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_suppression_comments.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_test_assertions.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_test_composition.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_test_provenance.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_transactional_sql.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_type_guard_symbols.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/async_cleanup_registered_synchronously.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/async_executor_shutdown.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/async_mock_call_without_await_assertion.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/async_subprocess_cancellation_cleanup.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/cancel_owned_task_without_join.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/complex_postgres_query_requires_architecture_review.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/defect_xfail_requires_explicit_strict.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/delete_route_returns_no_content.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/docstring_args_restate_signature.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/docstring_returns_restate_signature.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/duplicate_adjacent_exception_handler.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/duplicate_closed_pure_helper.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/duplicate_pytest_fixture_params.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/excessive_commentary.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/failed_probe_zero_threshold.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/fakes_in_shared_location.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/fastapi_class_router_contract.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/fastapi_explicit_openapi_contract.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/iac_source_coupled_test.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/invalid_pydantic_field_default.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/mock_without_spec.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/named_record_at_boundaries.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/nan_hidden_by_builtin_min.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/negative_only_http_status_assertion.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_analytical_aggregation_in_postgres_store.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_any_mapping_types.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_async_client_in_constructor.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_async_function_cache.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_before_validator_input_mutation.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_blanket_suppression.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_broad_keyword_capture.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_comment_cruft.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_conflicting_pydantic_alias_validation.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_conftest_test_module_import.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_contradictory_type_guard.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_copied_inherited_docstring.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_cors_wildcard_with_credentials.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_create_verb_in_post_path.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_custom_control_flow_exception.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_database_programmability.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_defaulted_environment_setting.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_delete_statement.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_discarded_tagged_outcome.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_discarded_validation_result.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_dual_shape_model_field_reader.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_dunder_all.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_duplicate_dunder_all_entry.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_duplicate_field_validator_body.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_dynamic_builtins.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_exception_text_in_500_detail.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_excessive_cognitive_complexity.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_fastapi_on_event.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_file_level_escape_hatch_suppression.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_first_party_private_import.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_fixed_sleep_before_assert.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_fixed_sleep_in_loop.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_folded_bad_request_not_found.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_frozen_after_validator_field_write.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_generic_json_parser.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_generic_single_export_module.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_hasattr.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_hidden_constructor_fallback.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_impossible_pydantic_field_bounds.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_injected_module_loader.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_input_model_mutation.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_interpreter_source_arguments.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_invalid_argument_name_suppression.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_invalid_pydantic_bypass.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_invalid_pydantic_validator_return.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_loguru_exc_info.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_loguru_printf_format.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_mocked_pydantic_value_object.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_mutating_container_transform.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_mutating_input_with_result.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_nested_pydantic_field_validator.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_nullable_dependency_fallback.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_offset_pagination.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_partial_type_is.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_positional_psycopg_row_escape.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_psycopg_execution_in_loop.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_psycopg_execution_outside_injected_owner.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_random_uuid_in_sql.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_raw_connection_in_tests.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_raw_source_text_test_oracle.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_recording_store.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_redundant_attribute_unpacking.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_redundant_literal_description.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_redundant_local_alias.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_redundant_module_alias_exports.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_redundant_sql_alias.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_repeated_string_literal.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_repeated_test_body.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_restated_comment.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_secret_in_log.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_select_star.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_service_behavior_in_settings.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_shallow_container_type_guard.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_shallow_record_type_guard.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_shared_mutable_default.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_slash_collection_root_under_prefix.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_string_concat_in_loop.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_swallowed_asyncio_cancellation.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_sys_path_mutation.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_tautological_expect.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_test_comments.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_test_method_grafting.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_typed_doc_sections.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_unique_violation_message_match.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_unknown_pydantic_validator_field.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_unnecessary_docstring.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_unused_copy_result.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_unused_underscored_keyword_parameter.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_unused_value_marker.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_vague_suppression_description.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_whole_request_response_payload_in_log.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/no_work_verb_get_route.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/opaque_parametrize_case_needs_id.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/over_mocked_test.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/phase_label_comment.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/prefer_application_model_joins.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/prefer_autospec_for_callable_mock.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/prefer_bulk_upsert.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/prefer_class_row.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/prefer_collection_comprehension.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/prefer_constant_time_secret_compare.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/prefer_declarative_batch_validation.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/prefer_direct_import_module.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/prefer_discriminated_model_union.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/prefer_fstring_over_concat.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/prefer_grouped_settings.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/prefer_immutable_module_constant.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/prefer_injected_dependency_over_monkeypatch.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/prefer_library_fake.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/prefer_match_assert_never.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/prefer_match_exception_dispatch.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/prefer_match_type_dispatch.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/prefer_match_value_dispatch.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/prefer_module_level_constant.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/prefer_monkeypatch_for_process_state_in_test.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/prefer_monotonic_for_elapsed_time.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/prefer_namedtuple_over_tuple_return.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/prefer_native_string_check.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/prefer_nominal_id_types.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/prefer_non_nullable_collection.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/prefer_optional_composite.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/prefer_or_pattern.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/prefer_precise_object_contract.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/prefer_psycopg_executemany.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/prefer_pydantic_json_value.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/prefer_pydantic_model_assertion.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/prefer_pytest_dependency_fixtures.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/prefer_pytest_fixture_contract.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/prefer_pytest_fixture_injection.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/prefer_regex_fullmatch.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/prefer_required_constructor_parameters.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/prefer_runtime_validation.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/prefer_self_documenting_constant.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/prefer_self_type_annotation.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/prefer_set_isdisjoint.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/prefer_single_psycopg_cursor.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/prefer_str_enum.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/prefer_struct_over_namedtuple.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/prefer_typed_cli.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/prefer_typed_mapping_get.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/prefer_typed_settings_field.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/prefer_validated_uuid_comparison.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/prefer_walrus_awaited_none_guard.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/prefer_walrus_comprehension_filter.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/prefer_walrus_regex_match.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/prefer_walrus_stream_loop.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/production_derived_test_cases.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/pytest_fixture_returns_bare_tuple.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/pytest_fixture_returns_closed_resource.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/redundant_class_docstring.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/redundant_docstring.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/redundant_module_docstring.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/redundant_test_constructor_forwarder.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/repeated_kwarg_heavy_call_in_test.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/repeated_static_call_cases.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/repeated_test_composition.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/repeated_unimplemented_test_contract.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/require_constrained_api_integer.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/require_exp_on_jwt_decode.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/require_explicit_contract_implementation.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/require_explicit_psycopg_transaction.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/require_explicit_service_contract.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/require_injectable_retry_sleep.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/require_keyword_only_swap_prone_params.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/require_nodecode_for_splitting_settings_field.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/require_port_for_service.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/require_precise_factory_signature.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/require_public_dependency_contract.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/require_pydantic_for_external_json.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/require_pydantic_for_mapping_shape.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/require_pydantic_for_structured_payload.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/require_pydantic_ordinal_lower_bound.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/restated_test_docstring.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/service_singleton_delegates_to_bulk.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/shared_mutable_pydantic_factory.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/stepdown.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/store_field_update_reuses_upsert.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/store_get_delegates_to_bulk_read.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/store_insert_requires_explicit_conflict_policy.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/store_insert_requires_on_conflict.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/store_mutation_command_fanout.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/subprocess_kill_without_reap.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/test_without_explicit_oracle.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/timestamp_order_requires_tiebreaker.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/trailing_value_narration.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/typed_error_reasons.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/uncontrolled_randomness_in_test.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/unused_mock_setup.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/unused_test_factory_option.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/sql_literals.py +0 -0
- {sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/suppression_policy.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: sarj-python-lint
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.116.1
|
|
4
4
|
Summary: Custom Python lint rules — AST-based, pre-commit-friendly, hypermodern defaults
|
|
5
5
|
Project-URL: Homepage, https://code-standards.sarj.ai/rules/python/
|
|
6
6
|
Project-URL: Documentation, https://code-standards.sarj.ai/rules/python/
|
|
@@ -4,6 +4,7 @@ import ast
|
|
|
4
4
|
from collections import Counter
|
|
5
5
|
from contextlib import suppress
|
|
6
6
|
from dataclasses import dataclass
|
|
7
|
+
from functools import lru_cache, partial
|
|
7
8
|
import json
|
|
8
9
|
from pathlib import Path
|
|
9
10
|
import stat
|
|
@@ -511,11 +512,12 @@ def _explain(wanted: str) -> int:
|
|
|
511
512
|
|
|
512
513
|
|
|
513
514
|
def _baseline_counts(diags: list[Diagnostic]) -> dict[str, dict[str, int]]:
|
|
515
|
+
normalize_path = lru_cache(maxsize=1)(_baseline_path)
|
|
514
516
|
counts: dict[str, dict[str, int]] = {}
|
|
515
517
|
for d in diags:
|
|
516
518
|
if d.severity is Severity.WARNING or d.code in PROTECTED_SUPPRESSION_CODES:
|
|
517
519
|
continue
|
|
518
|
-
key =
|
|
520
|
+
key = normalize_path(d.path)
|
|
519
521
|
counts.setdefault(key, {})
|
|
520
522
|
counts[key][d.code] = counts[key].get(d.code, 0) + 1
|
|
521
523
|
return counts
|
|
@@ -560,13 +562,14 @@ def _apply_baseline(
|
|
|
560
562
|
*,
|
|
561
563
|
root: Path | None = None,
|
|
562
564
|
) -> list[Diagnostic]:
|
|
565
|
+
normalize_path = lru_cache(maxsize=1)(partial(_baseline_path, root=root))
|
|
563
566
|
seen: Counter[tuple[str, str]] = Counter()
|
|
564
567
|
out: list[Diagnostic] = []
|
|
565
568
|
for d in diags:
|
|
566
569
|
if d.severity is Severity.WARNING or d.code in PROTECTED_SUPPRESSION_CODES:
|
|
567
570
|
out.append(d)
|
|
568
571
|
continue
|
|
569
|
-
path_key =
|
|
572
|
+
path_key = normalize_path(d.path)
|
|
570
573
|
key = (path_key, d.code)
|
|
571
574
|
seen[key] += 1
|
|
572
575
|
# The raw lookup preserves compatibility with baselines written before
|
{sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/_analysis_session.py
RENAMED
|
@@ -3,6 +3,7 @@ from __future__ import annotations
|
|
|
3
3
|
from typing import TYPE_CHECKING, final
|
|
4
4
|
|
|
5
5
|
from sarj_python_lint._python_target import PythonTargetFacts
|
|
6
|
+
from sarj_python_lint.rules._fastapi_access import FastapiAccessFacts
|
|
6
7
|
from sarj_python_lint.rules._first_party import FirstPartyFacts
|
|
7
8
|
from sarj_python_lint.rules._local_source import LocalSourceFacts
|
|
8
9
|
from sarj_python_lint.rules._nominal_project import NominalProjectFacts
|
|
@@ -19,6 +20,7 @@ class AnalysisSession:
|
|
|
19
20
|
self.project: ProjectIndexSet | None = None
|
|
20
21
|
self.source_inputs = source_inputs
|
|
21
22
|
self.first_party = FirstPartyFacts()
|
|
23
|
+
self.fastapi_access = FastapiAccessFacts()
|
|
22
24
|
self.local_source = (
|
|
23
25
|
LocalSourceFacts() if source_inputs is None else LocalSourceFacts(source_inputs=source_inputs)
|
|
24
26
|
)
|
{sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/_rule_descriptors.py
RENAMED
|
@@ -8,6 +8,15 @@ from sarj_python_lint.rule_metadata import RuleDescriptor
|
|
|
8
8
|
|
|
9
9
|
SCHEMA_VERSION = 1
|
|
10
10
|
DESCRIPTORS: tuple[RuleDescriptor, ...] = (
|
|
11
|
+
RuleDescriptor(
|
|
12
|
+
rule_id=RuleId("fastapi-route-declares-security"),
|
|
13
|
+
module="sarj_python_lint.rules.fastapi_route_declares_security",
|
|
14
|
+
class_name="FastapiRouteDeclaresSecurity",
|
|
15
|
+
code="SARJ563",
|
|
16
|
+
description="Declare each FastAPI route access decision, including inherited router dependencies.",
|
|
17
|
+
aliases=(),
|
|
18
|
+
enabled_by_default=True,
|
|
19
|
+
),
|
|
11
20
|
RuleDescriptor(
|
|
12
21
|
rule_id=RuleId("prefer-validated-uuid-comparison"),
|
|
13
22
|
module="sarj_python_lint.rules.prefer_validated_uuid_comparison",
|
{sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_fastapi.py
RENAMED
|
@@ -15,7 +15,7 @@ from sarj_python_lint.rules._imports import ImportIndex
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
if TYPE_CHECKING:
|
|
18
|
-
from collections.abc import Sequence
|
|
18
|
+
from collections.abc import Callable, Sequence
|
|
19
19
|
from pathlib import Path
|
|
20
20
|
|
|
21
21
|
|
|
@@ -59,6 +59,7 @@ class Route:
|
|
|
59
59
|
inherited_responses: ast.expr | None = None
|
|
60
60
|
inherited_response_class: ast.expr | None = None
|
|
61
61
|
inherited_prefix: ast.expr | None = None
|
|
62
|
+
inherited_dependencies: ast.expr | None = None
|
|
62
63
|
inherited_has_unpack: bool = False
|
|
63
64
|
|
|
64
65
|
@property
|
|
@@ -149,7 +150,7 @@ class FastapiIndex:
|
|
|
149
150
|
self.tree: ast.Module = tree
|
|
150
151
|
self.path: Path | None = path
|
|
151
152
|
self.imports: ImportIndex = ImportIndex.from_tree(tree, module_scope_only=True)
|
|
152
|
-
self.
|
|
153
|
+
self._imported_alias_cache: dict[tuple[_ImportedReference, Callable[[tuple[str, ...]], bool]], bool] = {}
|
|
153
154
|
self._imported_module_cache: dict[Path, ast.Module | None] = {}
|
|
154
155
|
self.modules: set[str] = set()
|
|
155
156
|
self.module_symbols: dict[str, str] = {}
|
|
@@ -176,6 +177,10 @@ class FastapiIndex:
|
|
|
176
177
|
self._index_scopes(tree)
|
|
177
178
|
self._read_imports(tree)
|
|
178
179
|
self._read_aliases(tree)
|
|
180
|
+
self.access_dependencies: dict[str, ast.expr | None] = {
|
|
181
|
+
f"{key.scope}:{key.name}": self.receiver_defaults.get(key, {}).get("dependencies")
|
|
182
|
+
for key in set(self.receiver_origins.values())
|
|
183
|
+
}
|
|
179
184
|
|
|
180
185
|
def _index_scopes(self, tree: ast.Module) -> None:
|
|
181
186
|
pending = [_ScopeFrame(tree, 0, None)]
|
|
@@ -403,7 +408,7 @@ class FastapiIndex:
|
|
|
403
408
|
self.receiver_defaults[key] = {
|
|
404
409
|
keyword.arg: keyword.value
|
|
405
410
|
for keyword in value.keywords
|
|
406
|
-
if keyword.arg in {"responses", "default_response_class", "prefix"}
|
|
411
|
+
if keyword.arg in {"responses", "default_response_class", "prefix", "dependencies"}
|
|
407
412
|
}
|
|
408
413
|
if any(keyword.arg is None for keyword in value.keywords):
|
|
409
414
|
self.unpacked_receivers.add(key)
|
|
@@ -477,6 +482,13 @@ class FastapiIndex:
|
|
|
477
482
|
routes.extend(self._decorator_routes(function, scope, decorator))
|
|
478
483
|
return tuple(routes)
|
|
479
484
|
|
|
485
|
+
def receiver_identity(self, expression: ast.expr) -> str | None:
|
|
486
|
+
key = self._receiver_key(self._node_scopes.get(id(expression), 0), _binding_name(expression))
|
|
487
|
+
if key is None:
|
|
488
|
+
return None
|
|
489
|
+
origin = self.receiver_origins[key]
|
|
490
|
+
return f"{origin.scope}:{origin.name}"
|
|
491
|
+
|
|
480
492
|
def _decorator_routes(
|
|
481
493
|
self, function: ast.FunctionDef | ast.AsyncFunctionDef, scope: int, decorator: ast.Call
|
|
482
494
|
) -> tuple[Route, ...]:
|
|
@@ -510,6 +522,7 @@ class FastapiIndex:
|
|
|
510
522
|
inherited_responses=defaults.get("responses"),
|
|
511
523
|
inherited_response_class=defaults.get("default_response_class"),
|
|
512
524
|
inherited_prefix=defaults.get("prefix"),
|
|
525
|
+
inherited_dependencies=defaults.get("dependencies"),
|
|
513
526
|
inherited_has_unpack=origin in self.unpacked_receivers,
|
|
514
527
|
)
|
|
515
528
|
for route_method in route_methods
|
|
@@ -764,18 +777,33 @@ class FastapiIndex:
|
|
|
764
777
|
return None
|
|
765
778
|
return ParameterMarker(canonical, node)
|
|
766
779
|
|
|
780
|
+
def is_security_marker(self, node: ast.expr) -> bool:
|
|
781
|
+
return (
|
|
782
|
+
isinstance(node, ast.Call)
|
|
783
|
+
and not self._is_shadowed_in_enclosing_scope(node.func)
|
|
784
|
+
and self.imports.resolved_qualified_name(node.func)
|
|
785
|
+
in {"fastapi.Security", "fastapi.param_functions.Security", "fastapi.params.Security"}
|
|
786
|
+
)
|
|
787
|
+
|
|
767
788
|
def is_injection(self, node: ast.expr | None) -> bool:
|
|
768
789
|
resolved = self.resolve_annotation(node)
|
|
769
790
|
return isinstance(resolved, (ast.Name, ast.Attribute)) and self.canonical(resolved) in INJECTION_TYPES
|
|
770
791
|
|
|
771
792
|
def is_imported_dependency_alias(self, node: ast.expr | None) -> bool:
|
|
793
|
+
return self._imported_alias_matches(node, _is_single_dependency)
|
|
794
|
+
|
|
795
|
+
def is_imported_security_alias(self, node: ast.expr | None) -> bool:
|
|
796
|
+
return self._imported_alias_matches(node, _declares_security)
|
|
797
|
+
|
|
798
|
+
def _imported_alias_matches(self, node: ast.expr | None, accepts: Callable[[tuple[str, ...]], bool]) -> bool:
|
|
772
799
|
if self.path is None or node is None or isinstance(node, ast.Constant):
|
|
773
800
|
return False
|
|
774
801
|
reference = _imported_reference(self.tree, node)
|
|
775
802
|
if reference is None or self._is_shadowed_in_enclosing_scope(node):
|
|
776
803
|
return False
|
|
777
|
-
|
|
778
|
-
|
|
804
|
+
key = (reference, accepts)
|
|
805
|
+
if key in self._imported_alias_cache:
|
|
806
|
+
return self._imported_alias_cache[key]
|
|
779
807
|
target = _resolve_module_path(self.path, reference)
|
|
780
808
|
if target is None:
|
|
781
809
|
return False
|
|
@@ -785,8 +813,9 @@ class FastapiIndex:
|
|
|
785
813
|
set(),
|
|
786
814
|
self._imported_module_cache,
|
|
787
815
|
0,
|
|
816
|
+
accepts=accepts,
|
|
788
817
|
)
|
|
789
|
-
self.
|
|
818
|
+
self._imported_alias_cache[key] = resolved
|
|
790
819
|
return resolved
|
|
791
820
|
|
|
792
821
|
def _is_shadowed_in_enclosing_scope(self, node: ast.expr) -> bool:
|
|
@@ -1038,6 +1067,8 @@ def _module_symbol_is_dependency_alias(
|
|
|
1038
1067
|
seen: set[tuple[Path, str]],
|
|
1039
1068
|
module_cache: dict[Path, ast.Module | None],
|
|
1040
1069
|
depth: int,
|
|
1070
|
+
*,
|
|
1071
|
+
accepts: Callable[[tuple[str, ...]], bool],
|
|
1041
1072
|
) -> bool:
|
|
1042
1073
|
if depth >= _MAX_IMPORT_HOPS:
|
|
1043
1074
|
return False
|
|
@@ -1058,6 +1089,7 @@ def _module_symbol_is_dependency_alias(
|
|
|
1058
1089
|
seen,
|
|
1059
1090
|
module_cache,
|
|
1060
1091
|
depth + 1,
|
|
1092
|
+
accepts=accepts,
|
|
1061
1093
|
)
|
|
1062
1094
|
imported = _imported_reference(tree, expression)
|
|
1063
1095
|
if imported is not None:
|
|
@@ -1068,8 +1100,9 @@ def _module_symbol_is_dependency_alias(
|
|
|
1068
1100
|
seen,
|
|
1069
1101
|
module_cache,
|
|
1070
1102
|
depth + 1,
|
|
1103
|
+
accepts=accepts,
|
|
1071
1104
|
)
|
|
1072
|
-
return
|
|
1105
|
+
return accepts(_annotated_marker_names(tree, expression))
|
|
1073
1106
|
if isinstance(binding, ast.ImportFrom):
|
|
1074
1107
|
imported = _imported_reference(tree, ast.Name(id=symbol))
|
|
1075
1108
|
if imported is None:
|
|
@@ -1081,17 +1114,29 @@ def _module_symbol_is_dependency_alias(
|
|
|
1081
1114
|
seen,
|
|
1082
1115
|
module_cache,
|
|
1083
1116
|
depth + 1,
|
|
1117
|
+
accepts=accepts,
|
|
1084
1118
|
)
|
|
1085
1119
|
return False
|
|
1086
1120
|
|
|
1087
1121
|
|
|
1088
|
-
def
|
|
1122
|
+
def _annotated_marker_names(tree: ast.Module, expression: ast.expr) -> tuple[str, ...]:
|
|
1089
1123
|
index = FastapiIndex(tree)
|
|
1090
1124
|
parts = index.annotated_parts(expression)
|
|
1091
1125
|
if parts is None:
|
|
1092
|
-
return
|
|
1093
|
-
|
|
1094
|
-
|
|
1126
|
+
return ()
|
|
1127
|
+
return tuple(
|
|
1128
|
+
marker.name
|
|
1129
|
+
for item in parts.metadata
|
|
1130
|
+
if (marker := index.marker(item)) is not None and (marker.name != "Security" or index.is_security_marker(item))
|
|
1131
|
+
)
|
|
1132
|
+
|
|
1133
|
+
|
|
1134
|
+
def _is_single_dependency(markers: tuple[str, ...]) -> bool:
|
|
1135
|
+
return len(markers) == 1 and markers[0] in _DEPENDENCY_MARKERS
|
|
1136
|
+
|
|
1137
|
+
|
|
1138
|
+
def _declares_security(markers: tuple[str, ...]) -> bool:
|
|
1139
|
+
return "Security" in markers
|
|
1095
1140
|
|
|
1096
1141
|
|
|
1097
1142
|
def _binding_expression(binding: ast.stmt | None, symbol: str) -> ast.expr | None:
|
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import ast
|
|
4
|
+
from dataclasses import dataclass, field
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
from typing import TYPE_CHECKING
|
|
7
|
+
|
|
8
|
+
from sarj_python_lint.rules._fastapi import HTTP_METHODS
|
|
9
|
+
from sarj_python_lint.rules._paths import is_test_path
|
|
10
|
+
from sarj_python_lint.rules._resource_provenance import import_name_for_binding
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
if TYPE_CHECKING:
|
|
14
|
+
from sarj_python_lint._file_context import PythonFileContext
|
|
15
|
+
from sarj_python_lint.rules._fastapi import Route
|
|
16
|
+
from sarj_python_lint.rules._project_index import ProjectIndexSet
|
|
17
|
+
|
|
18
|
+
_MAX_ALIAS_DEPTH = 8
|
|
19
|
+
_MAX_MOUNT_NODES = 4096
|
|
20
|
+
_ROUTER_METHODS = HTTP_METHODS | {"include_router"}
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class FastapiAccessFacts:
|
|
24
|
+
def __init__(self) -> None:
|
|
25
|
+
self.project: ProjectIndexSet | None = None
|
|
26
|
+
self.graph: FastapiAccessGraph | None = None
|
|
27
|
+
|
|
28
|
+
def for_context(self, context: PythonFileContext) -> FastapiAccessGraph:
|
|
29
|
+
project = context.session.project
|
|
30
|
+
if project is None:
|
|
31
|
+
return FastapiAccessGraph((context,), None)
|
|
32
|
+
if self.project is not project or self.graph is None:
|
|
33
|
+
# Reuse the prepared graph; never rediscover files for individual routes.
|
|
34
|
+
from sarj_python_lint._file_context import PythonFileContext # ruff: ignore[import-outside-top-level] -- file contexts own this session's lazy facts.
|
|
35
|
+
|
|
36
|
+
contexts = tuple(
|
|
37
|
+
PythonFileContext(unit.path, unit.source, context.session)
|
|
38
|
+
for unit in project.source_units
|
|
39
|
+
if unit.tree is not None
|
|
40
|
+
and not is_test_path(unit.path)
|
|
41
|
+
and ("fastapi" in unit.source or "include_router" in unit.source)
|
|
42
|
+
)
|
|
43
|
+
self.graph = FastapiAccessGraph(contexts, project)
|
|
44
|
+
self.project = project
|
|
45
|
+
return self.graph
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
@dataclass(frozen=True)
|
|
49
|
+
class _Mount:
|
|
50
|
+
parent: tuple[Path, str]
|
|
51
|
+
declared: bool
|
|
52
|
+
unpacked: bool
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
@dataclass
|
|
56
|
+
class _MountEvaluation:
|
|
57
|
+
remaining: int = _MAX_MOUNT_NODES
|
|
58
|
+
known: dict[tuple[Path, str], bool] = field(default_factory=dict)
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
class FastapiAccessGraph:
|
|
62
|
+
def __init__(self, contexts: tuple[PythonFileContext, ...], project: ProjectIndexSet | None) -> None:
|
|
63
|
+
contexts = tuple(sorted(contexts, key=lambda context: context.path))
|
|
64
|
+
self.contexts = {context.path.resolve(): context for context in contexts}
|
|
65
|
+
self.project = project
|
|
66
|
+
self.defaults: dict[tuple[Path, str], bool] = {}
|
|
67
|
+
self.mounts: dict[tuple[Path, str], list[_Mount]] = {}
|
|
68
|
+
self.uncertain: set[tuple[Path, str]] = set()
|
|
69
|
+
self._mutations: dict[Path, frozenset[ast.AST]] = {}
|
|
70
|
+
for context in contexts:
|
|
71
|
+
self.uncertain.update(
|
|
72
|
+
(context.path.resolve(), f"{key.scope}:{key.name}") for key in context.fastapi.unpacked_receivers
|
|
73
|
+
)
|
|
74
|
+
for receiver, dependency in context.fastapi.access_dependencies.items():
|
|
75
|
+
self.defaults[context.path.resolve(), receiver] = dependency is not None and SecurityResolver(
|
|
76
|
+
context,
|
|
77
|
+
mutated=self.mutations(context),
|
|
78
|
+
).declares(dependency)
|
|
79
|
+
for context in contexts:
|
|
80
|
+
self._read_mounts(context)
|
|
81
|
+
|
|
82
|
+
def _receiver(
|
|
83
|
+
self,
|
|
84
|
+
context: PythonFileContext,
|
|
85
|
+
expression: ast.expr,
|
|
86
|
+
seen: frozenset[tuple[Path, str]] = frozenset(),
|
|
87
|
+
*,
|
|
88
|
+
at: ast.AST | None = None,
|
|
89
|
+
) -> tuple[Path, str] | None:
|
|
90
|
+
if (identity := context.fastapi.receiver_identity(expression)) is not None:
|
|
91
|
+
return context.path.resolve(), identity
|
|
92
|
+
if self.project is None or len(seen) >= _MAX_ALIAS_DEPTH:
|
|
93
|
+
return None
|
|
94
|
+
root = expression
|
|
95
|
+
while isinstance(root, ast.Attribute):
|
|
96
|
+
root = root.value
|
|
97
|
+
provenance = context.static_resource_provenance
|
|
98
|
+
if (
|
|
99
|
+
not isinstance(root, ast.Name)
|
|
100
|
+
or provenance.dynamic_namespace
|
|
101
|
+
or provenance.wildcard
|
|
102
|
+
or root.id in provenance.mutated
|
|
103
|
+
or not isinstance(provenance.runtime_binding(root.id, expression if at is None else at), ast.alias)
|
|
104
|
+
):
|
|
105
|
+
return None
|
|
106
|
+
unit = self.project.unit(context.path)
|
|
107
|
+
symbol = None if unit is None else self.project.resolve(unit, expression)
|
|
108
|
+
target = None if symbol is None else self.project.source_unit(symbol.module)
|
|
109
|
+
if symbol is None or target is None or (key := (target.path, symbol.name)) in seen:
|
|
110
|
+
return None
|
|
111
|
+
target_context = self.contexts.get(target.path)
|
|
112
|
+
if target_context is None:
|
|
113
|
+
from sarj_python_lint._file_context import PythonFileContext # ruff: ignore[import-outside-top-level] -- borrow an imported re-export from the existing prepared graph.
|
|
114
|
+
|
|
115
|
+
target_context = PythonFileContext(target.path, target.source, context.session)
|
|
116
|
+
self.contexts[target.path] = target_context
|
|
117
|
+
if target.tree is None or not target.tree.body:
|
|
118
|
+
return None
|
|
119
|
+
return self._receiver(
|
|
120
|
+
target_context, ast.Name(id=symbol.name, ctx=ast.Load()), seen | {key}, at=target.tree.body[0]
|
|
121
|
+
)
|
|
122
|
+
|
|
123
|
+
def _read_mounts(self, context: PythonFileContext) -> None:
|
|
124
|
+
for call in context.nodes(ast.Call):
|
|
125
|
+
if not isinstance(call.func, ast.Attribute) or call.func.attr != "include_router":
|
|
126
|
+
continue
|
|
127
|
+
parent = self._receiver(context, call.func.value)
|
|
128
|
+
argument = call.args[0] if call.args else _keyword(call, "router")
|
|
129
|
+
child = None if argument is None else self._receiver(context, argument)
|
|
130
|
+
if parent is None or child is None:
|
|
131
|
+
continue
|
|
132
|
+
dependency = _keyword(call, "dependencies")
|
|
133
|
+
declared = dependency is not None and SecurityResolver(context, mutated=self.mutations(context)).declares(
|
|
134
|
+
dependency
|
|
135
|
+
)
|
|
136
|
+
self.mounts.setdefault(child, []).append(
|
|
137
|
+
_Mount(parent, declared, any(keyword.arg is None for keyword in call.keywords))
|
|
138
|
+
)
|
|
139
|
+
|
|
140
|
+
def mutations(self, context: PythonFileContext) -> frozenset[ast.AST]:
|
|
141
|
+
key = context.path.resolve()
|
|
142
|
+
if key not in self._mutations:
|
|
143
|
+
self._mutations[key] = self._mutation_bindings(context)
|
|
144
|
+
return self._mutations[key]
|
|
145
|
+
|
|
146
|
+
def _mutation_bindings(self, context: PythonFileContext) -> frozenset[ast.AST]:
|
|
147
|
+
provenance = context.static_resource_provenance
|
|
148
|
+
aliases = _alias_graph(context)
|
|
149
|
+
mutated = {
|
|
150
|
+
binding
|
|
151
|
+
for node in context.nodes(ast.Name)
|
|
152
|
+
if isinstance(node.ctx, ast.Load)
|
|
153
|
+
and (binding := provenance.runtime_binding(node.id, node)) is not None
|
|
154
|
+
and self._reference_mutates(context, node)
|
|
155
|
+
}
|
|
156
|
+
pending = list(mutated)
|
|
157
|
+
while pending:
|
|
158
|
+
for alias in aliases.get(pending.pop(), ()):
|
|
159
|
+
if alias not in mutated:
|
|
160
|
+
mutated.add(alias)
|
|
161
|
+
pending.append(alias)
|
|
162
|
+
return frozenset(mutated)
|
|
163
|
+
|
|
164
|
+
def _reference_mutates(self, context: PythonFileContext, node: ast.Name) -> bool:
|
|
165
|
+
parent = context.parents.get(node)
|
|
166
|
+
while isinstance(parent, ast.List | ast.Tuple | ast.Set | ast.Dict | ast.Starred | ast.BinOp):
|
|
167
|
+
parent = context.parents.get(parent)
|
|
168
|
+
if self._dependency_keyword(context, parent):
|
|
169
|
+
return False
|
|
170
|
+
if isinstance(parent, ast.Assign | ast.AnnAssign) and parent.value is node:
|
|
171
|
+
targets = parent.targets if isinstance(parent, ast.Assign) else [parent.target]
|
|
172
|
+
return any(not isinstance(target, ast.Name) for target in targets)
|
|
173
|
+
return isinstance(parent, ast.Attribute | ast.Subscript | ast.Call | ast.keyword)
|
|
174
|
+
|
|
175
|
+
def _dependency_keyword(self, context: PythonFileContext, node: ast.AST | None) -> bool:
|
|
176
|
+
if not isinstance(node, ast.keyword) or node.arg != "dependencies":
|
|
177
|
+
return False
|
|
178
|
+
call = context.parents.get(node)
|
|
179
|
+
if not isinstance(call, ast.Call):
|
|
180
|
+
return False
|
|
181
|
+
if context.fastapi.constructor_kind(call) is not None:
|
|
182
|
+
return True
|
|
183
|
+
return (
|
|
184
|
+
isinstance(call.func, ast.Attribute)
|
|
185
|
+
and call.func.attr in _ROUTER_METHODS
|
|
186
|
+
and self._receiver(context, call.func.value) is not None
|
|
187
|
+
)
|
|
188
|
+
|
|
189
|
+
def protected(self, path: Path, receiver: str) -> bool | None:
|
|
190
|
+
return self._protected((path.resolve(), receiver), frozenset(), _MountEvaluation())
|
|
191
|
+
|
|
192
|
+
def _protected(
|
|
193
|
+
self, key: tuple[Path, str], seen: frozenset[tuple[Path, str]], proof: _MountEvaluation
|
|
194
|
+
) -> bool | None:
|
|
195
|
+
if (known := proof.known.get(key)) is not None:
|
|
196
|
+
return known
|
|
197
|
+
if self.defaults.get(key, False):
|
|
198
|
+
return True
|
|
199
|
+
if key in self.uncertain:
|
|
200
|
+
return None
|
|
201
|
+
if key in seen or len(seen) >= _MAX_ALIAS_DEPTH or proof.remaining <= 0:
|
|
202
|
+
return None
|
|
203
|
+
proof.remaining -= 1
|
|
204
|
+
parents = self.mounts.get(key, ())
|
|
205
|
+
if not parents:
|
|
206
|
+
proof.known[key] = False
|
|
207
|
+
return False
|
|
208
|
+
unknown = False
|
|
209
|
+
for mount in parents:
|
|
210
|
+
if proof.remaining <= 0:
|
|
211
|
+
return None
|
|
212
|
+
result = self._mount_protected(mount, seen | {key}, proof)
|
|
213
|
+
if result is False:
|
|
214
|
+
proof.known[key] = False
|
|
215
|
+
return False
|
|
216
|
+
if result is None:
|
|
217
|
+
unknown = True
|
|
218
|
+
if unknown:
|
|
219
|
+
return None
|
|
220
|
+
proof.known[key] = True
|
|
221
|
+
return True
|
|
222
|
+
|
|
223
|
+
def _mount_protected(
|
|
224
|
+
self, mount: _Mount, seen: frozenset[tuple[Path, str]], proof: _MountEvaluation
|
|
225
|
+
) -> bool | None:
|
|
226
|
+
if mount.declared:
|
|
227
|
+
return True
|
|
228
|
+
if mount.unpacked:
|
|
229
|
+
return None
|
|
230
|
+
return self._protected(mount.parent, seen, proof)
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
def _keyword(call: ast.Call, name: str) -> ast.expr | None:
|
|
234
|
+
return next((keyword.value for keyword in call.keywords if keyword.arg == name), None)
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
def _alias_graph(context: PythonFileContext) -> dict[ast.AST, set[ast.AST]]:
|
|
238
|
+
provenance = context.static_resource_provenance
|
|
239
|
+
aliases: dict[ast.AST, set[ast.AST]] = {}
|
|
240
|
+
for statement in context.nodes(ast.Assign, ast.AnnAssign):
|
|
241
|
+
if not isinstance(statement.value, ast.Name):
|
|
242
|
+
continue
|
|
243
|
+
binding = provenance.runtime_binding(statement.value.id, statement.value)
|
|
244
|
+
if binding is None:
|
|
245
|
+
continue
|
|
246
|
+
targets = statement.targets if isinstance(statement, ast.Assign) else [statement.target]
|
|
247
|
+
for target in targets:
|
|
248
|
+
if not isinstance(target, ast.Name):
|
|
249
|
+
continue
|
|
250
|
+
other = provenance.runtime_binding(target.id, target)
|
|
251
|
+
if other is not None:
|
|
252
|
+
aliases.setdefault(binding, set()).add(other)
|
|
253
|
+
aliases.setdefault(other, set()).add(binding)
|
|
254
|
+
return aliases
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
class SecurityResolver:
|
|
258
|
+
def __init__(self, context: PythonFileContext, *, mutated: frozenset[ast.AST]) -> None:
|
|
259
|
+
self._context = context
|
|
260
|
+
self._index = context.fastapi
|
|
261
|
+
self._mutated = mutated
|
|
262
|
+
|
|
263
|
+
def route_declares_security(self, route: Route) -> bool:
|
|
264
|
+
return any(
|
|
265
|
+
node is not None and self._declares(node, 0)
|
|
266
|
+
for node in (route.keywords.get("dependencies"), route.inherited_dependencies)
|
|
267
|
+
)
|
|
268
|
+
|
|
269
|
+
def declares(self, node: ast.expr) -> bool:
|
|
270
|
+
return self._declares(node, 0)
|
|
271
|
+
|
|
272
|
+
def parameters_declare_security(self, function: ast.FunctionDef | ast.AsyncFunctionDef) -> bool:
|
|
273
|
+
arguments = function.args
|
|
274
|
+
parameters = [*arguments.posonlyargs, *arguments.args, *arguments.kwonlyargs]
|
|
275
|
+
defaults = [default for default in (*arguments.defaults, *arguments.kw_defaults) if default is not None]
|
|
276
|
+
return any(
|
|
277
|
+
self._annotation_declares(parameter.annotation, parameter.annotation, 0) for parameter in parameters
|
|
278
|
+
) or any(self._is_security(default, default, annotation=False) for default in defaults)
|
|
279
|
+
|
|
280
|
+
def _annotation_declares(self, annotation: ast.expr | None, at: ast.AST | None, depth: int) -> bool:
|
|
281
|
+
if annotation is None or depth > _MAX_ALIAS_DEPTH:
|
|
282
|
+
return False
|
|
283
|
+
if isinstance(annotation, ast.Constant) and isinstance(annotation.value, str):
|
|
284
|
+
try:
|
|
285
|
+
parsed = ast.parse(annotation.value, mode="eval").body
|
|
286
|
+
except SyntaxError:
|
|
287
|
+
return False
|
|
288
|
+
return self._annotation_declares(parsed, at, depth + 1)
|
|
289
|
+
if isinstance(annotation, ast.Name) and at is not None:
|
|
290
|
+
binding = self._context.static_resource_provenance.binding(annotation.id, at)
|
|
291
|
+
if binding is None:
|
|
292
|
+
return False
|
|
293
|
+
value = self._bound_value(binding)
|
|
294
|
+
if value is not None:
|
|
295
|
+
return self._annotation_declares(value, value, depth + 1)
|
|
296
|
+
return isinstance(binding, ast.alias) and self._index.is_imported_security_alias(annotation)
|
|
297
|
+
if isinstance(annotation, ast.Subscript) and self._import_name(annotation.value, at, annotation=True) in {
|
|
298
|
+
"typing.Annotated",
|
|
299
|
+
"typing_extensions.Annotated",
|
|
300
|
+
}:
|
|
301
|
+
parts = annotation.slice.elts if isinstance(annotation.slice, ast.Tuple) else [annotation.slice]
|
|
302
|
+
return any(self._is_security(item, at, annotation=True) for item in parts[1:])
|
|
303
|
+
return False
|
|
304
|
+
|
|
305
|
+
def _is_security(self, node: ast.expr, at: ast.AST | None, *, annotation: bool) -> bool:
|
|
306
|
+
return isinstance(node, ast.Call) and self._import_name(node.func, at, annotation=annotation) in {
|
|
307
|
+
"fastapi.Security",
|
|
308
|
+
"fastapi.param_functions.Security",
|
|
309
|
+
"fastapi.params.Security",
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
def _import_name(self, expression: ast.expr, at: ast.AST | None, *, annotation: bool) -> str | None:
|
|
313
|
+
root = expression
|
|
314
|
+
while isinstance(root, ast.Attribute):
|
|
315
|
+
root = root.value
|
|
316
|
+
if not isinstance(root, ast.Name) or at is None:
|
|
317
|
+
return None
|
|
318
|
+
provenance = self._context.static_resource_provenance
|
|
319
|
+
binding = provenance.binding(root.id, at) if annotation else provenance.runtime_binding(root.id, at)
|
|
320
|
+
if not isinstance(binding, ast.alias):
|
|
321
|
+
return None
|
|
322
|
+
return import_name_for_binding(expression, binding, self._context.parents.get(binding))
|
|
323
|
+
|
|
324
|
+
def _declares(self, node: ast.expr, depth: int) -> bool:
|
|
325
|
+
if depth > _MAX_ALIAS_DEPTH:
|
|
326
|
+
return False
|
|
327
|
+
match node:
|
|
328
|
+
case ast.Call():
|
|
329
|
+
return self._is_security(node, node, annotation=False)
|
|
330
|
+
case ast.List(elts=items) | ast.Tuple(elts=items) | ast.Set(elts=items):
|
|
331
|
+
return any(self._declares(item, depth + 1) for item in items)
|
|
332
|
+
case ast.Starred(value=value):
|
|
333
|
+
return self._declares(value, depth + 1)
|
|
334
|
+
case ast.BinOp(op=ast.Add(), left=left, right=right):
|
|
335
|
+
return self._declares(left, depth + 1) or self._declares(right, depth + 1)
|
|
336
|
+
case ast.Name(id=name):
|
|
337
|
+
binding = self._context.static_resource_provenance.runtime_binding(name, node)
|
|
338
|
+
if binding is None or binding in self._mutated:
|
|
339
|
+
return False
|
|
340
|
+
value = self._bound_value(binding)
|
|
341
|
+
return value is not None and self._declares(value, depth + 1)
|
|
342
|
+
case _:
|
|
343
|
+
return False
|
|
344
|
+
|
|
345
|
+
def _bound_value(self, binding: ast.AST) -> ast.expr | None:
|
|
346
|
+
statement = self._context.parents.get(binding)
|
|
347
|
+
if not isinstance(binding, ast.Name) or not isinstance(statement, ast.Assign | ast.AnnAssign | ast.TypeAlias):
|
|
348
|
+
return None
|
|
349
|
+
if isinstance(statement, ast.Assign) and len(statement.targets) != 1:
|
|
350
|
+
return None
|
|
351
|
+
return statement.value
|
{sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_project_index.py
RENAMED
|
@@ -272,6 +272,8 @@ class ProjectIndexSet:
|
|
|
272
272
|
sealed: bool = False,
|
|
273
273
|
) -> None:
|
|
274
274
|
self._units = MappingProxyType(dict(units))
|
|
275
|
+
# Borrow the prepared graph without filesystem discovery or reparsing.
|
|
276
|
+
self.source_units: tuple[SourceUnit, ...] = tuple(self._units.values())
|
|
275
277
|
self._roots = tuple(roots)
|
|
276
278
|
self._aliases = MappingProxyType({} if aliases is None else dict(aliases))
|
|
277
279
|
self._sealed = sealed
|
{sarj_python_lint-1.115.0 → sarj_python_lint-1.116.1}/src/sarj_python_lint/rules/_registry.py
RENAMED
|
@@ -231,6 +231,7 @@ from sarj_python_lint.rules.duplicate_adjacent_exception_handler import Duplicat
|
|
|
231
231
|
from sarj_python_lint.rules.duplicate_closed_pure_helper import DuplicateClosedPureHelper
|
|
232
232
|
from sarj_python_lint.rules.duplicate_pytest_fixture_params import DuplicatePytestFixtureParams
|
|
233
233
|
from sarj_python_lint.rules.failed_probe_zero_threshold import FailedProbeZeroThreshold
|
|
234
|
+
from sarj_python_lint.rules.fastapi_route_declares_security import FastapiRouteDeclaresSecurity
|
|
234
235
|
from sarj_python_lint.rules.nan_hidden_by_builtin_min import NanHiddenByBuiltinMin
|
|
235
236
|
from sarj_python_lint.rules.no_async_client_in_constructor import NoAsyncClientInConstructor
|
|
236
237
|
from sarj_python_lint.rules.no_conflicting_pydantic_alias_validation import NoConflictingPydanticAliasValidation
|
|
@@ -289,6 +290,7 @@ from sarj_python_lint.rules.test_without_explicit_oracle import NoExplicitTestOr
|
|
|
289
290
|
|
|
290
291
|
_AUTHORING_REGISTRY: Mapping[str, type[Rule]] = MappingProxyType(
|
|
291
292
|
{
|
|
293
|
+
FastapiRouteDeclaresSecurity.id: FastapiRouteDeclaresSecurity,
|
|
292
294
|
PreferValidatedUuidComparison.id: PreferValidatedUuidComparison,
|
|
293
295
|
PreferSinglePsycopgCursor.id: PreferSinglePsycopgCursor,
|
|
294
296
|
NoPsycopgExecutionInLoop.id: NoPsycopgExecutionInLoop,
|