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:
1 parent
1f6859de08
commit
3b873d91fe
27 files changed
+195
-225
No files matched your search
@@ -2,11 +2,12 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import pytest
|
||||
from tests.conftest import _build_mock_api, NODE_STATUS
|
||||
from unittest.mock import patch
|
||||
|
||||
import pytest
|
||||
|
||||
from napalm_proxmox.driver import ProxmoxDriver
|
||||
from tests.conftest import _build_mock_api
|
||||
|
||||
|
||||
class TestGetEnvironment:
|
||||
@@ -25,9 +26,6 @@ class TestGetEnvironment:
|
||||
assert isinstance(result["fans"], dict)
|
||||
|
||||
def test_temperature_with_sensors(self):
|
||||
from tests.conftest import _build_mock_api, NODE_STATUS
|
||||
from unittest.mock import patch
|
||||
from napalm_proxmox.driver import ProxmoxDriver
|
||||
|
||||
sensors_data = [
|
||||
{"name": "CPU Package", "value": "55.0"},
|
||||
@@ -49,9 +47,6 @@ class TestGetEnvironment:
|
||||
assert result["temperature"]["GPU Core"]["is_critical"] is False
|
||||
|
||||
def test_temperature_critical(self):
|
||||
from tests.conftest import _build_mock_api
|
||||
from unittest.mock import patch
|
||||
from napalm_proxmox.driver import ProxmoxDriver
|
||||
|
||||
sensors_data = [{"name": "NVMe", "value": "98.0"}]
|
||||
mock_api = _build_mock_api(sensors=sensors_data)
|
||||
|
||||
Reference in new issue
Block a user