Skip to content

Commit 151da53

Browse files
brandonwillardtwiecki
authored andcommitted
Update pre-commit
1 parent a30f815 commit 151da53

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ exclude: |
77
)$
88
repos:
99
- repo: https://github.com/pre-commit/pre-commit-hooks
10-
rev: v4.3.0
10+
rev: v4.4.0
1111
hooks:
1212
- id: debug-statements
1313
exclude: |
@@ -25,9 +25,10 @@ repos:
2525
- id: black
2626
language_version: python3
2727
- repo: https://github.com/pycqa/flake8
28-
rev: 5.0.4
28+
rev: 6.0.0
2929
hooks:
3030
- id: flake8
31+
language_version: python39
3132
- repo: https://github.com/pycqa/isort
3233
rev: 5.10.1
3334
hooks:

pytensor/scan/op.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
import numpy as np
5555

5656
import pytensor
57+
import pytensor.link.utils as link_utils
5758
from pytensor import tensor as at
5859
from pytensor.compile.builders import construct_nominal_fgraph, infer_shape
5960
from pytensor.compile.function.pfunc import pfunc
@@ -75,7 +76,6 @@
7576
from pytensor.graph.utils import InconsistencyError, MissingInputError
7677
from pytensor.link.c.basic import CLinker
7778
from pytensor.link.c.exceptions import MissingGXX
78-
from pytensor.link.utils import raise_with_op
7979
from pytensor.printing import op_debug_information
8080
from pytensor.scan.utils import ScanProfileStats, Validator, forced_replace, safe_new
8181
from pytensor.tensor.basic import as_tensor_variable
@@ -1627,7 +1627,7 @@ def p(node, inputs, outputs):
16271627
if hasattr(self.fn.vm, "position_of_error") and hasattr(
16281628
self.fn.vm, "thunks"
16291629
):
1630-
raise_with_op(
1630+
link_utils.raise_with_op(
16311631
self.fn.maker.fgraph,
16321632
self.fn.vm.nodes[self.fn.vm.position_of_error],
16331633
self.fn.vm.thunks[self.fn.vm.position_of_error],
@@ -1930,7 +1930,7 @@ def perform(self, node, inputs, output_storage, params=None):
19301930
# done by raise_with_op is not implemented in C.
19311931
if hasattr(vm, "thunks"):
19321932
# For the CVM
1933-
raise_with_op(
1933+
link_utils.raise_with_op(
19341934
self.fn.maker.fgraph,
19351935
vm.nodes[vm.position_of_error],
19361936
vm.thunks[vm.position_of_error],
@@ -1940,7 +1940,7 @@ def perform(self, node, inputs, output_storage, params=None):
19401940
# We don't have access from python to all the
19411941
# temps values So for now, we just don't print
19421942
# the extra shapes/strides info
1943-
raise_with_op(
1943+
link_utils.raise_with_op(
19441944
self.fn.maker.fgraph, vm.nodes[vm.position_of_error]
19451945
)
19461946
else:

0 commit comments

Comments
 (0)