Skip to content

Commit 9a20569

Browse files
committed
add docstrings and bump version number
1 parent 0e729c6 commit 9a20569

18 files changed

+115185
-29846
lines changed

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,13 @@ This is not a small feat so the stubs will improve over time.
1212
- [ ] Accurate Arguments signatures all commands.
1313
- [ ] Return Types.
1414
- [ ] Docstrings.
15-
- ❌ OpenMaya 1.0: Missing
16-
- ❌ OpenMaya 2.0: Missing
15+
- 🚧 OpenMaya 1.0: Incomplete
16+
- [x] Stubs for all members
17+
- [ ] Accurate Argument Signatures
18+
- [ ] Return Types
19+
- [ ] Docstrings.
20+
- 🚧 OpenMaya 2.0: Incomplete
21+
- [x] Stubs for all members
22+
- [ ] Accurate Argument Signatures
23+
- [ ] Return Types
24+
- [x] Docstrings.

maya-stubs/OpenMayaAnim_generated.pyi

Lines changed: 3392 additions & 976 deletions
Large diffs are not rendered by default.

maya-stubs/OpenMayaFX_generated.pyi

Lines changed: 2887 additions & 831 deletions
Large diffs are not rendered by default.

maya-stubs/OpenMayaMPx_generated.pyi

Lines changed: 5725 additions & 1647 deletions
Large diffs are not rendered by default.

maya-stubs/OpenMayaRender_generated.pyi

Lines changed: 3690 additions & 1062 deletions
Large diffs are not rendered by default.

maya-stubs/OpenMayaUI_generated.pyi

Lines changed: 3827 additions & 1101 deletions
Large diffs are not rendered by default.

maya-stubs/OpenMaya_generated.pyi

Lines changed: 17102 additions & 4900 deletions
Large diffs are not rendered by default.

maya-stubs/api/MDGContextGuard_generated.pyi

Lines changed: 170 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -5,40 +5,108 @@ from _typeshed import Incomplete
55

66

