Literal type of engine argument incompatible with custom backends
See original GitHub issueWhat is your issue?
In the recent typing improvements the engine
argument for open_dataset
was changed from Str to a Literal of xarrays internal engines.
This will cause problems for all third party backend plugins.
We have several possibilities:
- I don’t know if there is a way to know installed backends at type checking time. Then we could add this support. (I doubt this is possible seeing how dynamic these imports are)
- Is it possible for these plugins to tell type checkers that their engine is valid, i.e. change the type signature of xarrays function? Then we should add a how-to in the docu.
- Else we should probably revert to using Str.
Any typing experts here that could help?
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
pandas/frame.py at main · pandas-dev/pandas - GitHub
error: Argument 3 to "nested_data_to_arrays" has incompatible. # type ... The type of the key-value pairs can be customized with the parameters.
Read more >The Comprehensive Guide to mypy - DEV Community
Mypy is a static type checker for Python. It acts as a linter, that allows you to write statically typed code, and verify...
Read more >Migrating to Apollo Server 4 - Apollo GraphQL Docs
In Apollo Server 4, the context function is a named argument passed into your web integration function (e.g., expressMiddleware or startStandaloneServer ).
Read more >JavaScript policy runtime error troubleshooting | Apigee Edge
Type error. The error type TypeError is thrown when: An operand or argument passed to a function is incompatible with the type expected...
Read more >Column Elements and Expressions
Return a literal clause, bound to a bind parameter. ... Unsupported backends will raise a subclass of DBAPIError when such an expression is...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
If you know how that works statically, I don’t see a way to do that. You can only get dynamic content from static types and not the other way around.
Ok, let’s keep this issue open for a bit in case someone still finds a solution. But we should go back to Str before releasing the next version.