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). Mapping and Iterable come from collections.abc, imports are sorted. What ruff cannot fix comes in the next commit.
This commit is contained in:
1 parent
5b24675a12
commit
09029ca0a4
29 files changed
+985
-456
No files matched your search
@@ -2,21 +2,24 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any, Mapping
|
||||
from collections.abc import Mapping
|
||||
from typing import Any
|
||||
|
||||
# DMI defaults that board vendors leave in place (Supermicro boards ship most of them).
|
||||
PLACEHOLDERS = frozenset({
|
||||
"to be filled by o.e.m.",
|
||||
"default string",
|
||||
"not specified",
|
||||
"not applicable",
|
||||
"n/a",
|
||||
"none",
|
||||
"0123456789",
|
||||
"system serial number",
|
||||
"system product name",
|
||||
"system manufacturer",
|
||||
})
|
||||
PLACEHOLDERS = frozenset(
|
||||
{
|
||||
"to be filled by o.e.m.",
|
||||
"default string",
|
||||
"not specified",
|
||||
"not applicable",
|
||||
"n/a",
|
||||
"none",
|
||||
"0123456789",
|
||||
"system serial number",
|
||||
"system product name",
|
||||
"system manufacturer",
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
def text(value: Any) -> str | None:
|
||||
|
||||
Reference in new issue
Block a user