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
692a584fd2
commit
571d9abb5f
15 files changed
+690
-419
No files matched your search
@@ -33,7 +33,9 @@ class OPNsenseOspfMixin(OspfMixin):
|
||||
def get_ospf(self) -> dict[str, Any]:
|
||||
"""Router ID, areas and OSPF per interface; empty when OSPF does not run."""
|
||||
overview = self._get(f"{_DIAG}/ospfoverview").get("response") or {} # type: ignore[attr-defined]
|
||||
interfaces = (self._get(f"{_DIAG}/ospfinterface").get("response") or {}).get("interfaces") or {} # type: ignore[attr-defined]
|
||||
interfaces = (self._get(f"{_DIAG}/ospfinterface").get("response") or {}).get(
|
||||
"interfaces"
|
||||
) or {} # type: ignore[attr-defined]
|
||||
return {
|
||||
"router_id": overview.get("routerId") or None,
|
||||
"areas": list((overview.get("areas") or {}).keys()),
|
||||
|
||||
Reference in new issue
Block a user