77
class MDGContextGuard(object):
8-
def _MDGContextGuard__save_state(self: Self, new_current_context: Any) -> Any: ...
9-
def __delattr__(self: Self, name: Any) -> Any: ...
8+
def _MDGContextGuard__save_state(self: Self, new_current_context: Any) -> Any:
9+
"""Save the state of the current evaluation context"""
10+
...
11+
def __delattr__(self: Self, name: Any) -> Any:
12+
"""Implement delattr(self, name)."""
13+
...
1014
__dict__: mappingproxy = ...
11-
def __dir__(self: Self) -> Any: ...
15+
def __dir__(self: Self) -> Any:
16+
"""Default dir() implementation."""
17+
...
1218
__doc__: str = ...
13-
def __enter__(self: Self) -> Any: ...
14-
def __eq__(self: Self, value: Any) -> Any: ...
15-
def __exit__(self: Self, object_type: Any, value: Any, traceback: Any) -> Any: ...
16-
def __format__(self: Self, format_spec: Any) -> Any: ...
17-
def __ge__(self: Self, value: Any) -> Any: ...
18-
def __getattribute__(self: Self, name: Any) -> Any: ...
19-
def __gt__(self: Self, value: Any) -> Any: ...
20-
def __hash__(self: Self) -> Any: ...
21-
def __init__(self: Self, context: Any) -> Any: ...
22-
def __init_subclass__(self: Self, *args: Any, **kwargs: Any) -> Any: ...
23-
def __le__(self: Self, value: Any) -> Any: ...
24-
def __lt__(self: Self, value: Any) -> Any: ...
19+
def __enter__(self: Self) -> Any:
20+
"""Begin the scope, the work is done in __init__"""
21+
...
22+
def __eq__(self: Self, value: Any) -> Any:
23+
"""Return self==value."""
24+
...
25+
def __exit__(self: Self, object_type: Any, value: Any, traceback: Any) -> Any:
26+
"""Ensure the state is restored if this object goes out of scope"""
27+
...
28+
def __format__(self: Self, format_spec: Any) -> Any:
29+
"""Default object formatter."""
30+
...
31+
def __ge__(self: Self, value: Any) -> Any:
32+
"""Return self>=value."""
33+
...
34+
def __getattribute__(self: Self, name: Any) -> Any:
35+
"""Return getattr(self, name)."""
36+
...
37+
def __gt__(self: Self, value: Any) -> Any:
38+
"""Return self>value."""
39+
...
40+
def __hash__(self: Self) -> Any:
41+
"""Return hash(self)."""
42+
...
43+
def __init__(self: Self, context: Any) -> Any:
44+
"""Initialize the object with a specific context"""
45+
...
46+
def __init_subclass__(self: Self, *args: Any, **kwargs: Any) -> Any:
47+
"""This method is called when a class is subclassed.
48+
49+
The default implementation does nothing. It may be
50+
overridden to extend subclasses.
51+
"""
52+
...
53+
def __le__(self: Self, value: Any) -> Any:
54+
"""Return self<=value."""
55+
...
56+
def __lt__(self: Self, value: Any) -> Any:
57+
"""Return self<value."""
58+
...
2559
__module__: str = ...
26-
def __ne__(self: Self, value: Any) -> Any: ...
27-
def __new__(self: Self, args: Any, kwargs: Any) -> Any: ...
28-
def __reduce__(self: Self) -> Any: ...
29-
def __reduce_ex__(self: Self, protocol: Any) -> Any: ...
30-
def __repr__(self: Self) -> Any: ...
31-
def __setattr__(self: Self, name: Any, value: Any) -> Any: ...
32-
def __sizeof__(self: Self) -> Any: ...
33-
def __str__(self: Self) -> Any: ...
34-
def __subclasshook__(self: Self, *args: Any, **kwargs: Any) -> Any: ...
60+
def __ne__(self: Self, value: Any) -> Any:
61+
"""Return self!=value."""
62+
...
63+
def __new__(self: Self, args: Any, kwargs: Any) -> Any:
64+
"""Create and return a new object. See help(type) for accurate signature."""
65+
...
66+
def __reduce__(self: Self) -> Any:
67+
"""Helper for pickle."""
68+
...
69+
def __reduce_ex__(self: Self, protocol: Any) -> Any:
70+
"""Helper for pickle."""
71+
...
72+
def __repr__(self: Self) -> Any:
73+
"""Return repr(self)."""
74+
...
75+
def __setattr__(self: Self, name: Any, value: Any) -> Any:
76+
"""Implement setattr(self, name, value)."""
77+
...
78+
def __sizeof__(self: Self) -> Any:
79+
"""Size of object in memory, in bytes."""
80+
...
81+
def __str__(self: Self) -> Any:
82+
"""Return str(self)."""
83+
...
84+
def __subclasshook__(self: Self, *args: Any, **kwargs: Any) -> Any:
85+
"""Abstract classes can override this to customize issubclass().
86+
87+
This is invoked early on by abc.ABCMeta.__subclasscheck__().
88+
It should return True, False or NotImplemented. If it returns
89+
NotImplemented, the normal algorithm is used. Otherwise, it
90+
overrides the normal algorithm (and the outcome is cached).
91+
"""
92+
...
3593
@property
36-
def __weakref__(*args: Any, **kwargs: Any) -> Any: ...
94+
def __weakref__(*args: Any, **kwargs: Any) -> Any:
95+
"""list of weak references to the object (if defined)"""
96+
...
3797
@__weakref__.setter
38-
def __weakref__(*args: Any, **kwargs: Any) -> Any: ...
39-
def context(self: Self) -> Any: ...
40-
def original_context(self: Self) -> Any: ...
41-
def restore(self: Self) -> Any: ...
98+
def __weakref__(*args: Any, **kwargs: Any) -> Any:
99+
"""list of weak references to the object (if defined)"""
100+
...
101+
def context(self: Self) -> Any:
102+
"""Return the context that was passed into this object on entry/construction"""
103+
...
104+
def original_context(self: Self) -> Any:
105+
"""Return the context that was current when this object was entered/constructed"""
106+
...
107+
def restore(self: Self) -> Any:
108+
"""Restore the context on entry/construction to be the current evaluation context"""
109+
...
42110

