Skip to content

Commit

Permalink
fix: Fix 'possibly-used-before-assignment' pylint issues (#440)
Browse files Browse the repository at this point in the history
Latest pylint added a new check for values used before assignment.
This fixes these issues found in the blivet module. Some of these
are false positives, some real potential issues.
  • Loading branch information
vojtechtrefny authored May 31, 2024
1 parent d8c5938 commit bfaae50
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions library/blivet.py
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,9 @@ def _look_up_device(self):
self._device = None
return # TODO: see if we can create this device w/ the specified name

# pylint doesn't understand that "luks_fmt" is always set when "encrypted" is true
# pylint: disable=unknown-option-value
# pylint: disable=possibly-used-before-assignment
def _update_from_device(self, param_name):
""" Return True if param_name's value was retrieved from a looked-up device. """
log.debug("Updating volume settings from device: %r", self._device)
Expand Down Expand Up @@ -1717,6 +1720,8 @@ def str_to_size(spec, hundredpercent=None):

if auto_size_dev_count > 0:
calculated_thinlv_size = available_space / auto_size_dev_count
else:
calculated_thinlv_size = available_space

for thinlv in thinlvs_to_create:

Expand Down

0 comments on commit bfaae50

Please sign in to comment.