From 3490d8b62a8991498f81741eda5137cd5e6fdd88 Mon Sep 17 00:00:00 2001 From: Christian Manivong Date: Mon, 2 Nov 2026 09:18:42 +0100 Subject: [PATCH] docs(structure): format the code examples as current ruff does ruff 0.17 formats Python blocks in Markdown too, and CI installs ruff unpinned, so the lint job on main failed on docs/STRUCTURE.md. Closes #79 --- docs/STRUCTURE.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/STRUCTURE.md b/docs/STRUCTURE.md index 45986e7..68c86f7 100644 --- a/docs/STRUCTURE.md +++ b/docs/STRUCTURE.md @@ -52,9 +52,13 @@ driver knows how each step is done on its device; the caller supplies every valu ```python class SnmpAgentMixin: def configure_snmp_agent(self, settings: SnmpAgentSettingsDict) -> FixResultDict: - steps = [self._install_snmp_agent, self._write_snmp_agent_config, - self._enable_snmp_agent, self._verify_snmp_agent] - ... # runs them in order, stops at the first failure + steps = [ + self._install_snmp_agent, + self._write_snmp_agent_config, + self._enable_snmp_agent, + self._verify_snmp_agent, + ] + ... # runs them in order, stops at the first failure # declared only; napalm-unix implements them for net-snmp def _install_snmp_agent(self) -> FixStepDict: ... @@ -95,8 +99,7 @@ proprietary OIDs declares them as data, in a class attribute of a type defined h class ProcurveDriver(SwitchDriver): SNMP_HEALTH_PROFILE: ClassVar[SnmpHealthProfile] = { "uptime": {"oids": ["1.3.6.1.4.1.11.2.14.11.1.2.4.1.5.1"], "format": "ticks"}, - "cpu": {"oids": ["1.3.6.1.4.1.11.2.14.11.5.1.9.6.1.0", - "1.3.6.1.4.1.11.2.3.7.8.6.1.0"]}, + "cpu": {"oids": ["1.3.6.1.4.1.11.2.14.11.5.1.9.6.1.0", "1.3.6.1.4.1.11.2.3.7.8.6.1.0"]}, "memory": {"total": "...", "free": "...", "unit": "bytes"}, } ``` -- 2.54.0