diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index d80ff50..5290823 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -19,7 +19,7 @@ jobs: - name: Update pip run: pip install --upgrade pip - name: Install black and pylint - run: pip install black~=22.3 pylint~=2.13,!=2.13.6 + run: pip install black pylint - name: Check files are formatted with black run: | black --check . diff --git a/.pylintrc b/.pylintrc index 6549ebb..d4cb258 100644 --- a/.pylintrc +++ b/.pylintrc @@ -22,7 +22,6 @@ enable= line-too-long, lost-exception, missing-kwoa, - mixed-indentation, mixed-line-endings, not-callable, no-value-for-parameter, @@ -30,7 +29,6 @@ enable= not-in-loop, pointless-statement, redefined-builtin, - relative-import, return-arg-in-generator, return-in-init, return-outside-function, @@ -56,3 +54,5 @@ enable= # Ignore long lines containing URLs or pylint or mypy directives. ignore-long-lines=^(.*#\w*pylint: disable.*|.*# type: ignore.*|\s*(# )??)$ +# Ignore python scripts that generate example notebooks +ignore-paths=^examples/python/.*.py$ diff --git a/pytket/extensions/braket/backends/braket.py b/pytket/extensions/braket/backends/braket.py index fcf1edf..8abf37f 100644 --- a/pytket/extensions/braket/backends/braket.py +++ b/pytket/extensions/braket/backends/braket.py @@ -422,7 +422,6 @@ def __init__( self._characteristics, ) - paradigm = props["paradigm"] n_qubits = len(self._all_qubits) self._supports_client_qubit_mapping = ( @@ -556,9 +555,9 @@ def _get_backend_info( float, fid["1Q"]["mean"] ) get_readout_error: Callable[["Node"], float] = lambda n: 0.0 - get_link_error: Callable[ - ["Node", "Node"], float - ] = lambda n0, n1: 1.0 - cast(float, fid["2Q"]["mean"]) + get_link_error: Callable[["Node", "Node"], float] = ( + lambda n0, n1: 1.0 - cast(float, fid["2Q"]["mean"]) + ) elif schema == RIGETTI_SCHEMA: specs = characteristics["specs"] specs1q, specs2q = specs["1Q"], specs["2Q"] diff --git a/tests/backend_test.py b/tests/backend_test.py index 10737ea..1a33c2e 100644 --- a/tests/backend_test.py +++ b/tests/backend_test.py @@ -20,7 +20,7 @@ import numpy as np import pytest from pytket.extensions.braket import BraketBackend -from pytket.architecture import Architecture, FullyConnected +from pytket.architecture import FullyConnected from pytket.circuit import Circuit, OpType, Qubit, Bit from pytket.pauli import Pauli, QubitPauliString from pytket.utils.expectations import (