Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid unnecessary warning message when plotting is not enabled (#2380)
1. Please describe how your code solves the related issue. import graphviz seems also introduces a set of warning message like ``` DEBUG graphviz._tools:_tools.py:147 deprecate positional args: graphviz.graphs.BaseGraph.__init__(['comment', 'filename', 'directory', 'format', 'engine', 'encoding', 'graph_attr', 'node_attr', 'edge_attr', 'body', 'strict']) DEBUG graphviz._tools:_tools.py:147 deprecate positional args: graphviz.sources.Source.from_file(['directory', 'format', 'engine', 'encoding', 'renderer', 'formatter']) DEBUG graphviz._tools:_tools.py:147 deprecate positional args: graphviz.sources.Source.__init__(['filename', 'directory', 'format', 'engine', 'encoding']) DEBUG graphviz._tools:_tools.py:147 deprecate positional args: graphviz.sources.Source.save(['directory']) ``` the warnings are very noisy even if plotting is disabled. move the import below the check of plotting enablement so that those debugging message does not shown up if plotting is disabled.
- Loading branch information