Skip to content

Commit a7b86c7

Browse files
Update daprdocs/content/en/python-sdk-docs/python-actor.md
Co-authored-by: Elena Kolevska <[email protected]> Signed-off-by: Lorenzo Curcio <[email protected]>
1 parent df85211 commit a7b86c7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

daprdocs/content/en/python-sdk-docs/python-actor.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,11 @@ The `__init__`, `register_timer`, `unregister_timer`, `register_reminder`, `unre
108108
def __init__(self, ctx, actor_id):
109109
super().__init__(ctx, actor_id)
110110
```
111-
*Mock actors work fine with this, but if you have added any extra logic into \_\_init\_\_, it will be overwritten. It is worth noting that the correct way to apply logic on initialization is via \_on\_activate (which can also be safely used with mock actors) instead of \_\_init\_\_.*
111+
*Mock actors work fine with this, but if you have added any extra logic into `__init__`, it will be overwritten. It is worth noting that the correct way to apply logic on initialization is via `_on_activate` (which can also be safely used with mock actors) instead of `__init__`.*
112112

113-
The actor _runtime_ctx variable is set to None. Obviously all the normal actor methods have been overwritten such as to not call it, but if your code itself interacts directly with _runtime_ctx, it will likely break.
113+
The actor `_runtime_ctx` variable is set to None. All the normal actor methods have been overwritten such as to not call it, but if your code itself interacts directly with `_runtime_ctx`, it will likely break.
114114

115-
The actor _state_manager is overwritten with an instance of MockStateManager. This has all the same methods and functionality of the base ActorStateManager, except for using the various _mock variables for storing data instead of the _runtime_ctx. If your code implements its own custom state manager it will be overwritten and your code will likely break.
115+
The actor _state_manager is overwritten with an instance of `MockStateManager`. This has all the same methods and functionality of the base `ActorStateManager`, except for using the various `_mock` variables for storing data instead of the `_runtime_ctx`. If your code implements its own custom state manager it will be overwritten and your code will likely break.
116116

117117
### Type Hinting
118118

0 commit comments

Comments
 (0)