Skip to content

Commit 6d28a48

Browse files
committed
Correct type annotations in compile_as_first and compile_as_array helper functions to align with InputType and OutputType.
Ref: #64
1 parent 73c2274 commit 6d28a48

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

fhirpathpy/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def compile_as_array(
137137
) -> Callable[[InputType, ContextType], OutputType]:
138138
path_fn = compile(expression)
139139

140-
def fn(resource: input_type, context: ContextType = None) -> list[output_type]:
140+
def fn(resource: InputType, context: ContextType = None) -> OutputType:
141141
return _format_result(
142142
path_fn(_validate_and_convert_resource(resource, input_type), context), output_type, False
143143
)
@@ -150,7 +150,7 @@ def compile_as_first(
150150
) -> Callable[[InputType, ContextType], OutputType]:
151151
path_fn = compile(expression)
152152

153-
def fn(resource: input_type, context: ContextType = None) -> output_type:
153+
def fn(resource: InputType, context: ContextType = None) -> OutputType:
154154
return _format_result(
155155
path_fn(_validate_and_convert_resource(resource, input_type), context), output_type, True
156156
)

0 commit comments

Comments
 (0)