message: drakefile: Improve linting.
diff: -import drake
  +'''Drake bootstrap drakefile'''
  +
  import os
  import shutil
  import sys
  +import drake
  +
  # Put ourselves in the path.
  PYTHONPATH = ''
  if 'PYTHONPATH' in os.environ:
  PYTHONPATH = os.environ['PYTHONPATH']
  -source = '%s/%s' % (os.getcwd(), drake.path_source('src'))
  -PYTHONPATH = '%s:%s' % (source, PYTHONPATH)
  +SOURCE = '%s/%s' % (os.getcwd(), drake.path_source('src'))
  +PYTHONPATH = '%s:%s' % (SOURCE, PYTHONPATH)
  os.environ['PYTHONPATH'] = PYTHONPATH
  def configure(prefix='.', coverage: bool = False):
  @@ -110,6 +113,7 @@ def configure(prefix = '.', coverage: bool = False):
  )
  runner.reporting = drake.Runner.Reporting.on_failure
  check << runner.status
  +
  # Old style tests
  tests = [
  @@ -131,6 +135,8 @@ def configure(prefix = '.', coverage: bool = False):
  class Tester(drake.Builder):
  + '''Copy the whole test tree and run test script there.'''
  +
  def __init__(self, name):
  self.__name = name
  path = drake.Path('tests') / drake.Path(name)
  @@ -139,16 +145,16 @@ def configure(prefix = '.', coverage: bool = False):
  drake.Builder.__init__(self, [self.__exe] + sources, [self.__target])
  def execute(self):
  - fr = str(self.__exe.path().dirname())
  - to = str(self.__exe.name().dirname())
  + source = str(self.__exe.path().dirname())
  + dest = str(self.__exe.name().dirname())
  try:
  - shutil.rmtree(to)
  - except OSError as e:
  - if e.errno == 2:
  + shutil.rmtree(dest)
  + except OSError as error:
  + if error.errno == 2:
  pass
  else:
  raise
  - shutil.copytree(fr, to)
  + shutil.copytree(source, dest)
  cmd = [str(drake.Path(os.getcwd()) / self.__exe.path())]
  if coverage is not None:
  cmd = coverage + cmd
  @@ -156,12 +162,13 @@ def configure(prefix = '.', coverage: bool = False):
  # Use an absolute path, because we chdir, and
  # "./test" isn't very helpful in backtraces.
  cmd,
  - cwd = to)
  + cwd=dest)
  if res:
  self.__target.path().touch()
  return res
  def target(self):
  + '''Test status output node'''
  return self.__target
  for test in tests:
  