Skip to content

Commit

Permalink
Fix some pylint warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
abadger committed Aug 13, 2024
1 parent e0ccd2f commit 8f15d16
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ class LiveModeConfigScanner(Actor):
"""

name = 'live_mode_config_scanner'
consumes = (InstalledRPM)
produces = (LiveModeConfig)
consumes = (InstalledRPM,)
produces = (LiveModeConfig,)
tags = (ExperimentalTag, FactsPhaseTag, IPUWorkflowTag,)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def test_enablement_conditions(monkeypatch, case_descr):

def has_package_mock(message_class, pkg_name):
return pkg_name in case_descr.pkgs

monkeypatch.setattr(scan_livemode_config_lib, 'has_package', has_package_mock)

mocked_actor = CurrentActorMocked(envars=case_descr.env_vars, arch=case_descr.arch)
Expand All @@ -70,6 +71,7 @@ def has_package_mock(message_class, pkg_name):
class ConfigParserMock(configparser.ConfigParser):
def __init__(self, read_log, *args, **kwargs):
self.what_was_read = read_log
super(configparser.ConfigParser, self).__init__(*args, **kwargs)

def __getitem__(self, section):
return self.data[section]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ class LiveModeReporter(Actor):
"""

name = 'live_mode_reporter'
consumes = (LiveModeConfig)
produces = (Report)
consumes = (LiveModeConfig,)
produces = (Report,)
tags = (ExperimentalTag, IPUWorkflowTag, FactsPhaseTag)

def process(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ def symlink_mock(link_target, symlink_location):
monkeypatch.setattr(os, 'chown', chown_mock)
monkeypatch.setattr(os, 'symlink', symlink_mock)
monkeypatch.setattr(os, 'listdir', listdir_mock)
monkeypatch.setattr(grp, 'getgrnam', lambda group_name: user_groups_table.get(group_name))
monkeypatch.setattr(grp, 'getgrnam', user_groups_table.get)

context_mock = NspawnActionsMock(base_dir='/USERSPACE', action_log=actual_trace)

Expand Down Expand Up @@ -492,4 +492,4 @@ def modification_mock(*args, modif_name=None, **kwargs):

modify_userspace_for_livemode_lib.modify_userspace_as_configured(userspace_info, storage_info, livemode_config)

assert actual_modifications == expected_modifications
assert actual_modifications == expected_modifications
2 changes: 0 additions & 2 deletions repos/system_upgrade/common/libraries/mounting.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,5 +463,3 @@ def populate_exit_stack_with_mount_dependencies(exit_stack, dependencies):
mgr_class = dep_type_to_context_manager[dep.type]
mgr = mgr_class(**kwargs)
exit_stack.enter_context(mgr)


0 comments on commit 8f15d16

Please sign in to comment.