From 86ffd5866527e607cfdc52e0ddf58b1d115233df Mon Sep 17 00:00:00 2001 From: AlCalzone Date: Thu, 12 Mar 2026 17:10:30 +0100 Subject: [PATCH] Instruct AI to add type annotations to tests (#165386) Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/copilot-instructions.md | 5 +++++ AGENTS.md | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index a8f9117b1cc..8dc3b4000a8 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -18,6 +18,11 @@ This repository contains the core of Home Assistant, a Python 3 based home autom - Python 3.14 explicitly allows `except TypeA, TypeB:` without parentheses. +## Testing + +When writing or modifying tests, ensure all test function parameters have type annotations. +Prefer concrete types (for example, `HomeAssistant`, `MockConfigEntry`, etc.) over `Any`. + ## Good practices Integrations with Platinum or Gold level in the Integration Quality Scale reflect a high standard of code quality and maintainability. When looking for examples of something, these are good places to start. The level is indicated in the manifest.json of the integration. diff --git a/AGENTS.md b/AGENTS.md index 038fa8d021f..888d93ec07e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -15,6 +15,11 @@ This repository contains the core of Home Assistant, a Python 3 based home autom - Python 3.14 explicitly allows `except TypeA, TypeB:` without parentheses. +## Testing + +When writing or modifying tests, ensure all test function parameters have type annotations. +Prefer concrete types (for example, `HomeAssistant`, `MockConfigEntry`, etc.) over `Any`. + ## Good practices Integrations with Platinum or Gold level in the Integration Quality Scale reflect a high standard of code quality and maintainability. When looking for examples of something, these are good places to start. The level is indicated in the manifest.json of the integration.