diff --git a/fast_autocomplete/__init__.py b/fast_autocomplete/__init__.py index bd6b202..db5bf68 100644 --- a/fast_autocomplete/__init__.py +++ b/fast_autocomplete/__init__.py @@ -1,5 +1,5 @@ # flake8: noqa -__version__ = '0.2.0' +__version__ = '0.2.1' import sys pyversion = float(sys.version[:3]) if pyversion < 3.6: diff --git a/fast_autocomplete/draw.py b/fast_autocomplete/draw.py index ba0f1da..6f8a4c8 100644 --- a/fast_autocomplete/draw.py +++ b/fast_autocomplete/draw.py @@ -8,7 +8,7 @@ class DrawGraphMixin: DRAW_POPULATION_ANIMATION_FILENO_PADDING = 6 SHOW_OBJ_IDS_OF_WORDS = {} - def draw_graph(self, file_path): + def draw_graph(self, file_path, agraph_kwargs=None): """ Draws the graph of autocomplete words. @@ -22,7 +22,8 @@ def draw_graph(self, file_path): except ImportError: print('You need to install pygraphviz in order to draw graphs') - graph = pgv.AGraph(strict=False, directed=True) + agraph_kwargs = agraph_kwargs if agraph_kwargs else {} + graph = pgv.AGraph(strict=False, directed=True, **agraph_kwargs) edges = set() que = collections.deque()