1
1
from __future__ import annotations
2
2
3
- from lazy_object_proxy import Proxy as LazyObjectProxy
4
-
5
3
from crawlee ._utils .docs import docs_group
6
4
from crawlee .base_storage_client ._base_storage_client import BaseStorageClient
7
5
from crawlee .configuration import Configuration
@@ -93,8 +91,7 @@ def storage_client_was_set(self) -> bool:
93
91
@docs_group ('Functions' )
94
92
def get_configuration () -> Configuration :
95
93
"""Get the configuration."""
96
- proxy_config : Configuration = LazyObjectProxy (lambda : _service_locator .configuration )
97
- return proxy_config
94
+ return _service_locator .configuration
98
95
99
96
100
97
@docs_group ('Functions' )
@@ -116,8 +113,7 @@ def set_configuration(configuration: Configuration) -> None:
116
113
@docs_group ('Functions' )
117
114
def get_event_manager () -> EventManager :
118
115
"""Get the event manager."""
119
- proxy_event_manager : EventManager = LazyObjectProxy (lambda : _service_locator .event_manager )
120
- return proxy_event_manager
116
+ return _service_locator .event_manager
121
117
122
118
123
119
@docs_group ('Functions' )
@@ -139,8 +135,7 @@ def set_event_manager(event_manager: EventManager) -> None:
139
135
@docs_group ('Functions' )
140
136
def get_storage_client () -> BaseStorageClient :
141
137
"""Get the storage client."""
142
- proxy_storage_client : BaseStorageClient = LazyObjectProxy (lambda : _service_locator .storage_client )
143
- return proxy_storage_client
138
+ return _service_locator .storage_client
144
139
145
140
146
141
@docs_group ('Functions' )
0 commit comments