Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
bilby
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
26
Issues
26
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
12
Merge Requests
12
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lscsoft
bilby
Commits
bcec60d0
Commit
bcec60d0
authored
May 30, 2018
by
Moritz Huebner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moritz Huebner: Some more simplifications for __repr__
parent
9a4dbfbc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
13 deletions
+1
-13
tupak/prior.py
tupak/prior.py
+1
-13
No files found.
tupak/prior.py
View file @
bcec60d0
...
...
@@ -80,24 +80,12 @@ class Prior(object):
return
"{}({})"
.
format
(
prior_name
,
args
)
def
repr_format_helper
(
self
,
keys
):
string_keys
=
[]
non_string_keys
=
[]
property_names
=
[
p
for
p
in
dir
(
self
.
__class__
)
if
isinstance
(
getattr
(
self
.
__class__
,
p
),
property
)]
dict_with_properties
=
self
.
__dict__
.
copy
()
for
key
in
property_names
:
dict_with_properties
[
key
]
=
getattr
(
self
,
key
)
for
key
in
keys
:
if
isinstance
(
dict_with_properties
[
key
],
str
):
string_keys
.
append
(
key
)
else
:
non_string_keys
.
append
(
key
)
args
=
', '
.
join
([
'{}={}'
.
format
(
key
,
'
\"
'
+
dict_with_properties
[
key
]
+
'
\"
'
)
for
key
in
string_keys
])
if
len
(
string_keys
)
>
0
:
args
=
args
+
', '
args
=
args
+
', '
.
join
([
'{}={}'
.
format
(
key
,
dict_with_properties
[
key
])
for
key
in
non_string_keys
])
args
=
', '
.
join
([
'{}={}'
.
format
(
key
,
repr
(
dict_with_properties
[
key
]))
for
key
in
keys
])
return
args
@
property
...
...
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