[PATCH 21 of 23 yams] [fix] correct keyword arguments for call

Laurent Peuch cortex at worlddomination.be
Fri Feb 14 16:00:11 CET 2020


# HG changeset patch
# User Laurent Peuch <cortex at worlddomination.be>
# Date 1580318124 -3600
#      Wed Jan 29 18:15:24 2020 +0100
# Node ID ee5177e419541f8ba13ec76b4f4e1a8a8ac15f7a
# Parent  22f2f37e8c652d6b754d44ff33ead3ca73d3c0c1
# Available At https://hg.logilab.org/users/lpeuch/yams
#              hg pull https://hg.logilab.org/users/lpeuch/yams -r ee5177e41954
[fix] correct keyword arguments for call

I'm not 100% sure about those modification, here is the type signature of schema2dot:

    def schema2dot(schema=None, outputfile: Optional[str] = None, skiptypes=(),
                   visitor=None, prophdlr=None, size=None) -> Any:

Also I'm really suspecting that this code is dead code since no one has
launched it since year to raise this bug.

diff --git a/yams/tools.py b/yams/tools.py
--- a/yams/tools.py
+++ b/yams/tools.py
@@ -130,9 +130,8 @@ def schema_image() -> int:
         out = tmp_file.name
 
     schema2dot.schema2dot(schema, out,  # size=size,
-                          skiprels=("identity",),
-                          skipentities=("Person", "AbstractPerson", "Card", "AbstractCompany",
-                                        "Company", "Division"))
+                          skiptypes=("Person", "AbstractPerson", "Card", "AbstractCompany",
+                                     "Company", "Division"))
 
     if viewer:
         p = Popen((viewer, out))



More information about the cubicweb-devel mailing list