Skip to content

Commit a85cbb3

Browse files
alexfiklinducer
authored andcommitted
container: fix warning for cls_has_array_context_attr
1 parent c658c13 commit a85cbb3

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

arraycontext/container/arithmetic.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -266,20 +266,20 @@ def wrap(cls: Any) -> Any:
266266
if cls_has_array_context_attr is None:
267267
if hasattr(cls, "array_context"):
268268
cls_has_array_context_attr = _FailSafe
269-
warn(f"{cls} has an .array_context attribute, but it does not "
270-
"set _cls_has_array_context_attr to True when calling "
271-
"with_container_arithmetic. This is being interpreted "
272-
"as .array_context being permitted to fail. Tolerating "
269+
warn(f"{cls} has an 'array_context' attribute, but it does not "
270+
"set '_cls_has_array_context_attr' to 'True' when calling "
271+
"'with_container_arithmetic'. This is being interpreted "
272+
"as 'array_context' being permitted to fail. Tolerating "
273273
"these failures comes at a substantial cost. It is "
274274
"deprecated and will stop working in 2023. "
275-
"Having a working .array_context attribute is desirable "
275+
"Having a working 'array_context' attribute is desirable "
276276
"to enable arithmetic with other array types supported "
277-
"by the array context."
278-
f"If {cls}.array_context will not fail, pass "
279-
"_cls_has_array_context_attr=True. "
277+
"by the array context. "
278+
f"If '{cls.__name__}.array_context' will not fail, pass "
279+
"'_cls_has_array_context_attr=True'. "
280280
"If you do not want container arithmetic to make "
281281
"use of the array context, set "
282-
"_cls_has_array_context_attr=False.",
282+
"'_cls_has_array_context_attr=False'.",
283283
stacklevel=2)
284284

285285
if bcast_actx_array_type is None:

0 commit comments

Comments
 (0)