-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Add stubs for tabulate #2384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add stubs for tabulate #2384
Conversation
Can you get permission from the author of this library, as required by typeshed's guidelines? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution. Since upstream did not respond yet, we will include the stub in typeshed.
A few notes below.
third_party/2and3/tabulate.pyi
Outdated
|
||
|
||
def tabulate( | ||
tabular_data: Sequence[Sequence[Any]], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
third_party/2and3/tabulate.pyi
Outdated
|
||
def tabulate( | ||
tabular_data: Sequence[Sequence[Any]], | ||
headers: Sequence[str] = ..., |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
headers
can also be a str
or a Dict[str, str]
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
# Stub for tabulate: https://bitbucket.org/astanin/python-tabulate | ||
from typing import Any, Sequence | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the stub is incomplete, please add the following at module level:
def __getattr__(name: str) -> Any: ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
third_party/2and3/tabulate.pyi
Outdated
|
||
|
||
def tabulate( | ||
tabular_data: Sequence[Sequence[Any]], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
third_party/2and3/tabulate.pyi
Outdated
|
||
def tabulate( | ||
tabular_data: Sequence[Sequence[Any]], | ||
headers: Sequence[str] = ..., |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
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.