Skip to content

Commit

Permalink
remove trailing commas for pandas-dev#35925 (pandas-dev#36029)
Browse files Browse the repository at this point in the history
  • Loading branch information
Anshoo-Rajput authored and Kevin D Smith committed Nov 2, 2020
1 parent 8dd5983 commit b1969e3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
4 changes: 2 additions & 2 deletions pandas/io/parquet.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def write(
self.api.parquet.write_table(table, path, compression=compression, **kwargs)

def read(
self, path, columns=None, storage_options: StorageOptions = None, **kwargs,
self, path, columns=None, storage_options: StorageOptions = None, **kwargs
):
if is_fsspec_url(path) and "filesystem" not in kwargs:
import_optional_dependency("fsspec")
Expand Down Expand Up @@ -218,7 +218,7 @@ def write(
)

def read(
self, path, columns=None, storage_options: StorageOptions = None, **kwargs,
self, path, columns=None, storage_options: StorageOptions = None, **kwargs
):
if is_fsspec_url(path):
fsspec = import_optional_dependency("fsspec")
Expand Down
4 changes: 0 additions & 4 deletions pandas/io/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1967,10 +1967,6 @@ def _do_date_conversions(self, names, data):


class CParserWrapper(ParserBase):
"""
"""

def __init__(self, src, **kwds):
self.kwds = kwds
kwds = kwds.copy()
Expand Down
12 changes: 6 additions & 6 deletions pandas/io/pytables.py
Original file line number Diff line number Diff line change
Expand Up @@ -2931,7 +2931,7 @@ def read_index_node(
# If the index was an empty array write_array_empty() will
# have written a sentinel. Here we replace it with the original.
if "shape" in node._v_attrs and np.prod(node._v_attrs.shape) == 0:
data = np.empty(node._v_attrs.shape, dtype=node._v_attrs.value_type,)
data = np.empty(node._v_attrs.shape, dtype=node._v_attrs.value_type)
kind = _ensure_decoded(node._v_attrs.kind)
name = None

Expand Down Expand Up @@ -4103,7 +4103,7 @@ def create_description(
return d

def read_coordinates(
self, where=None, start: Optional[int] = None, stop: Optional[int] = None,
self, where=None, start: Optional[int] = None, stop: Optional[int] = None
):
"""
select coordinates (row numbers) from a table; return the
Expand Down Expand Up @@ -4374,7 +4374,7 @@ def write_data_chunk(
self.table.flush()

def delete(
self, where=None, start: Optional[int] = None, stop: Optional[int] = None,
self, where=None, start: Optional[int] = None, stop: Optional[int] = None
):

# delete all rows (and return the nrows)
Expand Down Expand Up @@ -4805,7 +4805,7 @@ def _convert_index(name: str, index: Index, encoding: str, errors: str) -> Index
if inferred_type == "date":
converted = np.asarray([v.toordinal() for v in values], dtype=np.int32)
return IndexCol(
name, converted, "date", _tables().Time32Col(), index_name=index_name,
name, converted, "date", _tables().Time32Col(), index_name=index_name
)
elif inferred_type == "string":

Expand All @@ -4821,13 +4821,13 @@ def _convert_index(name: str, index: Index, encoding: str, errors: str) -> Index

elif inferred_type in ["integer", "floating"]:
return IndexCol(
name, values=converted, kind=kind, typ=atom, index_name=index_name,
name, values=converted, kind=kind, typ=atom, index_name=index_name
)
else:
assert isinstance(converted, np.ndarray) and converted.dtype == object
assert kind == "object", kind
atom = _tables().ObjectAtom()
return IndexCol(name, converted, kind, atom, index_name=index_name,)
return IndexCol(name, converted, kind, atom, index_name=index_name)


def _unconvert_index(
Expand Down

0 comments on commit b1969e3

Please sign in to comment.