Skip to content

Commit f75434f

Browse files
committed
Fix broken strings
1 parent 0fa8089 commit f75434f

File tree

10 files changed

+10
-12
lines changed

10 files changed

+10
-12
lines changed

pytensor/compile/function/types.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1067,7 +1067,7 @@ def restore_defaults():
10671067
container = property(
10681068
lambda self: self._container,
10691069
None, # this property itself is not settable
1070-
doc=("dictionary-like access to the containers associated with " "Variables"),
1070+
doc=("dictionary-like access to the containers associated with Variables"),
10711071
)
10721072

10731073
def free(self):

pytensor/gradient.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1328,7 +1328,7 @@ def try_to_copy_if_needed(var):
13281328
elif connected and not actually_connected:
13291329
msg = f"{node.op}.grad returned DisconnectedType for input {i}."
13301330
if hasattr(node.op, "connection_pattern"):
1331-
msg += " Its connection_pattern method does not" " allow this."
1331+
msg += " Its connection_pattern method does not allow this."
13321332
raise TypeError(msg)
13331333
else:
13341334
msg += (

pytensor/misc/check_blas.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def test():
111111
action="store_true",
112112
dest="quiet",
113113
default=False,
114-
help="If true, do not print the comparison table and config " "options",
114+
help="If true, do not print the comparison table and config options",
115115
)
116116
parser.add_option(
117117
"--print_only",

pytensor/misc/elemwise_openmp_speedup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
console_encoding = getpreferredencoding()
1212

1313
parser = OptionParser(
14-
usage="%prog <options>\n Compute time for" " fast and slow elemwise operations"
14+
usage="%prog <options>\n Compute time for fast and slow elemwise operations"
1515
)
1616
parser.add_option(
1717
"-N",

pytensor/misc/elemwise_time_test.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212

1313
parser = OptionParser(
14-
usage="%prog <options>\n Compute time for" " fast and slow elemwise operations"
14+
usage="%prog <options>\n Compute time for fast and slow elemwise operations"
1515
)
1616
parser.add_option(
1717
"-N",

pytensor/misc/pkl_utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313

1414
__docformat__ = "restructuredtext en"
15-
__authors__ = "Pascal Lamblin " "PyMC Developers " "PyTensor Developers "
15+
__authors__ = "Pascal Lamblin PyMC Developers PyTensor Developers "
1616
__copyright__ = "Copyright 2013, Universite de Montreal"
1717
__license__ = "3-clause BSD"
1818

pytensor/tensor/elemwise.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -1563,9 +1563,7 @@ def _c_all(self, node, name, inames, onames, sub):
15631563
elif identity is None:
15641564
raise TypeError(f"The {self.scalar_op} does not define an identity.")
15651565

1566-
task0_decl = (
1567-
f"{adtype}& {aname}_i = *{aname}_iter;\n" f"{aname}_i = {identity};"
1568-
)
1566+
task0_decl = f"{adtype}& {aname}_i = *{aname}_iter;\n{aname}_i = {identity};"
15691567

15701568
task1_decl = f"{idtype}& {inames[0]}_i = *{inames[0]}_iter;\n"
15711569

pytensor/tensor/shape.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ def grad(self, inp, grads):
316316
op=self,
317317
x_pos=0,
318318
x=inp[0],
319-
comment=("No gradient for the shape of a matrix " "is implemented."),
319+
comment="No gradient for the shape of a matrix is implemented.",
320320
)
321321
]
322322

tests/sparse/test_basic.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ def f(spdata):
328328
iconv.append(conv_none)
329329
output = op(*[as_sparse_or_tensor_variable(p) for p in pt])
330330
if isinstance(output, list | tuple):
331-
raise NotImplementedError("verify_grad can't deal with " "multiple outputs")
331+
raise NotImplementedError("verify_grad can't deal with multiple outputs")
332332
if _is_sparse_variable(output):
333333
oconv = DenseFromSparse(structured=structured)
334334
else:

tests/tensor/test_math.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2535,7 +2535,7 @@ def numpy_i_scalar(dtype):
25352535
# a float32 may result in a complex64. As
25362536
# of 1.9.2. this is still the case so it is
25372537
# probably by design
2538-
pytest.skip("Known issue with" "numpy see #761")
2538+
pytest.skip("Known issue with numpy see #761")
25392539
# In any other situation: something wrong is
25402540
# going on!
25412541
raise AssertionError()

0 commit comments

Comments
 (0)