Skip to content

Commit 17c25e2

Browse files
committed
Fix blank lines in tuf.api as per styleguide
https://github.com/google/styleguide/blob/gh-pages/pyguide.md#35-blank-lines Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
1 parent c254fd0 commit 17c25e2

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

tuf/api/metadata.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,6 @@ def verify(self, key: Mapping[str, Any],
266266
signed_serializer.serialize(self.signed))
267267

268268

269-
270269
class Signed:
271270
"""A base class for the signed part of TUF metadata.
272271
@@ -281,12 +280,10 @@ class Signed:
281280
metadata format adheres to.
282281
expires: The metadata expiration datetime object.
283282
284-
285283
"""
286284
# NOTE: Signed is a stupid name, because this might not be signed yet, but
287285
# we keep it to match spec terminology (I often refer to this as "payload",
288286
# or "inner metadata")
289-
290287
def __init__(
291288
self, _type: str, version: int, spec_version: str,
292289
expires: datetime) -> None:
@@ -333,13 +330,11 @@ def _common_fields_to_dict(self) -> Dict[str, Any]:
333330
'expires': self.expires.isoformat() + 'Z'
334331
}
335332

336-
337333
# Modification.
338334
def bump_expiration(self, delta: timedelta = timedelta(days=1)) -> None:
339335
"""Increments the expires attribute by the passed timedelta. """
340336
self.expires += delta
341337

342-
343338
def bump_version(self) -> None:
344339
"""Increments the metadata version number by 1."""
345340
self.version += 1
@@ -420,7 +415,6 @@ def add_key(self, role: str, keyid: str,
420415
self.roles[role]['keyids'].append(keyid)
421416
self.keys[keyid] = key_metadata
422417

423-
424418
# Remove key for a role.
425419
def remove_key(self, role: str, keyid: str) -> None:
426420
"""Removes key for 'role' and updates the key store. """
@@ -433,8 +427,6 @@ def remove_key(self, role: str, keyid: str) -> None:
433427
del self.keys[keyid]
434428

435429

436-
437-
438430
class Timestamp(Signed):
439431
"""A container for the signed part of timestamp metadata.
440432

tuf/api/serialization/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@
1616
"""
1717
import abc
1818

19+
1920
# TODO: Should these be in tuf.exceptions or inherit from tuf.exceptions.Error?
2021
class SerializationError(Exception):
2122
"""Error during serialization. """
2223

24+
2325
class DeserializationError(Exception):
2426
"""Error during deserialization. """
2527

0 commit comments

Comments
 (0)