Skip to content

Commit b1969e3

Browse files
Anshoo-RajputKevin D Smith
authored and
Kevin D Smith
committed
remove trailing commas for pandas-dev#35925 (pandas-dev#36029)
1 parent 8dd5983 commit b1969e3

File tree

3 files changed

+8
-12
lines changed

3 files changed

+8
-12
lines changed

pandas/io/parquet.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def write(
128128
self.api.parquet.write_table(table, path, compression=compression, **kwargs)
129129

130130
def read(
131-
self, path, columns=None, storage_options: StorageOptions = None, **kwargs,
131+
self, path, columns=None, storage_options: StorageOptions = None, **kwargs
132132
):
133133
if is_fsspec_url(path) and "filesystem" not in kwargs:
134134
import_optional_dependency("fsspec")
@@ -218,7 +218,7 @@ def write(
218218
)
219219

220220
def read(
221-
self, path, columns=None, storage_options: StorageOptions = None, **kwargs,
221+
self, path, columns=None, storage_options: StorageOptions = None, **kwargs
222222
):
223223
if is_fsspec_url(path):
224224
fsspec = import_optional_dependency("fsspec")

pandas/io/parsers.py

-4
Original file line numberDiff line numberDiff line change
@@ -1967,10 +1967,6 @@ def _do_date_conversions(self, names, data):
19671967

19681968

19691969
class CParserWrapper(ParserBase):
1970-
"""
1971-
1972-
"""
1973-
19741970
def __init__(self, src, **kwds):
19751971
self.kwds = kwds
19761972
kwds = kwds.copy()

pandas/io/pytables.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -2931,7 +2931,7 @@ def read_index_node(
29312931
# If the index was an empty array write_array_empty() will
29322932
# have written a sentinel. Here we replace it with the original.
29332933
if "shape" in node._v_attrs and np.prod(node._v_attrs.shape) == 0:
2934-
data = np.empty(node._v_attrs.shape, dtype=node._v_attrs.value_type,)
2934+
data = np.empty(node._v_attrs.shape, dtype=node._v_attrs.value_type)
29352935
kind = _ensure_decoded(node._v_attrs.kind)
29362936
name = None
29372937

@@ -4103,7 +4103,7 @@ def create_description(
41034103
return d
41044104

41054105
def read_coordinates(
4106-
self, where=None, start: Optional[int] = None, stop: Optional[int] = None,
4106+
self, where=None, start: Optional[int] = None, stop: Optional[int] = None
41074107
):
41084108
"""
41094109
select coordinates (row numbers) from a table; return the
@@ -4374,7 +4374,7 @@ def write_data_chunk(
43744374
self.table.flush()
43754375

43764376
def delete(
4377-
self, where=None, start: Optional[int] = None, stop: Optional[int] = None,
4377+
self, where=None, start: Optional[int] = None, stop: Optional[int] = None
43784378
):
43794379

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

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

48224822
elif inferred_type in ["integer", "floating"]:
48234823
return IndexCol(
4824-
name, values=converted, kind=kind, typ=atom, index_name=index_name,
4824+
name, values=converted, kind=kind, typ=atom, index_name=index_name
48254825
)
48264826
else:
48274827
assert isinstance(converted, np.ndarray) and converted.dtype == object
48284828
assert kind == "object", kind
48294829
atom = _tables().ObjectAtom()
4830-
return IndexCol(name, converted, kind, atom, index_name=index_name,)
4830+
return IndexCol(name, converted, kind, atom, index_name=index_name)
48314831

48324832

48334833
def _unconvert_index(

0 commit comments

Comments
 (0)