Repository navigation
Refactor: BaseInvenTreeSetting - #4834
Conversation
|
@wolflu05 are you sure that the subclass checking is not required for plugin settings? Edit: It seems there is no coverage on the changed settings code - that would need to be changed |
I used project wide code search and checked all method calls individually where I changed something if there is a |
|
So we can remove that section entirely? |
|
What section? The subclass checking in the BaseInventreeSettingClass? Yes. Ideally everything is moved out now and should be implemented in new code like this. Do you want me to add general tests in this PR? But how do we test an abstract model? |
|
How do I interpret the coverage report? Especially this line? Should there something be improved? And where is the coverage decrease in this file? |
|
Something seems off with the coverage - I will let it run again |
matmair
left a comment
There was a problem hiding this comment.
Looks good but not sure if the uniqueness will work this way
|
How do you mean that? |
I was worried about removing the kwargs passed to the uniqueness check for user settings, in local testing it seems to work this way though. |
|
@SchrodingersGat 0.12.0 is looking like a big change under the hood - I think especially this one needs a bit of testing in the real world before we release a stable |
This PR tries to add typings for settings and make the
common.BaseInvenTreeSettingmodel more generic. This simplifies the implementation for the #4824 , see #4824 (comment)Actually first, I planned to only add a
get_filtersmethod like theget_kwargsmethod until I now discovered that something like this was already there onetime and was removed. (See: 5ee9af7). Let me know if you have a better idea to make it more generic.I tested this and discovered no bugs or issues that something doesnt work or break with this PR. Hopefully tests cover the other half 😄.