Fixes typos according to the review

This commit is contained in:
Sergi Delgado Segura
2020-04-03 16:38:46 +02:00
parent fe73ee7298
commit 10e856ae74
8 changed files with 13 additions and 13 deletions

View File

@@ -33,7 +33,7 @@ class AppointmentsDBM(DBManager):
Args:
db_path (:obj:`str`): the path (relative or absolute) to the system folder containing the database. A fresh
database will be create if the specified path does not contain one.
database will be created if the specified path does not contain one.
Raises:
:obj:`ValueError`: If the provided ``db_path`` is not a string.
@@ -148,7 +148,7 @@ class AppointmentsDBM(DBManager):
by default.
Returns:
:obj:`dict`: A dictionary with all the appointments stored in the database. An empty dictionary is there
:obj:`dict`: A dictionary with all the appointments stored in the database. An empty dictionary if there
are none.
"""
@@ -453,7 +453,7 @@ class AppointmentsDBM(DBManager):
Creates a flag that signals that an appointment has been triggered for every appointment in the given list
Args:
uuids (:obj:`list`): a list of identifier for the appointments to flag.
uuids (:obj:`list`): a list of identifiers for the appointments to flag.
"""
with self.db.write_batch() as b:

View File

@@ -99,7 +99,7 @@ class Builder:
def update_states(watcher, missed_blocks_watcher, missed_blocks_responder):
"""
Updates the states of both the :mod:`Watcher <teos.watcher.Watcher>` and the
:mod:`Responder <teos.responder.Responder>`. If both have pending blocks to process they need to be updates at
:mod:`Responder <teos.responder.Responder>`. If both have pending blocks to process they need to be updated at
the same time, block by block.
If only one instance has to be updated, ``populate_block_queue`` should be used.

View File

@@ -3,7 +3,7 @@ from common.cryptographer import Cryptographer
class NotEnoughSlots(ValueError):
"""Raise this when trying to subtract more slots than a user has available"""
"""Raised when trying to subtract more slots than a user has available"""
def __init__(self, user_pk, requested_slots):
self.user_pk = user_pk
@@ -12,7 +12,7 @@ class NotEnoughSlots(ValueError):
class IdentificationFailure(Exception):
"""
Raise this when a user can not be identified. Either the user public key cannot be recovered or the user is
Raised when a user can not be identified. Either the user public key cannot be recovered or the user is
not found within the registered ones.
"""
@@ -45,7 +45,7 @@ class Gatekeeper:
"""
if not is_compressed_pk(user_pk):
raise ValueError("provided public key does not match expected format (33-byte hex string)")
raise ValueError("Provided public key does not match expected format (33-byte hex string)")
if user_pk not in self.registered_users:
self.registered_users[user_pk] = {"available_slots": self.default_slots}

View File

@@ -17,7 +17,7 @@ class UsersDBM(DBManager):
Args:
db_path (:obj:`str`): the path (relative or absolute) to the system folder containing the database. A fresh
database will be create if the specified path does not contain one.
database will be created if the specified path does not contain one.
Raises:
:obj:`ValueError`: If the provided ``db_path`` is not a string.
@@ -75,7 +75,7 @@ class UsersDBM(DBManager):
user_pk (:obj:`str`): a 33-byte hex-encoded string identifying the user.
Returns:
:obj:`dict`: A dictionary containing the appointment data if they ``key`` is found.
:obj:`dict`: A dictionary containing the appointment data if the ``key`` is found.
Returns ``None`` otherwise.
"""