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
@@ -108,8 +108,7 @@ class BmcDriver(HealthMetricsMixin, LicenseMixin, ManagementControllerDriver):
|
||||
except (RedfishError, ConnectionException) as exc:
|
||||
if not has_ipmi:
|
||||
raise
|
||||
LOG.info("%s: %s failed over Redfish (%s); asking IPMI", self.hostname, name,
|
||||
exc)
|
||||
LOG.info("%s: %s failed over Redfish (%s); asking IPMI", self.hostname, name, exc)
|
||||
if not has_ipmi:
|
||||
raise NotImplementedError(f"{self.hostname}: {name} needs Redfish")
|
||||
return getattr(self._ipmi_conn(), name)(*args)
|
||||
|
||||
Reference in new issue
Block a user