-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Milestone
Description
The "transformed_result" property of AbstractResultExtractor has inconsistent types depending on the subclass:
- In "AbstractHostResultExtractor" it is Dict[str, NutsResult]
- In "AbstractHostDestResultExtractor" it is Dict[str, Dict[str, NutsResult]]
To me this is an issue due to the following reasons:
- The transformed result is a public interface property of the class, at least intended to be used in the per-test created "Extractor" subclass. This could pose a source of confusion
- Static type checking is undermined or at least made difficult with these two options.
Possible Solutions to this:
- Redesign the way the result is passed to the subclasses. This should take into account issue Don't access private context when test data is needed in the Extractor #13 too, to provide a solution matching for both cases. (preferred solution by the author)
- Extend the annotations to include both values in a type union, but this will not solve problem 2.