Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
  • Loading branch information
claudep and hugovk authored Sep 4, 2021
1 parent 7bc2cbf commit ccd5429
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/formats.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ is headers with the ``headers`` boolean parameter (defaults to ``True``)::

tablib.import_set(your_data_stream, format='csv', headers=False)

It is also possible to provide the ``skip_lines`` parameter to a number of
It is also possible to provide the ``skip_lines`` parameter for the number of
lines that should be skipped before starting to read data.

.. versionchanged:: 3.1.0
Expand Down
2 changes: 1 addition & 1 deletion src/tablib/formats/_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def import_set(cls, dset, in_stream, headers=True, skip_lines=0, **kwargs):
for i, row in enumerate(rows):
if i < skip_lines:
continue
if (i == skip_lines) and (headers):
if i == skip_lines and headers:
dset.headers = row
elif row:
if i > 0 and len(row) < dset.width:
Expand Down
2 changes: 1 addition & 1 deletion src/tablib/formats/_xlsx.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def import_set(cls, dset, in_stream, headers=True, read_only=True, skip_lines=0)
if i < skip_lines:
continue
row_vals = [c.value for c in row]
if (i == skip_lines) and (headers):
if i == skip_lines and headers:
dset.headers = row_vals
else:
dset.append(row_vals)
Expand Down

0 comments on commit ccd5429

Please sign in to comment.