Skip to content

Commit

Permalink
change warning to yellow to make people happy
Browse files Browse the repository at this point in the history
  • Loading branch information
unalmis committed Jul 3, 2024
1 parent 2dc0cd8 commit 288c17b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions desc/io/hdf5_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,21 +127,21 @@ def read_obj(self, obj, where=None):
warnings.warn(
colored(
"\n"
f"The object attribute '{attr}' was not loaded from the input "
"file.\nThis is likely because the input file containing "
f"The object attribute '{attr}' was not loaded from the file.\n"
"This is likely because the file containing "
f"'{obj.__class__.__name__}' was created before '{attr}' "
f"became an attribute of objects of class '{obj.__class__}'.\n"
"The user may verify that a default value has been set.\n"
"This warning will persist until the input file is saved with "
"the new object.\n"
"This warning will persist until the file is saved with the "
"new object.\n"
"\n"
"Note to developers: Add 'def _set_up(self)' as a method to "
f"class '{obj.__class__}'\n"
"(or the superclass where this new attribute is assigned) that "
f"assigns a value to '{attr}'.\n"
"This method is called automatically when a file is loaded.\n"
"Recall that the testing suite will fail on warnings.",
"blue",
"yellow",
),
RuntimeWarning,
)
Expand Down

0 comments on commit 288c17b

Please sign in to comment.