Skip to content

Commit

Permalink
update back and pylint version (#155)
Browse files Browse the repository at this point in the history
* update back and pylint version

* run new black version

* remove indentation

* update pylint file

* fix format
  • Loading branch information
cqc-melf authored Jul 9, 2024
1 parent 107c4da commit 6e39451
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 .
Expand Down
4 changes: 2 additions & 2 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,13 @@ enable=
line-too-long,
lost-exception,
missing-kwoa,
mixed-indentation,
mixed-line-endings,
not-callable,
no-value-for-parameter,
nonexistent-operator,
not-in-loop,
pointless-statement,
redefined-builtin,
relative-import,
return-arg-in-generator,
return-in-init,
return-outside-function,
Expand All @@ -56,3 +54,5 @@ enable=
# Ignore long lines containing URLs or pylint or mypy directives.
ignore-long-lines=^(.*#\w*pylint: disable.*|.*# type: ignore.*|\s*(# )?<?https?://\S+>?)$

# Ignore python scripts that generate example notebooks
ignore-paths=^examples/python/.*.py$
7 changes: 3 additions & 4 deletions pytket/extensions/braket/backends/braket.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,6 @@ def __init__(
self._characteristics,
)

paradigm = props["paradigm"]
n_qubits = len(self._all_qubits)

self._supports_client_qubit_mapping = (
Expand Down Expand Up @@ -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"]
Expand Down
2 changes: 1 addition & 1 deletion tests/backend_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down

0 comments on commit 6e39451

Please sign in to comment.