-
Notifications
You must be signed in to change notification settings - Fork 165
Ambiguous attributes should not be accepted ? #2403
Copy link
Copy link
Labels
bugSomething that should work but isn't, with an example and a test case.Something that should work but isn't, with an example and a test case.community-generateddeveloper-dayssmallish tickets that can be considered "maintenance" and fixed within a single sessionsmallish tickets that can be considered "maintenance" and fixed within a single session
Metadata
Metadata
Assignees
Labels
bugSomething that should work but isn't, with an example and a test case.Something that should work but isn't, with an example and a test case.community-generateddeveloper-dayssmallish tickets that can be considered "maintenance" and fixed within a single sessionsmallish tickets that can be considered "maintenance" and fixed within a single session
Describe the bug
In a case where a schema has ambiguous class attributes, the
SchemaView.get_slot(...)method should throw an exception rather than returning the first attribute it can find with less details about it.Here is the test case I used to reproduce the issue :
In my case, the unexpected behaviour comes from this part of the code base which returns a
SlotDefinitionwith its name only.I would imagine that attributes are made to bring ease of use but in the case above the user should be forced to define a slot instead through an exception.
What do you think ?