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:41 +02:00
1 parent 692a584fd2
commit 571d9abb5f
15 files changed
+690 -419

No files matched your search

+7 -7
View File
@@ -6,11 +6,11 @@ has to be stopped and removed again. These tests drive that whole lifecycle
against a fake ``_get`` / ``_post``.
"""
import pytest
from unittest.mock import MagicMock, patch
from napalm_opnsense.opnsense import OPNsenseDriver
import pytest
from napalm_opnsense.opnsense import OPNsenseDriver
# ---------------------------------------------------------------------------
# Fake API
@@ -28,11 +28,11 @@ class FakePingAPI:
#: to assume one, which is why nothing caught the payload going to the
#: wrong node.
self.model_path = tuple(model_path)
self.created = [] # payloads passed to set
self.started = [] # job ids passed to start
self.stopped = [] # job ids passed to stop
self.removed = [] # job ids passed to remove
self.jobs = {} # job id -> hostname
self.created = [] # payloads passed to set
self.started = [] # job ids passed to start
self.stopped = [] # job ids passed to stop
self.removed = [] # job ids passed to remove
self.jobs = {} # job id -> hostname
self.search_calls = 0
self._next_id = 0