Skip to content

Commit

Permalink
ci: fix pylint failures
Browse files Browse the repository at this point in the history
There was an attempt to disable a few warnings by comments, but that
wasn't working. It seems that pylint's behavior regarding multi-line
statements might have changed since the code was introduced.

Moving the comment prior to the statement works, so do that.
  • Loading branch information
rohanpm committed Jun 21, 2020
1 parent 0d014ba commit bdb7b55
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tests/test_ubipop.py
Original file line number Diff line number Diff line change
Expand Up @@ -1017,8 +1017,9 @@ def test_get_pulp_actions(mock_ubipop_runner, mock_current_content_ft):
],
}

# pylint: disable=protected-access
associations, unassociations, mdd_association, mdd_unassociation = \
mock_ubipop_runner._get_pulp_actions(*mock_current_content_ft) # pylint: disable=protected-access
mock_ubipop_runner._get_pulp_actions(*mock_current_content_ft)

# firstly, check correct associations, there should 1 unit of each type associated
modules, rpms, srpms, debug_rpms = associations
Expand Down Expand Up @@ -1101,8 +1102,9 @@ def test_get_pulp_actions_no_actions(mock_ubipop_runner, mock_current_content_ft
],
}

# pylint: disable=protected-access
associations, unassociations, mdd_association, mdd_unassociation = \
mock_ubipop_runner._get_pulp_actions(*mock_current_content_ft) # pylint: disable=protected-access
mock_ubipop_runner._get_pulp_actions(*mock_current_content_ft)

# firstly, check correct associations, there should 0 units associated
modules, rpms, srpms, debug_rpms = associations
Expand Down Expand Up @@ -1192,8 +1194,9 @@ def test_get_pulp_no_duplicates(mock_ubipop_runner, mock_current_content_ft):
"bar_pkg": [get_test_pkg(name="bar_pkg",
filename="srpm_new_next.src.rpm")]}

# pylint: disable=protected-access
associations, _, _, _ = \
mock_ubipop_runner._get_pulp_actions(*mock_current_content_ft) # pylint: disable=W0212
mock_ubipop_runner._get_pulp_actions(*mock_current_content_ft)

_, _, srpms, _ = associations
# only 5 srpm associations, no duplicates
Expand Down

0 comments on commit bdb7b55

Please sign in to comment.