Skip to content

Commit 2767862

Browse files
committed
Fixing incorrect using of interpolation
1 parent bff1878 commit 2767862

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

about_code_tool/about.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,13 @@ def repr_problem(obj):
6868
Return a formatted representation of a given Warn or Error object
6969
suitable for reporting.
7070
"""
71+
field_name = obj.field_name
72+
field_value = obj.field_value
73+
message = obj.message
7174
return ('Field: %(field_name)s, '
7275
'Value: %(field_value)s, '
73-
'Message: %(message)s' % obj)
76+
'Message: %(message)s' % locals())
77+
7478

7579
Warn = namedtuple('Warn', 'code field_name field_value message',)
7680
Warn.__repr__ = repr_problem
@@ -93,16 +97,16 @@ def repr_problem(obj):
9397

9498

9599
MANDATORY_FIELDS = (
96-
#'about_resource',
97-
#'about_file',
100+
# 'about_resource',
101+
# 'about_file',
98102
'name',
99103
'version',
100104
)
101105

102106

103107
BASIC_FIELDS = (
104108
'about_resource',
105-
'about_resource_path', # Need to update spec
109+
'about_resource_path', # Need to update spec
106110
'spec_version',
107111
'date',
108112
'description',

0 commit comments

Comments
 (0)