Skip to content

Commit

Permalink
Apply formatter
Browse files Browse the repository at this point in the history
Signed-off-by: Tsuyoshi Hombashi <[email protected]>
  • Loading branch information
thombashi committed Jan 1, 2025
1 parent b4a789a commit d0e809a
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 5 deletions.
3 changes: 2 additions & 1 deletion pytablewriter/writer/_table_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,8 @@ def __init__(self, **kwargs: Any) -> None:

self.iteration_length: int = kwargs.get("iteration_length", -1)
self.write_callback = kwargs.get(
"write_callback", lambda _iter_count, _iter_length: None # defaults to NOP callback
"write_callback",
lambda _iter_count, _iter_length: None, # defaults to NOP callback
)
self._iter_count: Optional[int] = None

Expand Down
2 changes: 1 addition & 1 deletion pytablewriter/writer/text/_asciidoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def _write_value_row(
row,
[
self.__modify_row_element(row, col_idx, value, value_dp)
for col_idx, (value, value_dp), in enumerate(zip(values, value_dp_list))
for col_idx, (value, value_dp) in enumerate(zip(values, value_dp_list))
],
)

Expand Down
2 changes: 1 addition & 1 deletion pytablewriter/writer/text/_mediawiki.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def _write_value_row(
row,
[
self.__modify_table_element(value, value_dp)
for value, value_dp, in zip(values, value_dp_list)
for value, value_dp in zip(values, value_dp_list)
],
)

Expand Down
17 changes: 15 additions & 2 deletions test/writer/binary/test_pandas_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,13 @@ class Test_PandasDataFramePickleWriter_dump:
def test_normal_single_table(self, tmpdir):
test_filepath = str(tmpdir.join("test.pkl"))
data = TableData(
"tablename", ["ha", "hb", "hc"], [[1.0, 2.0, 3.0], [11.0, 12.0, 13.0], [1.0, 2.0, 3.0]]
"tablename",
["ha", "hb", "hc"],
[
[1.0, 2.0, 3.0],
[11.0, 12.0, 13.0],
[1.0, 2.0, 3.0],
],
)

writer = ptw.PandasDataFramePickleWriter()
Expand All @@ -130,7 +136,14 @@ def test_normal_single_table(self, tmpdir):

def test_normal_multi_table(self, tmpdir):
test_filepath = str(tmpdir.join("test.pkl"))
data = TableData("first", ["ha1", "hb1", "hc1"], [[1.0, 2.0, 3.0], [11.0, 12.0, 13.0]])
data = TableData(
"first",
["ha1", "hb1", "hc1"],
[
[1.0, 2.0, 3.0],
[11.0, 12.0, 13.0],
],
)
writer = ptw.PandasDataFramePickleWriter()

writer.from_tabledata(data)
Expand Down

0 comments on commit d0e809a

Please sign in to comment.