Commit f281175
sdk\basyx\aas\adapter\xml\xml_serialization.py: Remove code duplication (#406)
Previously, the method `object_to_xml_element()` in
`sdk\basyx\aas\adapter\xml\xml_serialization.py` contained duplicated
code from `submodel_element_to_xml()` and `data_element_to_xml()`. This
was due to the class hierarchy of the objects being compared in the if
statements.
For instance, some models inherit from `model.SubmodelElement`. Because
of that, the associated objects are checked for in
`submodel_element_to_xml()`. With that, any additional check for these
objects in `object_to_xml_element()` are redundant.
This removes the code duplication.
Fixes #3961 parent b987e39 commit f281175
1 file changed
Lines changed: 0 additions & 30 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
883 | 883 | | |
884 | 884 | | |
885 | 885 | | |
886 | | - | |
887 | | - | |
888 | | - | |
889 | | - | |
890 | | - | |
891 | | - | |
892 | | - | |
893 | | - | |
894 | | - | |
895 | | - | |
896 | 886 | | |
897 | 887 | | |
898 | | - | |
899 | | - | |
900 | 888 | | |
901 | 889 | | |
902 | | - | |
903 | | - | |
904 | | - | |
905 | | - | |
906 | | - | |
907 | | - | |
908 | | - | |
909 | | - | |
910 | | - | |
911 | | - | |
912 | | - | |
913 | | - | |
914 | | - | |
915 | | - | |
916 | | - | |
917 | | - | |
918 | 890 | | |
919 | 891 | | |
920 | 892 | | |
| |||
936 | 908 | | |
937 | 909 | | |
938 | 910 | | |
939 | | - | |
940 | | - | |
941 | 911 | | |
942 | 912 | | |
943 | 913 | | |
| |||
0 commit comments