Skip to content

⬆️ UPGRADE: Autoupdate pre-commit config #40564

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 1 commit into from
Mar 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
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 .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