You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to lint using type stubs from the types-usd package, which provides type stubs as pxr-stubs for the pxr USD module. I would at least like pylint to not complain about missing members.
Adding --prefer-stubs y did not seem to make a difference.
Pylint output
************* Module test_usd
test_usd.py:2:0: E0401: Unable to import 'pxr' (import-error)
Note that if usd-core is installed (requires Python <3.13 currently), the error becomes:
************* Module test_usd
test_usd.py:5:25: E1101: Module 'pxr.Usd' has no 'Stage' member (no-member)
test_usd.py:6:4: E1101: Module 'pxr.Usd' has no 'Stage' member (no-member)
test_usd.py:7:11: E1101: Module 'pxr.Usd' has no 'Stage' member (no-member)
Expected behavior
Ideally a no-member error for Usd.Stage.turtle(), otherwise no errors would also be reasonable.
Note that pyright detects the stubs as expected:
.../pylint_usd/test_usd.py
.../pylint_usd/test_usd.py:6:15 - error: Cannot access attribute "turtle" for class "type[Stage]"
Attribute "turtle" is unknown (reportAttributeAccessIssue)
1 error, 0 warnings, 0 informations
Uh oh!
There was an error while loading. Please reload this page.
Bug description
I'm trying to lint using type stubs from the
types-usd
package, which provides type stubs aspxr-stubs
for thepxr
USD module. I would at least like pylint to not complain about missing members.Example code:
Possibly related to #10017
Configuration
Command used
Adding
--prefer-stubs y
did not seem to make a difference.Pylint output
Note that if
usd-core
is installed (requires Python <3.13 currently), the error becomes:Expected behavior
Ideally a
no-member
error forUsd.Stage.turtle()
, otherwise no errors would also be reasonable.Note that
pyright
detects the stubs as expected:Pylint version
Also tried with Python 3.9.18
OS / Environment
Python 3.13.1 with Arch Linux
Python 3.9.18 with Rocky 9
Additional dependencies
The text was updated successfully, but these errors were encountered: