diff mbox series

test/py: Disable error E0611 in two cases for pylint

Message ID 20231209200128.3819612-1-trini@konsulko.com
State Accepted
Commit 3a2b6ba5cf1ad46e3684ee0c4175b3ea8d7c1280
Delegated to: Tom Rini
Headers show
Series test/py: Disable error E0611 in two cases for pylint | expand

Commit Message

Tom Rini Dec. 9, 2023, 8:01 p.m. UTC
Recently pylint has started to complain about:
No name 'fs_helper' in module 'tests' (no-name-in-module)

Due to:
from tests import fs_helper

However, we have:
test/py/tests/fs_helper.py

And since we do not want to add a dummy test/py/tests/__init__.py to
silence this warning we instead just disable it as needed.

Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
---
 test/py/tests/test_fs/conftest.py | 1 +
 test/py/tests/test_ut.py          | 1 +
 2 files changed, 2 insertions(+)

Comments

Tom Rini Dec. 9, 2023, 8:59 p.m. UTC | #1
On Sat, Dec 09, 2023 at 03:01:28PM -0500, Tom Rini wrote:

> Recently pylint has started to complain about:
> No name 'fs_helper' in module 'tests' (no-name-in-module)
> 
> Due to:
> from tests import fs_helper
> 
> However, we have:
> test/py/tests/fs_helper.py
> 
> And since we do not want to add a dummy test/py/tests/__init__.py to
> silence this warning we instead just disable it as needed.
> 
> Cc: Simon Glass <sjg@chromium.org>
> Signed-off-by: Tom Rini <trini@konsulko.com>

Applied to u-boot/master and u-boot/next, to unbreak CI now, thanks!
diff mbox series

Patch

diff --git a/test/py/tests/test_fs/conftest.py b/test/py/tests/test_fs/conftest.py
index 0d87d180c7b6..7c76425b51a4 100644
--- a/test/py/tests/test_fs/conftest.py
+++ b/test/py/tests/test_fs/conftest.py
@@ -9,6 +9,7 @@  import re
 from subprocess import call, check_call, check_output, CalledProcessError
 from fstest_defs import *
 import u_boot_utils as util
+# pylint: disable=E0611
 from tests import fs_helper
 
 supported_fs_basic = ['fat16', 'fat32', 'ext4']
diff --git a/test/py/tests/test_ut.py b/test/py/tests/test_ut.py
index 1d9149a3f683..0e3a48e73f61 100644
--- a/test/py/tests/test_ut.py
+++ b/test/py/tests/test_ut.py
@@ -9,6 +9,7 @@  import os.path
 import pytest
 
 import u_boot_utils
+# pylint: disable=E0611
 from tests import fs_helper
 
 def mkdir_cond(dirname):