Skip to content

Commit b94a1ee

Browse files
⬆️ UPGRADE: Autoupdate pre-commit config (#40564)
Co-authored-by: jreback <[email protected]>
1 parent 74eedbc commit b94a1ee

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

.pre-commit-config.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ repos:
4747
types: [text]
4848
args: [--append-config=flake8/cython-template.cfg]
4949
- repo: https://github.com/PyCQA/isort
50-
rev: 5.7.0
50+
rev: 5.8.0
5151
hooks:
5252
- id: isort
5353
- repo: https://github.com/asottile/pyupgrade
54-
rev: v2.10.0
54+
rev: v2.11.0
5555
hooks:
5656
- id: pyupgrade
5757
args: [--py37-plus, --keep-runtime-typing]

pandas/core/internals/blocks.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,7 @@ def _replace_list(
827827

828828
rb = [self if inplace else self.copy()]
829829
for i, (src, dest) in enumerate(pairs):
830-
new_rb: List["Block"] = []
830+
new_rb: List[Block] = []
831831
for blk in rb:
832832
m = masks[i]
833833
convert = i == src_len # only convert once at the end

pandas/io/pytables.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4058,7 +4058,7 @@ def get_blk_items(mgr):
40584058
tuple(b_items.tolist()): (b, b_items)
40594059
for b, b_items in zip(blocks, blk_items)
40604060
}
4061-
new_blocks: List["Block"] = []
4061+
new_blocks: List[Block] = []
40624062
new_blk_items = []
40634063
for ea in values_axes:
40644064
items = tuple(ea.values)

pandas/tests/io/parser/common/test_file_buffer_url.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ def test_context_manageri_user_provided(all_parsers, datapath):
400400
# make sure that user-provided handles are not closed
401401
parser = all_parsers
402402

403-
with open(datapath("io", "data", "csv", "iris.csv"), mode="r") as path:
403+
with open(datapath("io", "data", "csv", "iris.csv")) as path:
404404

405405
reader = parser.read_csv(path, chunksize=1)
406406
assert not reader._engine.handles.handle.closed

pandas/tests/io/parser/test_encoding.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def test_binary_mode_file_buffers(
153153
fpath = datapath(*file_path)
154154
expected = parser.read_csv(fpath, encoding=encoding)
155155

156-
with open(fpath, mode="r", encoding=encoding) as fa:
156+
with open(fpath, encoding=encoding) as fa:
157157
result = parser.read_csv(fa)
158158
assert not fa.closed
159159
tm.assert_frame_equal(expected, result)

pandas/tests/io/test_sql.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ def load_iris_data(self, datapath, request):
302302
self.drop_table("iris")
303303
self._get_exec().execute(SQL_STRINGS["create_iris"][self.flavor])
304304

305-
with open(iris_csv_file, mode="r", newline=None) as iris_csv:
305+
with open(iris_csv_file, newline=None) as iris_csv:
306306
r = csv.reader(iris_csv)
307307
next(r) # skip header row
308308
ins = SQL_STRINGS["insert_iris"][self.flavor]

0 commit comments

Comments
 (0)