Skip to content

Commit 733e85a

Browse files
authored
Add exceptions to linter for tutorials and examples (#302)
FYI, @cduck
1 parent 763fd6a commit 733e85a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

docs/digital/tutorials/circuits_with_bloqade.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ def foo(x: int, y: int) -> bool:
230230
return x < y
231231

232232

233-
assert foo(1, 2) == True
233+
assert foo(1, 2)
234234
# %% [markdown]
235235
# ## Extracting quantum states
236236
#

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,3 +103,7 @@ dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
103103

104104
[tool.coverage.run]
105105
include = ["src/bloqade/*"]
106+
107+
[tool.ruff.lint.per-file-ignores]
108+
"docs/digital/tutorials/*.py" = ["E402", "F401"] # ignore import not at top and unused
109+
"docs/digital/examples/*.py" = ["E402"] # ignore imports not at top

0 commit comments

Comments
 (0)