Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 0110e27

Browse files
committedDec 25, 2023
Fix mypy issues
1 parent 15aee04 commit 0110e27

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed
 

‎src/xopen/__init__.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@
5858
igzip: Optional[ModuleType]
5959
isal_zlib: Optional[ModuleType]
6060
igzip_threaded: Optional[ModuleType]
61+
zlib_ng: Optional[ModuleType]
62+
gzip_ng: Optional[ModuleType]
63+
gzip_ng_threaded: Optional[ModuleType]
6164

6265
try:
6366
from isal import igzip, igzip_threaded, isal_zlib
@@ -1070,7 +1073,7 @@ def _open_gz( # noqa: C901
10701073
)
10711074
except ValueError: # Wrong compression level
10721075
pass
1073-
if gzip_ng_threaded and threads != 0:
1076+
if gzip_ng_threaded and zlib_ng and threads != 0:
10741077
try:
10751078
if compresslevel is None:
10761079
level = zlib_ng.Z_DEFAULT_COMPRESSION

0 commit comments

Comments
 (0)
Please sign in to comment.