style: ruff format and the lint rules of the driver standard

Mechanical: ruff format, and ruff check --fix with the rule set every NAPALM
driver uses (E, F, I, UP, B at line length 100, Python 3.10). What ruff
cannot fix comes in the next commit.
This commit is contained in:
Christian Manivong committed 2026-10-23 08:42:02 +02:00
1 parent 8d38e6f119
commit 4a4f9378c5
4 files changed
+26 -7

No files matched your search

+11 -6
View File
@@ -18,10 +18,9 @@ import socket
from typing import Any
import requests
from requests.exceptions import RequestException
from napalm.base.exceptions import ConnectionClosedException, ConnectionException
from napalm.base.exceptions import ConnectionException
from napalm_device_types import FingerprintRule, PhoneDriver
from requests.exceptions import RequestException
class YealinkDriver(PhoneDriver):
@@ -36,7 +35,9 @@ class YealinkDriver(PhoneDriver):
"80:5E:0C", # YEALINK(XIAMEN) NETWORK TECHNOLOGY — IEEE, verifiziert an T58V
]
HTTP_FINGERPRINT = [
FingerprintRule("yealink", weight=10.0), # nicht mandatory: Yealink/api redirect hat kein "yealink" im Body
FingerprintRule(
"yealink", weight=10.0
), # nicht mandatory: Yealink/api redirect hat kein "yealink" im Body
FingerprintRule("sip-t", weight=5.0),
FingerprintRule("sip-w", weight=5.0),
FingerprintRule("sip-cp", weight=5.0),
@@ -144,7 +145,9 @@ class YealinkDriver(PhoneDriver):
def get_interfaces(self) -> dict:
raise NotImplementedError
def get_config(self, retrieve: str = "all", full: bool = False, sanitized: bool = False) -> dict:
def get_config(
self, retrieve: str = "all", full: bool = False, sanitized: bool = False
) -> dict:
raise NotImplementedError
def get_interfaces_ip(self) -> dict:
@@ -192,7 +195,9 @@ class YealinkDriver(PhoneDriver):
def cli(self, commands: list[str], encoding: str = "text") -> dict:
raise NotImplementedError
def load_replace_candidate(self, filename: str | None = None, config: str | None = None) -> None:
def load_replace_candidate(
self, filename: str | None = None, config: str | None = None
) -> None:
raise NotImplementedError
def load_merge_candidate(self, filename: str | None = None, config: str | None = None) -> None: