Oh huh... ```"write_files" of "RuleRunner" has inc...
# development
b
Oh huh...
Copy code
"write_files" of "RuleRunner" has incompatible type "Dict[str, str]"; expected
"Mapping[Union[str, PurePath], Union[str, bytes]]"  [arg-type]
https://github.com/python/mypy/issues/6001
This is because Mapping is invariant in its key type. See mypy.readthedocs.io/en/latest/common_issues.html#invariance-vs-covariance.
Which has turned into a PR to `typing`: https://github.com/python/typing/issues/445 So TL;DR: Don't use
Union
in a `Mapping`'s key type.
1