forked from p15670423/monkey
Island: Rename `id_` parameter to `machine_id` in IMachineRepository
This commit is contained in:
parent
0adf9d8467
commit
383cfdfefe
|
@ -29,11 +29,11 @@ class IMachineRepository(ABC):
|
|||
"""
|
||||
|
||||
@abstractmethod
|
||||
def get_machine_by_id(self, id_: MachineID) -> Machine:
|
||||
def get_machine_by_id(self, machine_id: MachineID) -> Machine:
|
||||
"""
|
||||
Get a `Machine` by ID
|
||||
|
||||
:param id: The ID of the `Machine` to be retrieved
|
||||
:param machine_id: The ID of the `Machine` to be retrieved
|
||||
:return: A `Machine` with a matching `id`
|
||||
:raises UnknownRecordError: If a `Machine` with the specified `id` does not exist in the
|
||||
repository
|
||||
|
|
|
@ -57,8 +57,8 @@ class MongoMachineRepository(IMachineRepository):
|
|||
f"but updated {result.modified_count}"
|
||||
)
|
||||
|
||||
def get_machine_by_id(self, id_: MachineID) -> Machine:
|
||||
return self._find_one("id", "machine ID", id_)
|
||||
def get_machine_by_id(self, machine_id: MachineID) -> Machine:
|
||||
return self._find_one("id", "machine ID", machine_id)
|
||||
|
||||
def get_machine_by_hardware_id(self, hardware_id: HardwareID) -> Machine:
|
||||
return self._find_one("hardware_id", "hardware ID", hardware_id)
|
||||
|
|
Loading…
Reference in New Issue