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:36:49 +02:00
1 parent f943fde994
commit 1271218868
2 files changed
+8 -4

No files matched your search

+3 -2
View File
@@ -66,8 +66,9 @@ pip install -e vendor/napalm-device-types/ -e vendor/napalm-vmware/
```python
from napalm_vmware import VmwareEsxiDriver
driver = VmwareEsxiDriver("esx01.example.lan", "root", "secret",
optional_args={"verify_ssl": False})
driver = VmwareEsxiDriver(
"esx01.example.lan", "root", "secret", optional_args={"verify_ssl": False}
)
driver.open()
print(driver.get_facts())
for vm in driver.get_vms():
+5 -2
View File
@@ -69,9 +69,12 @@ markers = [
line-length = 100
target-version = "py310"
# Same rule set the netOrk repo gates on.
[tool.ruff.lint]
select = ["E", "F", "I", "UP"]
select = ["E", "F", "I", "UP", "B"]
[tool.ruff.lint.per-file-ignores]
# Recorded device output keeps its lines.
"tests/**" = ["E501"]
[tool.mypy]
python_version = "3.10"