Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
verdi code show
: Add missing code attributes (#5916)
The implementation of `verdi code show` hardcoded the attributes to show. This led to not all attributes always being shown, since the hard-coded attributes were just those shared between all `AbstractCode` subclasses. However, the subclasses have specific attributes that are important as well. The command now uses the `get_cli_options` classmethod to get a list of all attributes relevant to the code type. In principle, each of these have a corresponding property on the class to retrieve the associated value so we can use `getattr` to retrieve it. There are exceptions, such as the `filepath_files` option for the `PortableCode` which is only needed during setup and not stored permanently, so the `AttributeError` that can be raised is caught and ignored. Finally, there are three attributes that are still hard-coded, PK, UUID and the `entry_point`, since these are not actually part of the list returned by `get_cli_options` but are shared by all code types and are useful to display.
- Loading branch information