support strings as type annotations #73
Labels
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: M-Labs/nac3#73
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The whole forward reference / string type annotations business seems a bit messy for now, and in flux in Python...
From https://docs.python.org/3/library/typing.html:
The latest on the topic seems to be https://www.python.org/dev/peps/pep-0649/.
Let's table this for now and when the time comes see what Python decided. If PEP649 is adopted, patching our Python to enable it without waiting for a release is fine.
Is this done?
Not yet. There seems to be not much progress on this on how Python will resolve this.
This may be causing problems for the phaser driver (
Phaser.channel
,PhaserChannel.phaser
,PhaserChannel.oscillator
attributes)I guess we can simply solve those with
from __future__ import annotations
into the Phaser driver (https://www.python.org/dev/peps/pep-0563/). NAC3 itself isn't affected by this problem as it has its own parser and resolver for type annotations (correct?) and the CPython annotation data is rarely used.Seems to work fine and is probably the simplest and best way to solve this problem for now.