Skip to content

ENH: Allow type annotations before csp.start/alarms/state blocks - #769

Open
aadya940 wants to merge 1 commit into
Point72:mainfrom
aadya940:annassign
Open

aadya940 wants to merge 1 commit into
Point72:mainfrom
aadya940:annassign

Conversation

@aadya940

Copy link
Copy Markdown

Fixes #664

The parser now skips whenever we have an ast.AnnAssign with node.value = None while locating the special blocks. Hence, the following cases will be allowed:

x: int

with csp.start():
    ...
with csp.alarms():
    a = csp.alarm(int)

x: int

with csp.start():
    ...

This still raises:

x: int = 5

Signed-off-by: Aadya Chinubhai <aadyachinubhai@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

We should allow specifying adjusted input annotations before csp.start / csp.alarms / csp.state

1 participant