From 164fcb22c25f61a9578c70e2c631d500bd01f3af Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 28 Jun 2023 09:59:57 -0500 Subject: [PATCH] Enable "from __future__ import annotations" on unix build --- .../unix/variants/coverage/mpconfigvariant.mk | 2 ++ tests/unix/extra_coverage.py.exp | 32 +++++++++---------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/ports/unix/variants/coverage/mpconfigvariant.mk b/ports/unix/variants/coverage/mpconfigvariant.mk index f63054bdd6..9289e9cb4d 100644 --- a/ports/unix/variants/coverage/mpconfigvariant.mk +++ b/ports/unix/variants/coverage/mpconfigvariant.mk @@ -28,6 +28,7 @@ $(BUILD)/lib/quirc/lib/%.o: CFLAGS += -Wno-shadow -Wno-sign-compare -include sha SRC_BITMAP := \ shared/runtime/context_manager_helpers.c \ displayio_min.c \ + shared-bindings/__future__/__init__.c \ shared-bindings/aesio/aes.c \ shared-bindings/aesio/__init__.c \ shared-bindings/audiocore/__init__.c \ @@ -85,6 +86,7 @@ CFLAGS += \ -DCIRCUITPY_AUDIOCORE_DEBUG=1 \ -DCIRCUITPY_BITMAPTOOLS=1 \ -DCIRCUITPY_DISPLAYIO_UNIX=1 \ + -DCIRCUITPY_FUTURE=1 \ -DCIRCUITPY_GIFIO=1 \ -DCIRCUITPY_OS_GETENV=1 \ -DCIRCUITPY_RAINBOWIO=1 \ diff --git a/tests/unix/extra_coverage.py.exp b/tests/unix/extra_coverage.py.exp index c750ca0e95..0711da6a22 100644 --- a/tests/unix/extra_coverage.py.exp +++ b/tests/unix/extra_coverage.py.exp @@ -29,22 +29,22 @@ RuntimeError: ame__ mport -builtins micropython _asyncio _thread -_uasyncio aesio array audiocore -audiomixer binascii bitmaptools btree -cexample cmath collections cppexample -displayio errno ffi framebuf -gc hashlib json math -qrio rainbowio re struct -synthio sys termios traceback -ubinascii uctypes uerrno uheapq -uio ujson ulab ulab.numpy -ulab.numpy.fft ulab.numpy.linalg ulab.scipy -ulab.scipy.linalg ulab.scipy.optimize -ulab.scipy.signal ulab.scipy.special -ulab.utils uos urandom ure -uselect utime utimeq uzlib -zlib +builtins micropython __future__ _asyncio +_thread _uasyncio aesio array +audiocore audiomixer binascii bitmaptools +btree cexample cmath collections +cppexample displayio errno ffi +framebuf gc hashlib json +math qrio rainbowio re +struct synthio sys termios +traceback ubinascii uctypes uerrno +uheapq uio ujson ulab +ulab.numpy ulab.numpy.fft ulab.numpy.linalg +ulab.scipy ulab.scipy.linalg +ulab.scipy.optimize ulab.scipy.signal +ulab.scipy.special ulab.utils uos +urandom ure uselect utime +utimeq uzlib zlib ime utime utimeq