From 49490d92c371469ae19d98622c50d99f65ea4ee0 Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Fri, 30 Aug 2024 16:36:20 -0700 Subject: [PATCH] Update boilerplate sanity test (#83879) The `annotations` future can now be imported as `_annotations`. --- test/sanity/code-smell/boilerplate.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/sanity/code-smell/boilerplate.py b/test/sanity/code-smell/boilerplate.py index d0ab20d7969..1f044faa847 100644 --- a/test/sanity/code-smell/boilerplate.py +++ b/test/sanity/code-smell/boilerplate.py @@ -17,7 +17,11 @@ def main(): invalid_future = [] for text in lines: - if text in (b'from __future__ import annotations', b'from __future__ import annotations # pragma: nocover'): + if text in ( + b'from __future__ import annotations', + b'from __future__ import annotations as _annotations', + b'from __future__ import annotations # pragma: nocover', + ): missing = False break