Island: Rename `id_` parameter to `machine_id` in IMachineRepository

This commit is contained in:
Mike Salvatore 2022-08-30 07:30:41 -04:00
parent 0adf9d8467
commit 383cfdfefe
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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)