Skip to content

Commit

Permalink
draw options
Browse files Browse the repository at this point in the history
  • Loading branch information
seperman committed Jan 4, 2019
1 parent 1737802 commit 1d034eb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion fast_autocomplete/__init__.py
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
5 changes: 3 additions & 2 deletions fast_autocomplete/draw.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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()
Expand Down

0 comments on commit 1d034eb

Please sign in to comment.