Skip to content

Commit

Permalink
Update docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
thombashi committed Jul 26, 2020
1 parent 56869df commit 99c6cf6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
11 changes: 10 additions & 1 deletion pytablewriter/writer/_table_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,16 @@ class AbstractTableWriter(TableWriterInterface, metaclass=abc.ABCMeta):
:type: bool
:value: True
[Only for text format writers] If |True|, colorize text with |Style| for terminals.
[Only for text format writers] [experimental]
If |True|, colorize text outputs with |Style|.
.. py:attribute:: enable_ansi_escape
:type: bool
:value: True
[Only for text format writers]
If |True|, applies ANSI escape sequences to terminal's text outputs
with |Style|.
.. py:attribute:: write_callback
Expand Down
10 changes: 7 additions & 3 deletions pytablewriter/writer/text/_text_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,15 @@ def write_table(self, **kwargs) -> None:
def dump(self, output: Union[str, IO], close_after_write: bool = True, **kwargs) -> None:
"""Write data to the output with tabular format.
During the executing this method,
:py:attr:`~pytablewriter.writer._table_writer.AbstractTableWriter.enable_ansi_escape`
attribute will be temporarily set to |False|.
Args:
output (file descriptor or str):
file descriptor or path to the output file.
output:
The value must either an output stream or a path to an output file.
close_after_write (bool, optional):
close_after_write:
Close the output after write.
Defaults to |True|.
"""
Expand Down

0 comments on commit 99c6cf6

Please sign in to comment.