Skip to content

Commit

Permalink
📦 Update fig-kiwi to version supporting zstd
Browse files Browse the repository at this point in the history
  • Loading branch information
tmdvs committed Sep 10, 2024
1 parent b74ff9c commit f489b2f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ build-backend = "setuptools.build_meta"
enabled = true

[project.optional-dependencies]
fast = ["fig-kiwi==0.1.0"]
dev = ["black==24.2.0", "mypy==0.991", "pytest==8.2.0", "fig-kiwi==0.1.0"]
fast = ["fig-kiwi==0.1.1"]
dev = ["black==24.2.0", "mypy==0.991", "pytest==8.2.0", "fig-kiwi==0.1.1"]

[tool.black]
line-length = 99
Expand Down
12 changes: 6 additions & 6 deletions src/figformat/decodefig.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ def decode(path):
if header == b"PK":
fig_zip = zipfile.ZipFile(reader)

# try:
# import fig_kiwi
try:
import fig_kiwi

# logging.debug("Using fast (rust) kiwi reader")
# return fig_kiwi.decode(path, type_converters), fig_zip
logging.debug("Using fast (rust) kiwi reader")
return fig_kiwi.decode(path, type_converters), fig_zip

# except ImportError:
# logging.debug("Falling back to slow (python) kiwi reader")
except ImportError:
logging.debug("Falling back to slow (python) kiwi reader")

if fig_zip:
reader = fig_zip.open("canvas.fig")
Expand Down

0 comments on commit f489b2f

Please sign in to comment.