Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Tiago Peixoto
graph-tool
Commits
dfa0fa1d
Commit
dfa0fa1d
authored
Apr 01, 2020
by
Alex Henrie
Browse files
Use collections.abc.Iterable instead of collections.Iterable
parent
3c47097d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/graph_tool/__init__.py
View file @
dfa0fa1d
...
...
@@ -129,7 +129,7 @@ import weakref
import
copy
import
textwrap
import
io
import
collections
import
collections
.abc
import
itertools
import
csv
...
...
@@ -2356,7 +2356,7 @@ class Graph(object):
"""
back
=
self
.
__graph
.
get_num_vertices
(
False
)
-
1
is_iter
=
isinstance
(
vertex
,
collections
.
Iterable
)
is_iter
=
isinstance
(
vertex
,
collections
.
abc
.
Iterable
)
if
is_iter
:
try
:
vs
=
numpy
.
asarray
(
vertex
,
dtype
=
"int64"
)
...
...
@@ -3496,7 +3496,7 @@ class GraphView(Graph):
if
efilt
is
not
None
:
if
not
isinstance
(
efilt
,
PropertyMap
):
emap
=
self
.
new_edge_property
(
"bool"
)
if
isinstance
(
efilt
,
collections
.
Iterable
):
if
isinstance
(
efilt
,
collections
.
abc
.
Iterable
):
emap
.
fa
=
efilt
else
:
for
e
in
g
.
edges
():
...
...
@@ -3516,7 +3516,7 @@ class GraphView(Graph):
if
vfilt
is
not
None
:
if
not
isinstance
(
vfilt
,
PropertyMap
):
vmap
=
self
.
new_vertex_property
(
"bool"
)
if
isinstance
(
vfilt
,
collections
.
Iterable
):
if
isinstance
(
vfilt
,
collections
.
abc
.
Iterable
):
vmap
.
fa
=
vfilt
else
:
for
v
in
g
.
vertices
():
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment