Skip to content

Commit

Permalink
Remove explicit object superclass (#2910)
Browse files Browse the repository at this point in the history
  • Loading branch information
viathor committed Apr 15, 2020
1 parent 110dd4a commit 4c0cb2c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion cirq/circuits/insert_strategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"""Hard-coded options for adding multiple operations to a circuit."""


class InsertStrategy(object):
class InsertStrategy:
"""Indicates preferences on how to add multiple operations to a circuit."""

NEW = None # type: InsertStrategy
Expand Down
6 changes: 3 additions & 3 deletions cirq/contrib/qasm_import/_lexer.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from cirq.contrib.qasm_import.exception import QasmException


class QasmLexer(object):
class QasmLexer:

def __init__(self):
self.lex = lex.lex(object=self, debug=False)
Expand Down Expand Up @@ -111,8 +111,8 @@ def t_COMMENT(self, t):
r"""//.*"""

def t_error(self, t):
raise QasmException("Illegal character '{}' at line {}".format(
t.value[0], t.lineno))
raise QasmException(
f"Illegal character '{t.value[0]}' at line {t.lineno}")

def input(self, qasm):
self.lex.input(qasm)
Expand Down
5 changes: 2 additions & 3 deletions cirq/google/line/placement/anneal.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,8 @@
_STATE = Tuple[List[List[GridQubit]], Set[EDGE]]


class AnnealSequenceSearch(object):
"""Simulated annealing search heuristic.
"""
class AnnealSequenceSearch:
"""Simulated annealing search heuristic."""

def __init__(self, device: 'cirq.google.XmonDevice', seed=None) -> None:
"""Greedy sequence search constructor.
Expand Down
2 changes: 1 addition & 1 deletion cirq/study/resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"""Something that can be used to turn parameters into values.""")


class ParamResolver(object):
class ParamResolver:
"""Resolves sympy.Symbols to actual values.
A Symbol is a wrapped parameter name (str). A ParamResolver is an object
Expand Down

0 comments on commit 4c0cb2c

Please sign in to comment.