Skip to content

Commit

Permalink
Cast task config type, for mypy 1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
andy-slac authored and TallJimbo committed Apr 10, 2023
1 parent 86125dc commit d6cbeb1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/lsst/pipe/base/tests/no_dimensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ def run(self, input: Union[TaskMetadata, Dict[str, int]]) -> Struct: # type: ig
"""
self.log.info("Run method given data of type: %s", get_full_type_name(input))
output = input.copy()
output[self.config.key] = self.config.value
config = cast(NoDimensionsTestConfig, self.config)
output[config.key] = config.value

# Can change the return type via configuration.
if "TaskMetadata" in cast(NoDimensionsTestConfig, self.config).outputSC:
Expand Down

0 comments on commit d6cbeb1

Please sign in to comment.