Skip to content

Commit

Permalink
Fix broken strings
Browse files Browse the repository at this point in the history
  • Loading branch information
Armavica committed Jul 12, 2024
1 parent 0fa8089 commit f75434f
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion pytensor/compile/function/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -1067,7 +1067,7 @@ def restore_defaults():
container = property(
lambda self: self._container,
None, # this property itself is not settable
doc=("dictionary-like access to the containers associated with " "Variables"),
doc=("dictionary-like access to the containers associated with Variables"),
)

def free(self):
Expand Down
2 changes: 1 addition & 1 deletion pytensor/gradient.py
Original file line number Diff line number Diff line change
Expand Up @@ -1328,7 +1328,7 @@ def try_to_copy_if_needed(var):
elif connected and not actually_connected:
msg = f"{node.op}.grad returned DisconnectedType for input {i}."
if hasattr(node.op, "connection_pattern"):
msg += " Its connection_pattern method does not" " allow this."
msg += " Its connection_pattern method does not allow this."
raise TypeError(msg)
else:
msg += (
Expand Down
2 changes: 1 addition & 1 deletion pytensor/misc/check_blas.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def test():
action="store_true",
dest="quiet",
default=False,
help="If true, do not print the comparison table and config " "options",
help="If true, do not print the comparison table and config options",
)
parser.add_option(
"--print_only",
Expand Down
2 changes: 1 addition & 1 deletion pytensor/misc/elemwise_openmp_speedup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
console_encoding = getpreferredencoding()

parser = OptionParser(
usage="%prog <options>\n Compute time for" " fast and slow elemwise operations"
usage="%prog <options>\n Compute time for fast and slow elemwise operations"
)
parser.add_option(
"-N",
Expand Down
2 changes: 1 addition & 1 deletion pytensor/misc/elemwise_time_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@


parser = OptionParser(
usage="%prog <options>\n Compute time for" " fast and slow elemwise operations"
usage="%prog <options>\n Compute time for fast and slow elemwise operations"
)
parser.add_option(
"-N",
Expand Down
2 changes: 1 addition & 1 deletion pytensor/misc/pkl_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@


__docformat__ = "restructuredtext en"
__authors__ = "Pascal Lamblin " "PyMC Developers " "PyTensor Developers "
__authors__ = "Pascal Lamblin PyMC Developers PyTensor Developers "
__copyright__ = "Copyright 2013, Universite de Montreal"
__license__ = "3-clause BSD"

Expand Down
4 changes: 1 addition & 3 deletions pytensor/tensor/elemwise.py
Original file line number Diff line number Diff line change
Expand Up @@ -1563,9 +1563,7 @@ def _c_all(self, node, name, inames, onames, sub):
elif identity is None:
raise TypeError(f"The {self.scalar_op} does not define an identity.")

task0_decl = (
f"{adtype}& {aname}_i = *{aname}_iter;\n" f"{aname}_i = {identity};"
)
task0_decl = f"{adtype}& {aname}_i = *{aname}_iter;\n{aname}_i = {identity};"

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

Expand Down
2 changes: 1 addition & 1 deletion pytensor/tensor/shape.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ def grad(self, inp, grads):
op=self,
x_pos=0,
x=inp[0],
comment=("No gradient for the shape of a matrix " "is implemented."),
comment="No gradient for the shape of a matrix is implemented.",
)
]

Expand Down
2 changes: 1 addition & 1 deletion tests/sparse/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ def f(spdata):
iconv.append(conv_none)
output = op(*[as_sparse_or_tensor_variable(p) for p in pt])
if isinstance(output, list | tuple):
raise NotImplementedError("verify_grad can't deal with " "multiple outputs")
raise NotImplementedError("verify_grad can't deal with multiple outputs")
if _is_sparse_variable(output):
oconv = DenseFromSparse(structured=structured)
else:
Expand Down
2 changes: 1 addition & 1 deletion tests/tensor/test_math.py
Original file line number Diff line number Diff line change
Expand Up @@ -2535,7 +2535,7 @@ def numpy_i_scalar(dtype):
# a float32 may result in a complex64. As
# of 1.9.2. this is still the case so it is
# probably by design
pytest.skip("Known issue with" "numpy see #761")
pytest.skip("Known issue with numpy see #761")
# In any other situation: something wrong is
# going on!
raise AssertionError()
Expand Down

0 comments on commit f75434f

Please sign in to comment.