Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Full Typing of Spinnman classes #425

Open
wants to merge 25 commits into
base: master
Choose a base branch
from
Open

Full Typing of Spinnman classes #425

wants to merge 25 commits into from

Conversation

Christian-B
Copy link
Member

@Christian-B Christian-B commented Oct 30, 2024

Builds on:
#421
SpiNNakerManchester/SpiNNMachine#273 and related

needs
SpiNNakerManchester/SpiNNFrontEndCommon#1241

tested by:
SpiNNakerManchester/IntegrationTests#303

All spinnman code must be fully typed
mypyd.bash to check this locally

small code changes.

  • temp values rather than None
  • pattern change from foo = bar if foo is None foo = xyz to if bar is None foo = xyz else foo = bar
  • variable type change replaced with creating a new variable
  • add !r when formating bytestrings
  • *args replaced with know list of arguements
  • **kwarg remove with specifi parameteres and if block to handle nones
  • new added to enum for better typing

ExtendedTransceiver is best effort as untested
some code changes needed
Lost of asserts that self is actually the expected class (can not diamond declare super classes!)

SpallocJob changed to a contextlib.AbstractContextManager
as used with a contextlib.ExitStack

TODO: #423

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.

2 participants