-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update displayed device specs (#763)
* Add all missing specs * Add property specs * Move _specs to BaseDevice In this way, _specs and print_specs can also be called for virtual devices. * Fix syntax for compatibility with older Python * Fix style * Add missing docstring * Fix dosctring style * Improve specs method * Update to fix mypy errors * Fix mypy error * Add tests for BaseDevice.specs property * Fix import order * Various minor improvements One change is to use a string instead of joining elements of a list to get the final string. The reason is that lists were cumbersome to use when there were conditional statements. * Split _specs method in different methods Create one _specs method for each sections (register, layout, device, channels). The layout section is defined only in Device, such that it is not displayed for VirtualDevice. This commit also goes back to using lists for storing the lines. * Remove line * Fix typo in strings * Return list[str] instead of str for specs blocks Also move texts for layout to BaseDevice, since virtual devices can have some layouts properties. --------- Co-authored-by: Henrique Silvério <[email protected]>
- Loading branch information
1 parent
7960737
commit 091726a
Showing
2 changed files
with
239 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters