Skip to content

Commit

Permalink
⬆️ UPGRADE: Autoupdate pre-commit config (pandas-dev#40564)
Browse files Browse the repository at this point in the history
Co-authored-by: jreback <[email protected]>
  • Loading branch information
github-actions[bot] and jreback authored Mar 22, 2021
1 parent 74eedbc commit b94a1ee
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ repos:
types: [text]
args: [--append-config=flake8/cython-template.cfg]
- repo: https://github.com/PyCQA/isort
rev: 5.7.0
rev: 5.8.0
hooks:
- id: isort
- repo: https://github.com/asottile/pyupgrade
rev: v2.10.0
rev: v2.11.0
hooks:
- id: pyupgrade
args: [--py37-plus, --keep-runtime-typing]
Expand Down
2 changes: 1 addition & 1 deletion pandas/core/internals/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,7 @@ def _replace_list(

rb = [self if inplace else self.copy()]
for i, (src, dest) in enumerate(pairs):
new_rb: List["Block"] = []
new_rb: List[Block] = []
for blk in rb:
m = masks[i]
convert = i == src_len # only convert once at the end
Expand Down
2 changes: 1 addition & 1 deletion pandas/io/pytables.py
Original file line number Diff line number Diff line change
Expand Up @@ -4058,7 +4058,7 @@ def get_blk_items(mgr):
tuple(b_items.tolist()): (b, b_items)
for b, b_items in zip(blocks, blk_items)
}
new_blocks: List["Block"] = []
new_blocks: List[Block] = []
new_blk_items = []
for ea in values_axes:
items = tuple(ea.values)
Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/io/parser/common/test_file_buffer_url.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ def test_context_manageri_user_provided(all_parsers, datapath):
# make sure that user-provided handles are not closed
parser = all_parsers

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

reader = parser.read_csv(path, chunksize=1)
assert not reader._engine.handles.handle.closed
Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/io/parser/test_encoding.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def test_binary_mode_file_buffers(
fpath = datapath(*file_path)
expected = parser.read_csv(fpath, encoding=encoding)

with open(fpath, mode="r", encoding=encoding) as fa:
with open(fpath, encoding=encoding) as fa:
result = parser.read_csv(fa)
assert not fa.closed
tm.assert_frame_equal(expected, result)
Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/io/test_sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ def load_iris_data(self, datapath, request):
self.drop_table("iris")
self._get_exec().execute(SQL_STRINGS["create_iris"][self.flavor])

with open(iris_csv_file, mode="r", newline=None) as iris_csv:
with open(iris_csv_file, newline=None) as iris_csv:
r = csv.reader(iris_csv)
next(r) # skip header row
ins = SQL_STRINGS["insert_iris"][self.flavor]
Expand Down

0 comments on commit b94a1ee

Please sign in to comment.