-
-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpy_prop_collection.get() returns None #184
Comments
There are existing issues for some of your proposed changes. |
I fixed the issues mentioned by @JonathanPlasse. I'm not sure how to |
As per my comment in #153 the fixed return type of I'm not sure if I should open a separate issue for it, but the
|
No prob. You can also discuss this here. |
My initial thoughts are: These are very C-like methods, with The contained type of |
I think MutableSequence is now deprecated. |
|
Could you give me an advice about this type annotation? |
What is the error? I don't see why either of these would be incorrect type annotations. On further consideration the former is more correct for these methods as the sequence should be homogenous. |
This is my mistake. I have already solved this. The issue is now fixed. Thanks for sharing your idea @Road-hog123 ! |
System Information
Expected behavior
A method named
get()
should return a value.Description about the bug
Mesh.uv_layers
is abpy_prop_collection[MeshUVLoopLayer]
, so retrieving an element by name with.get()
should return either aMeshUVLoopLayer
or the type of thedefault
parameter.typing.Any
would be an improvement overNone
.I note that
foreach_get()
,items()
andvalues()
could also benefit fromGenericType
, howeverget()
is complicated by its default parameter.The text was updated successfully, but these errors were encountered: