You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Includes:
- Modernisation re type hints in scan_disks().
- Improve lsblk line parser via modern Python builtins.
Replace by-hand lsblk output line parser with dictionary comprehension.
- Programmatically establish `lsblk` field derived Disk namedtuple fields.
- Refactoring for readability.
- Black reformatting.
- Employ defaults in Disk named tuple to ease creation using lsblk info,
as these defaults pertain to our extra flag info.
- Normalise scan_disks()'s working dict keys to lowercase.
By normalising on lowercase we can ease the transition to using
our Disk named tuple as the working copy: to help readability
and highlight where we write (via Disk.replace(root=True)).
This should also simplify the assembly of our final return value.
We also have a large number of tests that use the existing lowercase
Disk fields.
By working directly with the Disk namedtuple during device collation,
we gain readability and the advantages of an immutable type: i.e.
we are then more explicit where writes/changes happen due to requirement
to use Disk._replace(). We also require less type transitions overall.
Some basic code quality/readability improvements to assist with planned functional changes associated with the following issues:
The text was updated successfully, but these errors were encountered: