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:32:35 +02:00
1 parent 4a95a5f0d4
commit de00041b46
4 files changed
+42 -28

No files matched your search

+3 -3
View File
@@ -8,8 +8,7 @@ import pytest
from napalm.base import NetworkDriver
from napalm_device_types import OSDriver
from napalm_bsd import FreeBSDDriver, OpenBSDDriver
from napalm_bsd import base
from napalm_bsd import FreeBSDDriver, OpenBSDDriver, base
from napalm_bsd.base import BsdDriver
FIXTURES = Path(__file__).parent / "fixtures"
@@ -600,7 +599,8 @@ class TestPrivilegedStdin:
def _driver(self, monkeypatch, *, sudo_password, root=False):
sent = []
monkeypatch.setattr(
base, "run_on_transport",
base,
"run_on_transport",
lambda transport, line, stdin=None, timeout=60: sent.append((line, stdin)) or _Result(),
)
args = {"sudo_password": sudo_password} if sudo_password else {}