Skip to content

Commit 47f50bf

Browse files
committed
merge from master artifact
1 parent 061ddf4 commit 47f50bf

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.isort.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[settings]
22
# sort and black fight over the formatting of this file.
33
# Remove when this issue is resolved.
4-
skip=pymathics/graph/base.py
4+
skip=pymathics/graph/base.py,pymathics/graph/properties.py

pymathics/graph/properties.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,11 @@ def eval(self, graph, expression, evaluation, options):
9191

9292
class DirectedGraphQ(_NetworkXBuiltin):
9393
"""
94+
<dl>
95+
<dt>'DirectedGraphQ'[$graph$]
96+
<dd>True if $graph$ is a 'Graph' and all the edges are directed.
97+
</dl>
98+
9499
>> g = Graph[{1 -> 2, 2 -> 3}]; DirectedGraphQ[g]
95100
= True
96101
@@ -108,8 +113,7 @@ def eval(self, graph, expression, evaluation, options):
108113
"%(name)s[graph_, OptionsPattern[%(name)s]]"
109114
graph = self._build_graph(graph, evaluation, options, expression, quiet=True)
110115
if graph:
111-
directed = graph.G.is_directed() and not graph.is_mixed_graph()
112-
return from_python(directed)
116+
return from_python(graph.is_directed())
113117
else:
114118
return SymbolFalse
115119

0 commit comments

Comments
 (0)