Skip to main content

Charcoal Editor 2 Documentation

Maya Completion Files for Pylint

The default Python modules for Maya (e.g. maya.cmds, maya.OpenMaya, etc...) are not suitable for Pylint and can result in errors that are false-positives.

Examples of these errors are:

  • [E0401] Unable to import maya.cmds

  • [E1101] Module maya.cmds has no 'ls' method

The workaround for this is found in the Maya devkit and is available to download, for free, from the Maya Developer Center. The devkit contains stubs for all of the Python modules in Maya and can be used by Pylint to avoid these errors.

Download the Completion Files

  1. Download the Maya devkit from the Maya Developer Center (scroll down to devkits)

  2. Extract the contents of the zip file to a temporary location

  3. From the devkit root directory, navigate to "devkitBase/devkit/other/pymel/extras/completion/"

  4. Copy the "py" folder to a permanent location

  5. Rename the copied folder to something more helpful (e.g. "completion")

The contents of the completion folder should look something like this:

Add the Completion Folder to the Pylint Path

  1. Open the CE2 Preferences (Edit->Preferences) and select Pylint

  2. Under Additional Pylint Paths add the absolute path to the completion folder

  3. Click the OK button