Repository navigation
Add stubs for tabulate - #2384
Conversation
|
Can you get permission from the author of this library, as required by typeshed's guidelines? |
srittau
left a comment
There was a problem hiding this comment.
Thank you for your contribution. Since upstream did not respond yet, we will include the stub in typeshed.
A few notes below.
|
|
||
|
|
||
| def tabulate( | ||
| tabular_data: Sequence[Sequence[Any]], |
There was a problem hiding this comment.
This should be at least Iterable[Iterable[Any]]. It seems that tabulate supports a few more formats, so maybe Any would be better for the moment.
|
|
||
| def tabulate( | ||
| tabular_data: Sequence[Sequence[Any]], | ||
| headers: Sequence[str] = ..., |
There was a problem hiding this comment.
headers can also be a str or a Dict[str, str].
| # Stub for tabulate: https://bitbucket.org/astanin/python-tabulate | ||
| from typing import Any, Sequence | ||
|
|
||
|
|
There was a problem hiding this comment.
Since the stub is incomplete, please add the following at module level:
def __getattr__(name: str) -> Any: ...
gaul
left a comment
There was a problem hiding this comment.
Sorry for my delayed response; I was traveling for a few weeks.
| # Stub for tabulate: https://bitbucket.org/astanin/python-tabulate | ||
| from typing import Any, Sequence | ||
|
|
||
|
|
|
|
||
|
|
||
| def tabulate( | ||
| tabular_data: Sequence[Sequence[Any]], |
|
|
||
| def tabulate( | ||
| tabular_data: Sequence[Sequence[Any]], | ||
| headers: Sequence[str] = ..., |
|
Thank you. Just for future reference: We prefer people not to force push, since this makes it harder for us to review changes. We squash commits anyway when we merge changes. |
No description provided.