fix(yams serialisation): Fix ordered_nodes to handle multi heritage

This function is used by yams to serialize to python Yams schema.
This is needed for the owl2yams project
12 jobs for !46 with topic/default/ordered_graph_multi_heritage in 1 minute and 5 seconds (queued for 29 seconds)
latest detached
Status Name Job ID Coverage
  Lint
passed black #463538
lint black

00:00:34

passed check-manifest #463541
lint check-manifest

00:00:33

passed flake8 #463539
lint flake8

00:00:38

failed mypy #463540
lint mypy allowed to fail

00:01:01

 
  Tests
failed py3 #463542
tests py3

00:00:35

failed py38 #463543
tests py3

00:00:16

 
  After Tests
skipped trigger-cubicweb-pipeline
skipped trigger-logilab-constraint-pipeline
skipped trigger-logilab-database-pipeline
skipped trigger-logilab-mtconverter-pipeline
skipped trigger-rql-pipeline
skipped trigger-yams-pipeline
 
Name Stage Failure
failed
mypy Lint
logilab/common/optik_ext.py:364: note: This violates the Liskov substitution principle
logilab/common/optik_ext.py:364: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides
logilab/common/optik_ext.py:370: error: Argument 1 to "format_option_strings" of "HelpFormatter" has incompatible type "OptionParser"; expected "Option"
Found 6 errors in 3 files (checked 41 source files)
ERROR: InvocationError for command /builds/open-source/logilab-common/.tox/mypy/bin/mypy --ignore-missing-imports logilab (exited with code 1)
___________________________________ summary ____________________________________
ERROR: mypy: commands failed
Cleaning up file based variables
ERROR: Job failed: command terminated with exit code 1
failed
py3 Tests
Uploading artifacts for failed job
Uploading artifacts...
py3-deprecated-warnings.json: found 1 matching files and directories

Uploading artifacts as "archive" to coordinator... ok
id=463542 responseStatus=201 Created token=axUsHveV
Uploading artifacts...
report.xml: found 1 matching files and directories

Uploading artifacts as "junit" to coordinator... ok
id=463542 responseStatus=201 Created token=axUsHveV
Cleaning up file based variables
ERROR: Job failed: command terminated with exit code 1
failed
py38 Tests
Uploading artifacts for failed job
Uploading artifacts...
WARNING: py3-deprecated-warnings.json: no matching files
ERROR: No files to upload
Uploading artifacts...
WARNING: report.xml: no matching files
ERROR: No files to upload
Cleaning up file based variables
ERROR: Job failed: command terminated with exit code 1