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

Merged
merged 25 commits into from
Nov 19, 2024
Merged

Full Typing of Spinnman classes #425

merged 25 commits into from
Nov 19, 2024

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

@Christian-B Christian-B merged commit 50c016d into master Nov 19, 2024
20 checks passed
@Christian-B Christian-B deleted the t_man branch November 19, 2024 06:35
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