Skip to content

Commit 6d14d91

Browse files
committed
Fixed linting errors, formatting
1 parent 20928d1 commit 6d14d91

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

src/sshkey_tools/fields.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ class BytestringField(CertificateField):
265265
DEFAULT = b""
266266

267267
@classmethod
268-
def encode(cls, value: bytes, encoding: str = 'utf-8') -> bytes:
268+
def encode(cls, value: bytes, encoding: str = "utf-8") -> bytes:
269269
"""
270270
Encodes a string or bytestring into a packed byte string
271271
@@ -293,7 +293,7 @@ def decode(data: bytes, encoding: str = None) -> Tuple[bytes, bytes]:
293293
string and remainder of the data
294294
"""
295295
length = unpack(">I", data[:4])[0] + 4
296-
296+
297297
if encoding is not None:
298298
return ensure_string(data[4:length], encoding), data[length:]
299299

@@ -336,6 +336,7 @@ def decode(data: bytes, encoding: str = "utf-8") -> Tuple[str, bytes]:
336336
"""
337337
return BytestringField.decode(data, encoding)
338338

339+
339340
class Integer32Field(CertificateField):
340341
"""
341342
Certificate field representing a 32-bit integer

src/sshkey_tools/utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,4 +304,6 @@ def str_to_time_delta(str_delta: str) -> datetime.timedelta:
304304
parsed = time_parse(str_delta, as_timedelta=True, raise_exception=True)
305305
return parsed
306306
except Exception as ex:
307-
raise ValueError(f"Could not parse time delta string {str_delta} : {ex}") from ex
307+
raise ValueError(
308+
f"Could not parse time delta string {str_delta} : {ex}"
309+
) from ex

0 commit comments

Comments
 (0)