Muream / maya-stubs

Stubs for Autodesk Maya
MIT License
40 stars 4 forks source link

optional arguments aren't type hinted as optional #8

Closed Aphosis closed 1 year ago

Aphosis commented 2 years ago

Hi Muream,

First of all thanks for this package, it has great completion and long flag names which is awesome.

I recently started to use your stubs at work, and stumbled upon an issue though: optional flags aren't marked as optional in the stubs, so I get warnings on pretty much every maya.cmds function that I'm missing some arguments in the function call.

Minimum example:

import maya.cmds as cmds
cmds.createNode("transform")

It gives the following error:

Arguments missing for parameters "name", "parent", "shared", "skipSelect"

I'm currently using maya-stubs-0.2.0, on Maya 2020.2

Thanks for your help !

Muream commented 2 years ago

@Aphosis this should be fixed in the latest pre-release (not published to pypi), let me know if you run into any issues.

I did some very minimal testing, I'll be using that more this week though

For now the maya.cmds stubs should be better than what they were but the OpenMaya 1.0 and 2.0 stubs are worse than before