Closed dantetemplar closed 4 months ago
It seems to me that this approach will spoil the types a little. I think it's better to list all the suitable alternatives in the argument annotation. But in runtime itself, the if-else that you suggested fits well.
In that case, should I implement it myself?
You can of course make that change immediately in you installation files.
You can of course make that change immediately in you installation files.
I mean, I've added new commit with use of pymupdf.Document
As per the type checking mannerisms of these days:
I think we will reduce that a little, because the repo is still in its early development stages. So that parameter and similar one will just be typing.Any
things for the time being.
As per the type checking mannerisms of these days: I think we will reduce that a little, because the repo is still in its early development stages. So that parameter and similar one will just be
typing.Any
things for the time being.
I understand you, but the pull request can still be accepted 🤗
Ok no problem actually - except, that we need your explicit agreement to our Contributor License Agreement. We are making sure that all user contributions are backed by a well-defined legal foundation. So please add a comment somewhere here with the wording like "I have read and herewith accept the Artifex Contributor License Agreement." That agreement can be downloaded / read from this site: https://artifex.com/contributor/
Ok no problem actually - except, that we need your explicit agreement to our Contributor License Agreement. We are making sure that all user contributions are backed by a well-defined legal foundation. So please add a comment somewhere here with the wording like "I have read and herewith accept the Artifex Contributor License Agreement." That agreement can be downloaded / read from this site: https://artifex.com/contributor/
I hereby declare that I have read, understood, and accept the terms and conditions of the Artifex Contributor License Agreement.
Thank you - Done!
Thank you for the contribution - much appreciated! Actually, this is already supported implicitly: I just have to change the check of the parameter type. The parameter is converted to a
pymupdf.Document
if not already one. And Document creation supports all imaginable alternatives - includingpathlib
Paths. So all I need to do is something like this: