Skip to content

Commit

Permalink
default value now get the dynamic default value if the static one is …
Browse files Browse the repository at this point in the history
…undefined.

Note that get_default_value() was deprecated anyway, and they advise to use .default_value instead. But this is the static value, meaning you'll get more undefined that what really is.
  • Loading branch information
ccossou committed Jul 21, 2023
1 parent 1536b88 commit bc19a7f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ctapipe/core/config_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def _trait_to_str(trait, help=True, indent_level=0):

trait_repr += f"{wrap_comment(h_msg, indent_level=indent_level)}\n"

trait_value = trait.get_default_value()
trait_value = trait.default()
# add quotes for strings
if isinstance(trait, traitlets.Unicode):
trait_value = f"'{trait_value}'"
Expand Down Expand Up @@ -170,7 +170,7 @@ def get_default_config(cls):
"""
Get list of all traits from that class.
This is intented to me used as a class methods for all included class a Tool might have. Since the method is
This is intented to be used as a class methods for all included class a Tool might have. Since the method is
always the same, for the sake of maintainability, We'll just use that function.
:param cls:
Expand Down

0 comments on commit bc19a7f

Please sign in to comment.