Skip to content

Commit 082081a

Browse files
ArmavicaricardoV94
authored andcommitted
Remove noqas that are already taken care of
1 parent 06c5acd commit 082081a

File tree

9 files changed

+34
-34
lines changed

9 files changed

+34
-34
lines changed

pytensor/graph/destroyhandler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ def fast_inplace_check(fgraph, inputs):
249249
return inputs
250250

251251

252-
class DestroyHandler(Bookkeeper): # noqa
252+
class DestroyHandler(Bookkeeper):
253253
"""
254254
The DestroyHandler class detects when a graph is impossible to evaluate
255255
because of aliasing and destructive operations.

pytensor/link/c/basic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1718,7 +1718,7 @@ class _CThunk:
17181718

17191719
def __init__(self, cthunk, init_tasks, tasks, error_storage, module):
17201720
# Lazy import to avoid compilation when importing pytensor.
1721-
from pytensor.link.c.cutils import run_cthunk # noqa
1721+
from pytensor.link.c.cutils import run_cthunk
17221722

17231723
self.run_cthunk = run_cthunk
17241724
self.cthunk = cthunk

pytensor/link/c/lazylinker_c.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
def try_import():
2424
global lazylinker_ext
2525
sys.path[0:0] = [config.compiledir]
26-
import lazylinker_ext # noqa
26+
import lazylinker_ext
2727

2828
del sys.path[0]
2929

@@ -167,4 +167,4 @@ def try_reload():
167167
from lazylinker_ext.lazylinker_ext import CLazyLinker, get_version # noqa
168168
from lazylinker_ext.lazylinker_ext import * # noqa
169169

170-
assert force_compile or (version == get_version()) # noqa
170+
assert force_compile or (version == get_version())

pytensor/scan/op.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3395,7 +3395,7 @@ def profile_printer(
33953395
)
33963396

33973397

3398-
@op_debug_information.register(Scan) # noqa
3398+
@op_debug_information.register(Scan)
33993399
def _op_debug_information_Scan(op: Scan, node: Apply):
34003400
from collections.abc import Sequence
34013401

pytensor/scan/scan_perform_ext.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
- update the version value in this file and in `scan_perform.pyx`
66
77
"""
8-
from pytensor.scan.scan_perform import get_version, perform # noqa: F401, E402
8+
from pytensor.scan.scan_perform import get_version, perform # noqa: F401
99

1010

1111
version = 0.326 # must match constant returned in function get_version()

pytensor/sparse/sandbox/sp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ def evaluate(inshp, kshp, strides=(1, 1), nkern=1, mode="valid", ws=True):
158158
for ox in np.arange(lbound[1], ubound[1], dx, dtype=int):
159159
# kern[l] is filter value to apply at (oj,oi)
160160
# for (iy,ix)
161-
l = 0 # noqa: E741
161+
l = 0
162162

163163
# ... ITERATE OVER INPUT UNITS IN RECEPTIVE FIELD
164164
for ky in oy + np.arange(kshp[0], dtype=int):

pytensor/tensor/__init__.py

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -99,35 +99,38 @@ def _get_vector_length_Constant(op: Union[Op, Variable], var: Constant) -> int:
9999
return len(var.data)
100100

101101

102-
import pytensor.tensor.exceptions # noqa
103-
from pytensor.gradient import grad, hessian, jacobian # noqa
102+
import pytensor.tensor.exceptions
103+
import pytensor.tensor.rewriting
104+
from pytensor.gradient import grad, hessian, jacobian
104105

105106
# adds shared-variable constructors
106-
from pytensor.tensor import sharedvar # noqa
107-
from pytensor.tensor import ( # noqa
107+
from pytensor.tensor import (
108108
blas,
109109
blas_c,
110110
blas_scipy,
111+
sharedvar,
111112
xlogx,
112113
)
113-
import pytensor.tensor.rewriting
114114

115115

116116
# isort: off
117-
from pytensor.tensor import linalg # noqa
117+
from pytensor.tensor import linalg
118118
from pytensor.tensor import special
119119

120120
# For backward compatibility
121-
from pytensor.tensor import nlinalg # noqa
122-
from pytensor.tensor import slinalg # noqa
121+
from pytensor.tensor import nlinalg
122+
from pytensor.tensor import slinalg
123123

124124
# isort: on
125-
from pytensor.tensor.basic import * # noqa
126-
from pytensor.tensor.blas import batched_dot, batched_tensordot # noqa
127-
from pytensor.tensor.extra_ops import *
128-
125+
# Allow accessing numpy constants from pytensor.tensor
126+
from numpy import e, euler_gamma, inf, infty, nan, newaxis, pi
129127

130-
from pytensor.tensor.shape import ( # noqa
128+
from pytensor.tensor.basic import *
129+
from pytensor.tensor.blas import batched_dot, batched_tensordot
130+
from pytensor.tensor.extra_ops import *
131+
from pytensor.tensor.io import *
132+
from pytensor.tensor.math import *
133+
from pytensor.tensor.shape import (
131134
reshape,
132135
shape,
133136
shape_padaxis,
@@ -137,21 +140,18 @@ def _get_vector_length_Constant(op: Union[Op, Variable], var: Constant) -> int:
137140
specify_shape,
138141
)
139142

140-
141-
from pytensor.tensor.io import * # noqa
142-
from pytensor.tensor.math import * # noqa
143-
144143
# We import as `_shared` instead of `shared` to avoid confusion between
145144
# `pytensor.shared` and `tensor._shared`.
146-
from pytensor.tensor.sort import argsort, argtopk, sort, topk, topk_and_argtopk # noqa
147-
from pytensor.tensor.subtensor import * # noqa
148-
from pytensor.tensor.type import * # noqa
149-
from pytensor.tensor.type_other import * # noqa
150-
from pytensor.tensor.variable import TensorConstant, TensorVariable # noqa
151-
from pytensor.tensor.functional import vectorize # noqa
145+
from pytensor.tensor.sort import argsort, argtopk, sort, topk, topk_and_argtopk
146+
from pytensor.tensor.subtensor import *
147+
from pytensor.tensor.type import *
148+
from pytensor.tensor.type_other import *
149+
from pytensor.tensor.variable import TensorConstant, TensorVariable
152150

153-
# Allow accessing numpy constants from pytensor.tensor
154-
from numpy import e, euler_gamma, inf, infty, nan, newaxis, pi # noqa
151+
152+
# isort: off
153+
from pytensor.tensor.functional import vectorize
154+
# isort: on
155155

156156

157157
__all__ = ["random"] # noqa: F405

pytensor/tensor/blas.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383

8484

8585
try:
86-
import numpy.__config__ # noqa
86+
import numpy.__config__
8787
except ImportError:
8888
pass
8989

pytensor/tensor/rewriting/blas.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363

6464

6565
try:
66-
import numpy.__config__ # noqa
66+
import numpy.__config__
6767
except ImportError:
6868
pass
6969

0 commit comments

Comments
 (0)