43111
__all__: list
44112
__builtins__: dict
@@ -50,25 +118,77 @@ __name__: str
50118
__package__: str
51119
__spec__: ModuleSpec
52120
class object:
53-
def __delattr__(self: Self, name: Any) -> Any: ...
54-
def __dir__(self: Self) -> Any: ...
121+
def __delattr__(self: Self, name: Any) -> Any:
122+
"""Implement delattr(self, name)."""
123+
...
124+
def __dir__(self: Self) -> Any:
125+
"""Default dir() implementation."""
126+
...
55127
__doc__: str = ...
56-
def __eq__(self: Self, value: Any) -> Any: ...
57-
def __format__(self: Self, format_spec: Any) -> Any: ...
58-
def __ge__(self: Self, value: Any) -> Any: ...
59-
def __getattribute__(self: Self, name: Any) -> Any: ...
60-
def __gt__(self: Self, value: Any) -> Any: ...
61-
def __hash__(self: Self) -> Any: ...
62-
def __init__(self: Self, args: Any, kwargs: Any) -> Any: ...
63-
def __init_subclass__(self: Self, *args: Any, **kwargs: Any) -> Any: ...
64-
def __le__(self: Self, value: Any) -> Any: ...
65-
def __lt__(self: Self, value: Any) -> Any: ...
66-
def __ne__(self: Self, value: Any) -> Any: ...
67-
def __new__(self: Self, args: Any, kwargs: Any) -> Any: ...
68-
def __reduce__(self: Self) -> Any: ...
69-
def __reduce_ex__(self: Self, protocol: Any) -> Any: ...
70-
def __repr__(self: Self) -> Any: ...
71-
def __setattr__(self: Self, name: Any, value: Any) -> Any: ...
72-
def __sizeof__(self: Self) -> Any: ...
73-
def __str__(self: Self) -> Any: ...
74-
def __subclasshook__(self: Self, *args: Any, **kwargs: Any) -> Any: ...
128+
def __eq__(self: Self, value: Any) -> Any:
129+
"""Return self==value."""
130+
...
131+
def __format__(self: Self, format_spec: Any) -> Any:
132+
"""Default object formatter."""
133+
...
134+
def __ge__(self: Self, value: Any) -> Any:
135+
"""Return self>=value."""
136+
...
137+
def __getattribute__(self: Self, name: Any) -> Any:
138+
"""Return getattr(self, name)."""
139+
...
140+
def __gt__(self: Self, value: Any) -> Any:
141+
"""Return self>value."""
142+
...
143+
def __hash__(self: Self) -> Any:
144+
"""Return hash(self)."""
145+
...
146+
def __init__(self: Self, args: Any, kwargs: Any) -> Any:
147+
"""Initialize self. See help(type(self)) for accurate signature."""
148+
...
149+
def __init_subclass__(self: Self, *args: Any, **kwargs: Any) -> Any:
150+
"""This method is called when a class is subclassed.
151+
152+
The default implementation does nothing. It may be
153+
overridden to extend subclasses.
154+
"""
155+
...
156+
def __le__(self: Self, value: Any) -> Any:
157+
"""Return self<=value."""
158+
...
159+
def __lt__(self: Self, value: Any) -> Any:
160+
"""Return self<value."""
161+
...
162+
def __ne__(self: Self, value: Any) -> Any:
163+
"""Return self!=value."""
164+
...
165+
def __new__(self: Self, args: Any, kwargs: Any) -> Any:
166+
"""Create and return a new object. See help(type) for accurate signature."""
167+
...
168+
def __reduce__(self: Self) -> Any:
169+
"""Helper for pickle."""
170+
...
171+
def __reduce_ex__(self: Self, protocol: Any) -> Any:
172+
"""Helper for pickle."""
173+
...
174+
def __repr__(self: Self) -> Any:
175+
"""Return repr(self)."""
176+
...
177+
def __setattr__(self: Self, name: Any, value: Any) -> Any:
178+
"""Implement setattr(self, name, value)."""
179+
...
180+
def __sizeof__(self: Self) -> Any:
181+
"""Size of object in memory, in bytes."""
182+
...
183+
def __str__(self: Self) -> Any:
184+
"""Return str(self)."""
185+
...
186+
def __subclasshook__(self: Self, *args: Any, **kwargs: Any) -> Any:
187+
"""Abstract classes can override this to customize issubclass().
188+
189+
This is invoked early on by abc.ABCMeta.__subclasscheck__().
190+
It should return True, False or NotImplemented. If it returns
191+
NotImplemented, the normal algorithm is used. Otherwise, it
192+
overrides the normal algorithm (and the outcome is cached).
193+
"""
194+
...

0 commit comments

Comments
 (0)