Skip to content

Commit

Permalink
Merge pull request #1316 from dandi/fix-typing
Browse files Browse the repository at this point in the history
Fix typing errors due to keyring and cv externals changes.
  • Loading branch information
yarikoptic committed Aug 10, 2023
2 parents 71bd0fe + 5a10ab9 commit 4d5b46b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
1 change: 1 addition & 0 deletions dandi/keyring.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ def keyring_op(
len(kbs) == 1
), "EncryptedKeyring not available; is pycryptodomex installed?"
kb = kbs[0]
assert isinstance(kb, EncryptedKeyring)
if op.exists(kb.file_path):
lgr.info("EncryptedKeyring file exists; using as keyring backend")
return (kb, func(kb))
Expand Down
12 changes: 5 additions & 7 deletions dandi/tests/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -656,19 +656,17 @@ def video_files(tmp_path: Path) -> list[tuple[Path, Path]]:
(nf, nx, ny) = (2, 2, 2)
writer1 = cv2.VideoWriter(
filename=str(movie_file1),
apiPreference=None,
fourcc=cv2.VideoWriter_fourcc(*"DIVX"),
fps=25,
apiPreference=0,
fourcc=cv2.VideoWriter.fourcc(*"DIVX"),
fps=25.0,
frameSize=(ny, nx),
params=None,
)
writer2 = cv2.VideoWriter(
filename=str(movie_file2),
apiPreference=None,
fourcc=cv2.VideoWriter_fourcc(*"DIVX"),
apiPreference=0,
fourcc=cv2.VideoWriter.fourcc(*"DIVX"),
fps=25,
frameSize=(ny, nx),
params=None,
)
for k in range(nf):
writer1.write(np.random.randint(0, 255, (nx, ny, 3)).astype("uint8"))
Expand Down

0 comments on commit 4d5b46b

Please sign in to comment.