Skip to content
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

[pre-commit.ci] pre-commit autoupdate #3

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
@@ -1,7 +1,7 @@
repos:

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
Expand All @@ -14,6 +14,6 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/psf/black
rev: 23.3.0
rev: 24.1.1
hooks:
- id: black
8 changes: 5 additions & 3 deletions src/lecroyscope/reading/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@
def read(
filename_or_bytes: str | PathLike[str] | bytes, header_only: bool = False
) -> tuple[dict[str, str | int | float], numpy.ndarray, numpy.ndarray]:
with open(filename_or_bytes, "r+b") if not isinstance(
filename_or_bytes, bytes
) else BytesIO(filename_or_bytes) as f:
with (
open(filename_or_bytes, "r+b")
if not isinstance(filename_or_bytes, bytes)
else BytesIO(filename_or_bytes)
) as f:
wavedesc_bytes = b"WAVEDESC"
# find "WAVEDESC" and skip those bytes
if isinstance(filename_or_bytes, bytes):
Expand Down
Loading