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). typing.List/Dict/Optional become builtin generics and X | None, imports are sorted, the coding cookies are gone. Two tests that read the source text follow the new spelling. What ruff cannot fix comes in the next commit.
This commit is contained in:
1 parent
ac8e7c4c11
commit
08296d0d2e
77 files changed
+1329
-1074
No files matched your search
@@ -8,8 +8,6 @@ paramiko channel is faked, so the tests pin behaviour, not paramiko.
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import socket
|
||||
|
||||
import pytest
|
||||
|
||||
from napalm_device_types.channel import (
|
||||
@@ -56,7 +54,7 @@ class FakeChannel:
|
||||
if self.out:
|
||||
return self.out.pop(0)
|
||||
if self.hang:
|
||||
raise socket.timeout()
|
||||
raise TimeoutError()
|
||||
return b""
|
||||
|
||||
def recv_stderr_ready(self):
|
||||
|
||||
Reference in new issue
Block a user