File tree Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ The application is configurable via environment variables.
117
117
- **Example:**
118
118
```json
119
119
{
120
- "cls" : " my_package.filters. OrganizationFilter" ,
120
+ "cls" : " my_package.filters: OrganizationFilter" ,
121
121
"args" : [" org1" ],
122
122
"kwargs" : {
123
123
"field_name" : " properties.organization"
Original file line number Diff line number Diff line change @@ -23,7 +23,8 @@ class ClassInput(BaseModel):
23
23
24
24
def __call__ (self ):
25
25
"""Dynamically load a class and instantiate it with args & kwargs."""
26
- module_path , class_name = self .cls .rsplit ("." , 1 )
26
+ assert self .cls .count (":" )
27
+ module_path , class_name = self .cls .rsplit (":" , 1 )
27
28
module = importlib .import_module (module_path )
28
29
cls = getattr (module , class_name )
29
30
return cls (* self .args , ** self .kwargs )
Original file line number Diff line number Diff line change @@ -132,7 +132,7 @@ def _build_client(
132
132
app = app_factory (
133
133
upstream_url = src_api_server ,
134
134
items_filter = {
135
- "cls" : "stac_auth_proxy.filters. Template" ,
135
+ "cls" : "stac_auth_proxy.filters: Template" ,
136
136
"args" : [template_expr .strip ()],
137
137
},
138
138
default_public = True ,
You can’t perform that action at this time.
0 commit comments