Skip to content

Commit

Permalink
Fix mypy issues
Browse files Browse the repository at this point in the history
  • Loading branch information
rhpvorderman committed Dec 25, 2023
1 parent 15aee04 commit 0110e27
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/xopen/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@
igzip: Optional[ModuleType]
isal_zlib: Optional[ModuleType]
igzip_threaded: Optional[ModuleType]
zlib_ng: Optional[ModuleType]
gzip_ng: Optional[ModuleType]
gzip_ng_threaded: Optional[ModuleType]

try:
from isal import igzip, igzip_threaded, isal_zlib
Expand Down Expand Up @@ -1070,7 +1073,7 @@ def _open_gz( # noqa: C901
)
except ValueError: # Wrong compression level
pass
if gzip_ng_threaded and threads != 0:
if gzip_ng_threaded and zlib_ng and threads != 0:
try:
if compresslevel is None:
level = zlib_ng.Z_DEFAULT_COMPRESSION
Expand Down

0 comments on commit 0110e27

Please sign in to comment.