Skip to content

Change extern to a bool from typing.Union[bool, str]#157

Open
HaydenMichel8 wants to merge 1 commit into
robotpy:mainfrom
HaydenMichel8:fix_extern
Open

Change extern to a bool from typing.Union[bool, str]#157
HaydenMichel8 wants to merge 1 commit into
robotpy:mainfrom
HaydenMichel8:fix_extern

Conversation

@HaydenMichel8

Copy link
Copy Markdown
Contributor

Currently Function and Variable have type hinting for extern -> extern: typing.Union[bool, str] = False
I propose changing this to just be extern: bool

It seems like this was added so that if I do something like:
extern "C++" double pi; extern will hold "C++" instead of true. But, this behavior hasn't been implemented yet so it seems like extern should stay as just being a bool until it is.

At parser.py:2710 it says # TODO: store linkage so it seems clear to me that this behavior has not yet been implemented.

I haven't been able to find any way that extern could ever be a str and it is messing up my ty checks when I try to assign a boolean variable the result of Variable.extern.

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.

1 participant