Skip to content

Commit

Permalink
Use f-strings consistently in engine_client.py helpers (#5037)
Browse files Browse the repository at this point in the history
Review: @wcourtney
  • Loading branch information
maffoo authored Feb 28, 2022
1 parent d696635 commit 47098b6
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions cirq-google/cirq_google/engine/engine_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -922,19 +922,13 @@ def _processor_name_from_ids(project_id: str, processor_id: str) -> str:
def _calibration_name_from_ids(
project_id: str, processor_id: str, calibration_time_seconds: int
) -> str:
return 'projects/%s/processors/%s/calibrations/%d' % (
project_id,
processor_id,
calibration_time_seconds,
return (
f'projects/{project_id}/processors/{processor_id}/calibrations/{calibration_time_seconds}'
)


def _reservation_name_from_ids(project_id: str, processor_id: str, reservation_id: str) -> str:
return 'projects/%s/processors/%s/reservations/%s' % (
project_id,
processor_id,
reservation_id,
)
return f'projects/{project_id}/processors/{processor_id}/reservations/{reservation_id}'


def _ids_from_program_name(program_name: str) -> Tuple[str, str]:
Expand Down

0 comments on commit 47098b6

Please sign in to comment.