Skip to content

Commit

Permalink
Fix lint errors in CI (#119)
Browse files Browse the repository at this point in the history
* Fix lint errors in CI

* Initialize array correctly

* Add no-self-use check
  • Loading branch information
caleb-johnson authored Dec 10, 2024
1 parent 5cbb3ed commit 9a33611
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,14 @@ warn_return_any = true
warn_unused_configs = true
ignore_missing_imports = true

[tool.pylint.main]
[tool.pylint]
py-version = "3.9"
load-plugins = ["pylint.extensions.no_self_use"]

[tool.pylint."messages control"]
disable = ["all"]
enable = [
"reimported",
"no-self-use",
"no-else-raise",
"redefined-argument-from-local",
"redefined-builtin",
Expand Down
3 changes: 1 addition & 2 deletions qiskit_addon_sqd/counts.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,9 @@ def generate_counts_bipartite_hamming(
dn_flips = rng.choice(np.arange(num_bits // 2), hamming_left, replace=False).astype("int")

# Create a bitstring with the chosen bits flipped
bts_arr = np.zeros(num_bits)
bts_arr = np.zeros(num_bits, dtype=int)
bts_arr[dn_flips] = 1
bts_arr[up_flips + num_bits // 2] = 1
bts_arr = bts_arr.astype("int")
bts = "".join("1" if bit else "0" for bit in bts_arr)

# Add the bitstring to the sample dict
Expand Down

0 comments on commit 9a33611

Please sign in to comment.