Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
graph-tool
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jeff Trull
graph-tool
Commits
cd6966c6
Commit
cd6966c6
authored
Jul 08, 2020
by
Tiago Peixoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Graph.list_properties(): fix spacing
parent
cfd37051
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
src/graph_tool/__init__.py
src/graph_tool/__init__.py
+4
-4
No files found.
src/graph_tool/__init__.py
View file @
cd6966c6
...
...
@@ -2559,17 +2559,17 @@ class Graph(object):
if
len
(
self
.
__properties
)
==
0
:
return
w
=
max
(
[
len
(
x
[
0
])
for
x
in
list
(
self
.
__properties
.
keys
())])
+
4
w
=
w
if
w
>
14
else
14
w
=
max
(
max
([
len
(
x
[
1
])
for
x
in
list
(
self
.
__properties
.
keys
())])
+
4
,
14
)
for
k
,
v
in
self
.
graph_properties
.
items
():
pref
=
"%%-%ds (graph) (type: %%s, val: "
%
w
%
(
k
,
v
.
value_type
())
pref
=
"%%-%ds (graph) (type: %%s, val: "
%
w
%
(
k
,
v
.
value_type
())
val
=
str
(
v
[
self
])
if
len
(
val
)
>
1000
:
val
=
val
[:
1000
]
+
"..."
tw
=
terminal_size
()[
0
]
val
=
textwrap
.
fill
(
val
,
width
=
max
(
tw
-
len
(
pref
),
1
))
width
=
max
(
tw
-
len
(
pref
)
-
1
,
1
))
val
=
val
.
replace
(
"
\n
"
,
"
\n
"
+
" "
*
len
(
pref
))
print
(
"%s%s)"
%
(
pref
,
val
))
for
k
,
v
in
sorted
(
self
.
vertex_properties
.
items
(),
key
=
lambda
k
:
k
[
0
]):
...
...
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