From dda6740789f80649a1628653146ba4369bbed00a Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Thu, 5 Mar 2026 20:59:12 +0000 Subject: template: T8347: for netifaces set "pylint: disable = no-name-in-module" As the python netifaces module is written in C - we can not inspect any import line as the linter does not see it. Disable the warnings here. --- python/vyos/template.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'python') diff --git a/python/vyos/template.py b/python/vyos/template.py index 596f9e8c5..2a783bc74 100755 --- a/python/vyos/template.py +++ b/python/vyos/template.py @@ -274,9 +274,9 @@ def netmask_from_ipv4(address): Example: - 172.18.201.10 -> 255.255.255.128 """ - from netifaces import interfaces - from netifaces import ifaddresses - from netifaces import AF_INET + from netifaces import interfaces # pylint: disable = no-name-in-module + from netifaces import ifaddresses # pylint: disable = no-name-in-module + from socket import AF_INET for interface in interfaces(): tmp = ifaddresses(interface) if AF_INET in tmp: -- cgit v1.2.3