GitHub user yangdanny97 added a comment to the discussion: A new home for pyarrow-stubs?
> do we really want such granularity? It will most certainly mean more > maintenance This depends on what the overloads are for. If your overloads have [different return types based on the type of a parameter](https://typing.python.org/en/latest/guides/writing_stubs.html#overloads-and-flags) then it's pretty useful. Getting rid of the overloads for a single definition means that the return type would be a large union. This means that the typechecker isn't able to infer a single type (requiring the user to write additional code to cast or refine the type), and the IDE will not be able to provide as good autocompletion on the function's return value. If your overloads are like "this function has 3 arguments but you must provide exactly 2 of them or else it will crash" but the return types are the same, then the impact of removing the overloads is less (it would mean typecheckers catch fewer bugs, but at least it doesn't cause friction for users). GitHub link: https://github.com/apache/arrow/discussions/45919#discussioncomment-14290568 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected]
