Geometry helper classes should support keyword arguments (original) (raw)
Is your feature request related to a problem? Please describe.
Most of the classes in helper-geo-py.i do not allow keyword-based parameters to their constructors. This is misleading, as the corresponding documentation explicitly mentions some names.
Describe the solution you'd like
The classes inside helper-geo-py.i should allow passing keyword arguments to their constructors, as documented for them.
Describe alternatives you've considered
At the moment I use anonymous/unnamed parameters, but this makes it hard to identify what the parameters are actual corresponding to.
Additional context
I stumbled upon this with fitz.Rect, but looking at the code, this applies to the other classes as well:
import fitz fitz.version ('1.21.1', '1.21.1', '20221213000001') fitz.Rect(x0=1, y0=2, x1=3, y1=4) Traceback (most recent call last): File "", line 1, in TypeError: init() got an unexpected keyword argument 'x0'
According to https://pymupdf.readthedocs.io/en/latest/rect.html#Rect, Rect(x0, y0, x1, y1) is a valid call.