Skip to content

Commit

Permalink
chore: Update ruff version used by CI (#200)
Browse files Browse the repository at this point in the history
  • Loading branch information
croyzor authored May 1, 2024
1 parent fcfb6cb commit 3dbec3c
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
with:
src: "./guppylang"
args: format --check
version: 0.3.0
version: 0.4.2

- name: Lint with ruff
uses: chartboost/ruff-action@v1
Expand Down
Empty file added docs/api-docs/__init__.py
Empty file.
8 changes: 5 additions & 3 deletions docs/api-docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
# See https://www.sphinx-doc.org/en/master/usage/configuration.html

import inspect
import guppylang
from types import GenericAlias, UnionType

import guppylang

project = "Guppy Compiler"
copyright = "2024, Quantinuum"
author = "Quantinuum"
Expand Down Expand Up @@ -37,8 +38,8 @@

autosummary_generate = True

templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
templates_path = ["_templates"]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]

intersphinx_mapping = {
"python": ("https://docs.python.org/3/", None),
Expand Down Expand Up @@ -101,5 +102,6 @@ def resolve_type_aliases(app, env, node, contnode):
)
return ref


def setup(app):
app.connect("missing-reference", resolve_type_aliases)
2 changes: 1 addition & 1 deletion guppylang/checker/expr_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -933,7 +933,7 @@ def eval_py_expr(node: PyExpr, ctx: Context) -> Any:
"`py(...)` expression",
e.node or node,
) from None
except Exception as e: # noqa: BLE001
except Exception as e:
# Remove the top frame pointing to the `eval` call from the stack trace
tb = e.__traceback__.tb_next if e.__traceback__ else None
raise GuppyError(
Expand Down
41 changes: 21 additions & 20 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pytest = "^7.4.4"
pytest-cov = "^4.1.0"
mypy = "^1.8.0"
pre-commit = "^3.6.0"
ruff = ">=0.3"
ruff = ">=0.4.2"
maturin = "^1.4.0"
pytket = "*"

Expand Down
4 changes: 3 additions & 1 deletion tests/hugr/test_dummy_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ def test_single_dummy():
def test_unique_names():
g = Hugr()
defn = g.add_def(
FunctionType([bool_type()], TupleType([bool_type(), bool_type()])), g.root, "test"
FunctionType([bool_type()], TupleType([bool_type(), bool_type()])),
g.root,
"test",
)
dfg = g.add_dfg(defn)
inp = g.add_input([bool_type()], dfg).out_port(0)
Expand Down

0 comments on commit 3dbec3c

Please sign in to comment.