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

Remove side effecting list comprehensions #278

Merged

Conversation

pcurry
Copy link
Contributor

@pcurry pcurry commented May 29, 2023

A small cleanup pull to remove list comprehensions that exist solely for their side effects. The removed list comprehensions have been replaced with for loops or calls to a new utility function in the firmware, turn_off_all_cvs.

Most of the list comprehensions are turning off all the CV outputs. It seemed to me that having a function that just does that will save some future copy-pasting
Copy link
Collaborator

@mjaskula mjaskula left a comment

Choose a reason for hiding this comment

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

Thanks for performing this cleanup, it's nice to remove this unpythonic approach form the firmware and scripts.

I just have one question about a comment removal, otherwise it looks good to me.

sleep_ms(10)
if self.gate_mode:
# Only turn off clock triggers.
Copy link
Collaborator

Choose a reason for hiding this comment

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

[Question] Why remove this comment?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That was over-zealous deletion. I'll re-instate that comment, and the deleted one below it.

@awonak awonak merged commit 8dbac6d into Allen-Synthesis:main Jun 16, 2023
3 checks passed
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.

None yet

3 participants