Skip to content

Conversation

jwnrt
Copy link

@jwnrt jwnrt commented Jan 28, 2025

The | syntax was added in 3.10 (I think).

With this change I was able to run cfggen.py and pyot.py with Python 3.9.

I didn't add a component to the commit messages, so CI will complain.

jwnrt added 2 commits January 28, 2025 15:20
Signed-off-by: James Wainwright <james.wainwright@lowrisc.org>
Signed-off-by: James Wainwright <james.wainwright@lowrisc.org>
@rivos-eblot
Copy link

The | syntax was added in 3.10 (I think).
Yes (https://docs.python.org/3/library/typing.html#typing.Union)

Copy link

@rivos-eblot rivos-eblot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jwnrt jwnrt merged commit 9f05351 into lowRISC:ot-earlgrey-9.1.0 Jan 28, 2025
6 of 7 checks passed
def lc_state(self) -> Union[str, int]:
"""Report the current state."""
istate = self._read_reg('lc_state')
tix = self._check_state(istate)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated to this PR: am I misunderstanding or should this type not be Tuple[str, int]?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, the original annotation was wrong. Good catch!

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.

3 participants