Skip to content

Commit

Permalink
chore(deps-dev): bump mypy from 1.1.1 to 1.4.1
Browse files Browse the repository at this point in the history
This requires an explicit `cast` of `shutil.copyfileobj` to work-around
a typeshed/Mypy issue.

Bumps [mypy](https://github.com/python/mypy) from 1.1.1 to 1.4.1.
- [Commits](python/mypy@v1.1.1...v1.4.1)

---
updated-dependencies:
- dependency-name: mypy
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

See: python/mypy#15031
See: https://github.com/python/mypy/pull/14902/files#diff-363460977156fcfda748f21565484fe1d5862edf2823e9784cbf34d1e52ff2f2
See: python/mypy#14975

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Nicolas Trangez <ikke@nicolast.be>
  • Loading branch information
dependabot[bot] authored and NicolasT committed Aug 27, 2023
1 parent f65cd4c commit feb2ba9
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 32 deletions.
58 changes: 29 additions & 29 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ python = "^3.7.15"
importlib-metadata = {version = ">=3.7.3,<5.0.0", python = "< 3.8"}

[tool.poetry.dev-dependencies]
mypy = "^1.1"
mypy = "^1.4"
flake8 = "^3.9.2"
flake8-bandit = "^3.0.0"
flake8-bugbear = "^23.3.12"
Expand Down
11 changes: 9 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
"""Global definitions for pytest tests."""

import io
import shutil
import tempfile
import uuid
from pathlib import Path
from typing import Iterator
from typing import cast, BinaryIO, Callable, Iterator

import pytest

Expand All @@ -20,6 +21,12 @@ def disk_image(tmp_path: Path) -> Iterator[Path]:
"""Yield the path to a copy of `TESTDATA_DISK`."""
with tempfile.NamedTemporaryFile(dir=tmp_path) as tmp:
with open(TESTDATA_DISK, "rb") as disk:
shutil.copyfileobj(disk, tmp)
copyfileobj = cast(
Callable[
[io.BufferedReader, tempfile._TemporaryFileWrapper[bytes]], None
],
shutil.copyfileobj,
)
copyfileobj(disk, tmp)

yield Path(tmp.name)

0 comments on commit feb2ba9

Please sign in to comment.