Skip to content

Commit

Permalink
Merge pull request #123 from redpwn/dependabot/pip/mypy-0.812
Browse files Browse the repository at this point in the history
build(deps-dev): bump mypy from 0.790 to 0.812
  • Loading branch information
ethanwu10 authored Feb 27, 2021
2 parents 2c2581c + 292e319 commit cd18326
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 20 deletions.
40 changes: 24 additions & 16 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 @@ -37,7 +37,7 @@ pre-commit = { version = "^2.10.1", python = "^3.6.1" }
black = "^20.8b1"
pytest = "^6.2.2"
coverage = "^5.4"
mypy = "^0.790"
mypy = "^0.812"
flake8 = "^3.8.4"
flake8-bugbear = "^20.11.1"
pytest-datadir = "^1.3.1"
Expand Down
7 changes: 4 additions & 3 deletions rcds/project/assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,10 @@ def _create(self, fpath: Path, fentry: _FileEntry) -> None:
if not contents.is_file():
raise ValueError(f"Provided file does not exist: '{str(contents)}'")
fpath.symlink_to(contents)
if isinstance(contents, ByteString):
contents = io.BytesIO(contents)
if isinstance(contents, io.IOBase):
else:
if isinstance(contents, ByteString):
contents = io.BytesIO(contents)
assert isinstance(contents, io.IOBase)
with fpath.open("wb") as ofd:
shutil.copyfileobj(contents, ofd)
os.utime(fpath, (fentry.mtime, fentry.mtime))
Expand Down

0 comments on commit cd18326

Please sign in to comment.