You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pyyaml does not implicitly swap out the C-accelerated types for the base ones because there are observable differences between the two (yaml/pyyaml#436).
However for packages only expected relatively simple inputs, a common pattern is to try and use the libYAML types if available and fallback:
error: Incompatible import of "Loader" (imported name has type "Type[Loader]", local name has type "Type[CLoader]")
While this is technically correct, it's not exactly convenient. Is there a local workaround aside from type: ignore, or a way to fix this in the stubs?
Tested with:
CPython 10.4
mypy 0.950
types_PyYAML 6.0.7
The text was updated successfully, but these errors were encountered:
pyyaml does not implicitly swap out the C-accelerated types for the base ones because there are observable differences between the two (yaml/pyyaml#436).
However for packages only expected relatively simple inputs, a common pattern is to try and use the libYAML types if available and fallback:
However running this through mypy yields:
While this is technically correct, it's not exactly convenient. Is there a local workaround aside from
type: ignore
, or a way to fix this in the stubs?Tested with:
The text was updated successfully, but these errors were encountered: