Skip to content

remove trailing commas for #35925 #36029

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

Merged
merged 3 commits into from
Sep 1, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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: 1 addition & 3 deletions pandas/io/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1967,9 +1967,7 @@ def _do_date_conversions(self, names, data):


class CParserWrapper(ParserBase):
"""

"""
""""""

def __init__(self, src, **kwds):
self.kwds = kwds
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