@task
@needs('pavelib.prereqs.install_python_prereqs')
@cmdopts([('system=', 's', 'System to act on')])
@timed
def find_fixme(options):
 num_fixme = 0
 systems = getattr(options, 'system', ALL_SYSTEMS).split(',')
 for system in systems:
  report_dir = (Env.REPORT_DIR / system).makedirs_p()
  apps_list = ' '.join(top_python_dirs(system))
  pythonpath_prefix = 'PYTHONPATH={system}/djangoapps:common/djangoapps:common/lib'.format(system=system)
  sh('{pythonpath_prefix} pylint --disable R,C,W,E --enable=fixme --msg-template={msg_template} {apps} | tee {report_dir}/pylint_fixme.report'.format(pythonpath_prefix=pythonpath_prefix, msg_template='"{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}"', apps=apps_list, report_dir=report_dir))
  num_fixme += _count_pylint_violations('{report_dir}/pylint_fixme.report'.format(report_dir=report_dir))
 print ('Number of pylint fixmes: ' + str(num_fixme))

@ task @ needs ( 'pavelib.prereqs.install_python_prereqs' ) @ cmdopts ( [ ( 'system=' , 's' , 'System to act on' ) ] ) @ timed def find_fixme ( options ) : num_fixme = 0 systems = getattr ( options , 'system' , ALL_SYSTEMS ) . split ( ',' ) for system in systems : report_dir = ( Env . REPORT_DIR / system ) . makedirs_p ( ) apps_list = ' ' . join ( top_python_dirs ( system ) ) pythonpath_prefix = 'PYTHONPATH={system}/djangoapps:common/djangoapps:common/lib' . format ( system = system ) sh ( '{pythonpath_prefix} pylint --disable R,C,W,E --enable=fixme --msg-template={msg_template} {apps} | tee {report_dir}/pylint_fixme.report' . format ( pythonpath_prefix = pythonpath_prefix , msg_template = '"{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}"' , apps = apps_list , report_dir = report_dir ) ) num_fixme += _count_pylint_violations ( '{report_dir}/pylint_fixme.report' . format ( report_dir = report_dir ) ) print ( 'Number of pylint fixmes: ' + str ( num_fixme ) )
run pylint on system code .