Skip to content

Commit 09078f9

Browse files
committed
Black reformat
1 parent 00cedb8 commit 09078f9

File tree

6 files changed

+7
-22
lines changed

6 files changed

+7
-22
lines changed

pytensor/configparser.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,7 @@ def get_config_hash(self):
125125
)
126126
return hash_from_code(
127127
"\n".join(
128-
[
129-
f"{cv.name} = {cv.__get__(self, self.__class__)}"
130-
for cv in all_opts
131-
]
128+
[f"{cv.name} = {cv.__get__(self, self.__class__)}" for cv in all_opts]
132129
)
133130
)
134131

pytensor/graph/utils.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,7 @@ def __str__(self):
245245
def __str__(self):
246246
return "{}{{{}}}".format(
247247
self.__class__.__name__,
248-
", ".join(
249-
f"{p}={getattr(self, p)!r}" for p in props
250-
),
248+
", ".join(f"{p}={getattr(self, p)!r}" for p in props),
251249
)
252250

253251
dct["__str__"] = __str__

pytensor/link/c/params_type.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -264,10 +264,7 @@ def __init__(self, params_type, **kwargs):
264264

265265
def __repr__(self):
266266
return "Params(%s)" % ", ".join(
267-
[
268-
(f"{k}:{type(self[k]).__name__}:{self[k]}")
269-
for k in sorted(self.keys())
270-
]
267+
[(f"{k}:{type(self[k]).__name__}:{self[k]}") for k in sorted(self.keys())]
271268
)
272269

273270
def __getattr__(self, key):
@@ -430,10 +427,7 @@ def __getattr__(self, key):
430427

431428
def __repr__(self):
432429
return "ParamsType<%s>" % ", ".join(
433-
[
434-
(f"{self.fields[i]}:{self.types[i]}")
435-
for i in range(self.length)
436-
]
430+
[(f"{self.fields[i]}:{self.types[i]}") for i in range(self.length)]
437431
)
438432

439433
def __eq__(self, other):

pytensor/link/c/type.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -489,8 +489,7 @@ def __repr__(self):
489489
type(self).__name__,
490490
self.ctype,
491491
", ".join(
492-
f"{k}{names_to_aliases[k]}:{self[k]}"
493-
for k in sorted(self.keys())
492+
f"{k}{names_to_aliases[k]}:{self[k]}" for k in sorted(self.keys())
494493
),
495494
)
496495

pytensor/tensor/basic.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2179,9 +2179,7 @@ def __str__(self):
21792179
else:
21802180
return "{}{{{}}}".format(
21812181
self.__class__.__name__,
2182-
", ".join(
2183-
f"{p}={getattr(self, p)!r}" for p in self.__props__
2184-
),
2182+
", ".join(f"{p}={getattr(self, p)!r}" for p in self.__props__),
21852183
)
21862184

21872185
def __setstate__(self, d):

pytensor/tensor/blas.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2363,8 +2363,7 @@ def contiguous(var, ndim):
23632363
),
23642364
"(%s)"
23652365
% " || ".join(
2366-
f"{strides}[{i}] == type_size"
2367-
for i in range(1, ndim)
2366+
f"{strides}[{i}] == type_size" for i in range(1, ndim)
23682367
),
23692368
]
23702369
)

0 commit comments

Comments
 (0)