pyobjc icon indicating copy to clipboard operation
pyobjc copied to clipboard

keyword arguments for __new__ method generated from initWith* are weird if all caps

Open rndblnch opened this issue 1 year ago • 0 comments

The automatic generation of keyword arguments name for new method from initWith* just turns the first letter of the first argument to lowercase. But when the first argument is all caps it seems not appropriate, eg:

pdf = PDFDocument.alloc().initWithURL(url) leads to pdf = PDFDocument(uRL=url) (notice the weird uRL parameter)

I have a small patch for Lib/objc/_transform.py fixing that, will open a PR

Platform information

pyobjc 10.3+

rndblnch avatar Sep 25 '24 09:09 rndblnch