Skip to content

Commit

Permalink
[#3192] test_string_literals_are_prefixed: relax about data_dict['id']
Browse files Browse the repository at this point in the history
  • Loading branch information
wardi committed Aug 27, 2016
1 parent 4335fc1 commit 1f0a842
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ckan/tests/test_coding_standards.py
Expand Up @@ -219,8 +219,10 @@ def find_unprefixed_string_literals(filename):
break
except ValueError:
continue
first_char = lines[lineno][col_offset]
if first_char not in u'ub': # Don't allow capital U and B either
leading = lines[lineno][col_offset - 1:col_offset + 1]
if leading[:-1] == u'[': # data['id'] is unambiguous, ignore these
continue
if leading[-1:] not in u'ub': # Don't allow capital U and B either
problems.append((lineno + 1, col_offset + 1))
return sorted(problems)

Expand Down

0 comments on commit 1f0a842

Please sign in to comment.