Skip to content

Commit 05f40ae

Browse files
authored
ci: enable E602 pylint rule (#6616)
Remove E0602 as ignore items when running code lint check. It was accidently added to the ignore list but E0602 is important when doing code check therefore it should not be ignored. I have also update relevant .py source files to correct the code. Signed-off-by: Haijiao Zhao <[email protected]>
1 parent 555cc3d commit 05f40ae

File tree

7 files changed

+9
-4
lines changed

7 files changed

+9
-4
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
pip install sphinx${SPHINX_VERSION:+==$SPHINX_VERSION}
3737
pip install -r requirements-travis.txt
3838
- name: Run inspekt
39-
run: inspekt checkall --disable-style E501,E265,W601,W605,E402,E722,E741 --disable-lint W,R,C,E1002,E1101,E1103,E1120,F0401,I0011,E0601,E0602,E0606 --no-license-check
39+
run: inspekt checkall --disable-style E501,E265,W601,W605,E402,E722,E741 --disable-lint W,R,C,E1002,E1101,E1103,E1120,F0401,I0011,E0601,E0606 --no-license-check
4040
- run: echo "This job's status is ${{ job.status }}."
4141
- name: Run spellchecker
4242
run: |

libvirt/tests/src/passthrough/ccw/libvirt_ccw_passthrough.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import logging
12
from uuid import uuid4
23

34
from virttest.utils_misc import wait_for, cmd_status_output
@@ -6,6 +7,8 @@
67

78
from provider.vfio import ccw
89

10+
LOG = logging.getLogger('avocado.' + __name__)
11+
912

1013
def mdev_listed(uuid):
1114
"""

libvirt/tests/src/scsi/scsi_controller_driver_queues.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def check_result():
5656
"but found '%s'." % (expect_value, dev.driver.get("queues")))
5757
if actual_driver_iothreads != driver_iothreads:
5858
test.fail("Expect the scsi controller iothread to be '%s',"
59-
"but found '%s'." % (driver_iothreads, actual_driver.iothreads))
59+
"but found '%s'." % (driver_iothreads, actual_driver_iothreads))
6060
test.log.info("TEST_STEP3: check the qemu command line.")
6161
if check_qemu_pattern:
6262
libvirt.check_qemu_cmd_line(check_qemu_pattern)

libvirt/tests/src/virsh_cmd/domain/virsh_sosreport.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import logging
22
import os
3+
import re
34
import shutil
45
import subprocess
5-
66
from pathlib import Path
77

88

libvirt/tests/src/virsh_cmd/volume/virsh_vol_download_upload.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ def run(test, params, env):
258258
if pool_type is not None:
259259
options = " --pool %s" % pool_name
260260
if offset is not None:
261-
options += " --offset %s" % offset
261+
options += " --offset %s" % offset # pylint: disable=E0602
262262
offset = int(offset)
263263
else:
264264
offset = 0

libvirt/tests/src/virsh_cmd/volume/virsh_vol_resize.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from avocado.core import exceptions
99

1010
from virttest import libvirt_storage
11+
from virttest import utils_sys
1112
from virttest import utils_misc
1213
from virttest import utils_split_daemons
1314
from virttest import virsh

libvirt/tests/src/virtiofs/virtiofs.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
from glob import glob
88

9+
from aexpect import ShellTimeoutError
910
from avocado.utils import process
1011
from avocado.utils import path as utils_path
1112

0 commit comments

Comments
 (0)