From 4b9276621d3633487c3be3fa5d2d82ad297abbf8 Mon Sep 17 00:00:00 2001 From: Pavel 'LEdoian' Turinsky Date: Thu, 15 Jun 2023 01:03:15 +0200 Subject: [PATCH] Fix a few typos --- birdvisu/ospfsock.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/birdvisu/ospfsock.py b/birdvisu/ospfsock.py index b929f97..cd8be45 100644 --- a/birdvisu/ospfsock.py +++ b/birdvisu/ospfsock.py @@ -14,7 +14,7 @@ class BirdError(Exception): @dataclass class BirdResponse: text: str = '' - codes: list[tuple[tuple[int, int], int]] = [] # List of line ranges (inclusive) and the respective code. + codes: list[tuple[tuple[int, int], str]] = field(default_factory=list) # List of line ranges (inclusive) and the respective code. def raise_exceptions(self) -> None: # If the response contains any errors, raise them as BirdErrors @@ -42,7 +42,7 @@ class BirdSocketConnection: def request(self, req: str) -> BirdResponse: if not req.endswith('\n'): req = req + '\n' - binreq = req,encode() + binreq = req.encode() self.socket.send(binreq) return self._parse_response()