Assuming we don't completely overhaul the way beat messages are handled; there are several classes that transform the argument for proper logging. The arguments are transformed in the constructor which in most cases is sufficient but should the tester ever want to manipulate the attribute after the object has been instantiated the logging will not match.
example:
class MakeNote:
def describe(self: SelfMakeNote) -> str:
return f"Make a note under {represent_prop(self.key)}."
@beat("{} jots something down under {key_to_log}.")
def perform_as(self: SelfMakeNote, the_actor: Actor) -> None:
...
def __init__(
self: SelfMakeNote,
question: T_Q,
key: Optional[str] = None,
) -> None:
self.question = question
self.key = key
self.key_to_log = represent_prop(key)
These attributes should be turned into a more dynamic property.
Assuming we don't completely overhaul the way
beat
messages are handled; there are several classes that transform the argument for proper logging. The arguments are transformed in the constructor which in most cases is sufficient but should the tester ever want to manipulate the attribute after the object has been instantiated the logging will not match.example:
These attributes should be turned into a more dynamic property.