Python (lint) Advice With Omni Imports

Hi all,

To catch “compile time” errors in python one has to rely on some kind of lint process. I’m using Visual Studio Code, but the lint extension doesn’t pick up any of the omni.ui, omni.kit, omni.usd, pxr, carb imports and so on.

So my question is, how do you get these working?

It drives me mad only hitting syntax and type errors at runtime rather than at “compile” (ie lint) time - i’m a c++ developer you see, so used to that sort of development “help”, and developing python with this runtime error catching is driving me mad!

Any help and/or advice would bve greatly appreciated please :)

  • Simon.

Hi Simon,

We have an improvement in the works, which enables autocompletion/intellisense for binary python modules like omni.ui. We do that by generating .pyi (python stub) files. That improves python coding experience.

We also in general looking into ways to improve python developing, specifically on vscode with pylance.

Having python module automatically reloaded we heavily rely on that as substitute for c++ compile-time checks. When developing an extension we just constantly hit “save” button and see UI changes immediately and errors in console.

Hi Anovoselov,

Thanks for the update, that sounds really useful when it comes on line.
I love the auto-update when saving by the way, it’s brilliant and a game changer when developing with Python!

  • Simon.
1 Like