Skip to content

Commit

Permalink
"black" formatter version drift
Browse files Browse the repository at this point in the history
  • Loading branch information
losos0 committed Feb 29, 2024
1 parent 7141896 commit 65e63f9
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
8 changes: 5 additions & 3 deletions unitary/engine_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,11 @@ def _get_program_id(program: Any):
return str(uuid.uuid4())

parts = [
p
if len(p) <= chars_per_part
else p[: chars_per_part // 2] + p[-chars_per_part // 2 :]
(
p
if len(p) <= chars_per_part
else p[: chars_per_part // 2] + p[-chars_per_part // 2 :]
)
for p in parts
]
return "_".join(parts)
Expand Down
1 change: 0 additions & 1 deletion unitary/examples/quantum_rpg/ascii_art.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""ASCII art and other large text constants."""


# ASCII art generated with font
# DOOM by Frans P. de Vries <[email protected]> 18 Jun 1996
# based on Big by Glenn Chappell 4/93 -- based on Standard
Expand Down
4 changes: 1 addition & 3 deletions unitary/examples/quantum_rpg/classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,7 @@ def actions(self) -> Dict[str, Callable]:
),
}
if self.level >= 3:
action_dict[
"s"
] = (
action_dict["s"] = (
lambda monster, qubit: f"Sample result {monster.sample(monster.quantum_object_name(qubit), False)}"
)
return action_dict
1 change: 1 addition & 0 deletions unitary/examples/quantum_rpg/input_helpers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Functions for safe and user-friendly input."""

from typing import Callable, Optional, Sequence, TextIO

import sys
Expand Down
6 changes: 3 additions & 3 deletions unitary/quantum_chess/quantum_board.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,9 +427,9 @@ def _generate_accumulations(self, repetitions: int = 1000) -> None:
probs = self._apply_cache(
previous_probability, last_move, self.cache[cache_key]
)
self.move_history_probabilities_cache[
-1
] = self._make_probability_history(repetitions, probs)
self.move_history_probabilities_cache[-1] = (
self._make_probability_history(repetitions, probs)
)
# Remove entry from cached since it has been consumed.
del self.cache[cache_key]
return
Expand Down

0 comments on commit 65e63f9

Please sign in to comment.