DslBase.__init__() typing does not accept dict unpacking, hence all Query subclasses.
|
def __init__(self, _expand__to_dot: Optional[bool] = None, **params: Any) -> None: |
For example, Term(**my_dict) will result in following mypy error:
error: Argument 1 to "Term" has incompatible type "**Dict[str, str]"; expected "Optional[bool]
This is due to _expand__to_dot, mypy assumes all params have unified type. Maybe just use **params: Any and pop _expand__to_dot from there?