Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
caleb-johnson committed Sep 11, 2024
1 parent ec98b0c commit ee8110c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
6 changes: 6 additions & 0 deletions .mypy.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[mypy]
python_version = 3.11
show_error_codes = true
warn_return_any = true
warn_unused_configs = true
ignore_missing_imports = true
3 changes: 3 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[MESSAGES CONTROL]
disable=all
enable=reimported,no-self-use,no-else-raise,redefined-argument-from-local,redefined-builtin,raise-missing-from,cyclic-import,unused-argument,attribute-defined-outside-init,no-else-return
8 changes: 4 additions & 4 deletions qiskit_addon_dice_solver/dice_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,13 +273,13 @@ def _write_input_files(
up_addr, dn_addr = addresses
bytes_up = _address_list_to_bytes(up_addr)
bytes_dn = _address_list_to_bytes(dn_addr)
file1 = open(os.path.join(working_dir, "AlphaDets.bin"), "wb")
file1 = open(os.path.join(working_dir, "AlphaDets.bin"), "wb") # type: ignore
for bytestring in bytes_up:
file1.write(bytestring)
file1.write(bytestring) # type: ignore
file1.close()
file1 = open(os.path.join(working_dir, "BetaDets.bin"), "wb")
file1 = open(os.path.join(working_dir, "BetaDets.bin"), "wb") # type: ignore
for bytestring in bytes_dn:
file1.write(bytestring)
file1.write(bytestring) # type: ignore
file1.close()


Expand Down
2 changes: 0 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,12 @@ allowlist_externals =
pydocstyle
mypy
pylint
typos
commands =
ruff format --check qiskit_addon_dice_solver/
ruff check qiskit_addon_dice_solver/
pydocstyle qiskit_addon_dice_solver/
mypy qiskit_addon_dice_solver/
pylint -rn qiskit_addon_dice_solver/
typos

[testenv:docs]
basepython = python3.11
Expand Down

0 comments on commit ee8110c

Please sign in to comment.