<s> from django . template . loader import render_to_string <EOL> from tasks . const import STATUS_SUCCESS <EOL> from . base import library <EOL> @ library . register ( '<STR_LIT>' ) <EOL> def coverage_violation ( data ) : <EOL> """<STR_LIT>""" <EOL> data [ '<STR_LIT:status>' ] = STATUS_SUCCESS <EOL> line = data [ '<STR_LIT>' ] . split ( '<STR_LIT:\n>' ) [ - <NUM_LIT:2> ] <EOL> statements , miss , cover = [ <EOL> part for part in line . split ( '<STR_LIT:U+0020>' ) <EOL> if len ( part ) > <NUM_LIT:0> and '<STR_LIT>' not in part <EOL> ] <EOL> each_file = [ <EOL> filter ( len , line . split ( '<STR_LIT:U+0020>' ) ) <EOL> for line in data [ '<STR_LIT>' ] . split ( '<STR_LIT:\n>' ) [ <NUM_LIT:2> : - <NUM_LIT:3> ] <EOL> ] <EOL> data [ '<STR_LIT>' ] = render_to_string ( '<STR_LIT>' , { <EOL> '<STR_LIT>' : statements , <EOL> '<STR_LIT>' : miss , <EOL> '<STR_LIT>' : cover , <EOL> } ) <EOL> data [ '<STR_LIT>' ] = render_to_string ( '<STR_LIT>' , { <EOL> '<STR_LIT>' : statements , <EOL> '<STR_LIT>' : miss , <EOL> '<STR_LIT>' : cover , <EOL> '<STR_LIT>' : each_file , <EOL> } ) <EOL> data [ '<STR_LIT>' ] = { <EOL> '<STR_LIT>' : int ( cover [ : - <NUM_LIT:1> ] ) , <EOL> } <EOL> data [ '<STR_LIT>' ] = int ( cover [ : - <NUM_LIT:1> ] ) <EOL> return data </s>
