import sys
import os


from tvcm import project as project_module


class TraceViewerProject(project_module.Project):
  trace_viewer_path = os.path.abspath(os.path.join(
      os.path.dirname(__file__), '..'))

  src_path = os.path.abspath(os.path.join(
      trace_viewer_path, 'trace_viewer'))

  trace_viewer_third_party_path = os.path.abspath(os.path.join(
      trace_viewer_path, 'third_party'))

  jszip_path = os.path.abspath(os.path.join(
      trace_viewer_third_party_path, 'jszip'))

  test_data_path = os.path.join(trace_viewer_path, 'test_data')
  skp_data_path = os.path.join(trace_viewer_path, 'skp_data')

  def __init__(self):
    super(TraceViewerProject, self).__init__(
      [self.src_path, self.jszip_path])

import sys
import os


from tvcm import project as project_module


class TraceViewerProject(project_module.Project):
  trace_viewer_path = os.path.abspath(os.path.join(
      os.path.dirname(__file__), '..'))

  src_path = os.path.abspath(os.path.join(
      trace_viewer_path, 'trace_viewer'))

  trace_viewer_third_party_path = os.path.abspath(os.path.join(
      trace_viewer_path, 'third_party'))

  jszip_path = os.path.abspath(os.path.join(
      trace_viewer_third_party_path, 'jszip'))

  test_data_path = os.path.join(trace_viewer_path, 'test_data')
  skp_data_path = os.path.join(trace_viewer_path, 'skp_data')

  def __init__(self, other_paths=None):
    paths = [self.src_path, self.jszip_path]
    if other_paths:
      paths.extend(other_paths)
    super(TraceViewerProject, self).__init__(
      paths)

Allow other_paths to be passed into TraceViewerProject
Allow other_paths to be passed into TraceViewerProject

This allows external embedders to subclass TraceViewerProject and thus
use trace viewer.
  import sys
  import os
  
  
  from tvcm import project as project_module
  
  
  class TraceViewerProject(project_module.Project):
    trace_viewer_path = os.path.abspath(os.path.join(
        os.path.dirname(__file__), '..'))
  
    src_path = os.path.abspath(os.path.join(
        trace_viewer_path, 'trace_viewer'))
  
    trace_viewer_third_party_path = os.path.abspath(os.path.join(
        trace_viewer_path, 'third_party'))
  
    jszip_path = os.path.abspath(os.path.join(
        trace_viewer_third_party_path, 'jszip'))
  
    test_data_path = os.path.join(trace_viewer_path, 'test_data')
    skp_data_path = os.path.join(trace_viewer_path, 'skp_data')
  
-   def __init__(self):
+   def __init__(self, other_paths=None):
+     paths = [self.src_path, self.jszip_path]
+     if other_paths:
+       paths.extend(other_paths)
      super(TraceViewerProject, self).__init__(
-       [self.src_path, self.jszip_path])
+       paths)
  
Allow other_paths to be passed into TraceViewerProject
## Code Before:
import sys
import os


from tvcm import project as project_module


class TraceViewerProject(project_module.Project):
  trace_viewer_path = os.path.abspath(os.path.join(
      os.path.dirname(__file__), '..'))

  src_path = os.path.abspath(os.path.join(
      trace_viewer_path, 'trace_viewer'))

  trace_viewer_third_party_path = os.path.abspath(os.path.join(
      trace_viewer_path, 'third_party'))

  jszip_path = os.path.abspath(os.path.join(
      trace_viewer_third_party_path, 'jszip'))

  test_data_path = os.path.join(trace_viewer_path, 'test_data')
  skp_data_path = os.path.join(trace_viewer_path, 'skp_data')

  def __init__(self):
    super(TraceViewerProject, self).__init__(
      [self.src_path, self.jszip_path])

## Instruction:
Allow other_paths to be passed into TraceViewerProject
## Code After:
import sys
import os


from tvcm import project as project_module


class TraceViewerProject(project_module.Project):
  trace_viewer_path = os.path.abspath(os.path.join(
      os.path.dirname(__file__), '..'))

  src_path = os.path.abspath(os.path.join(
      trace_viewer_path, 'trace_viewer'))

  trace_viewer_third_party_path = os.path.abspath(os.path.join(
      trace_viewer_path, 'third_party'))

  jszip_path = os.path.abspath(os.path.join(
      trace_viewer_third_party_path, 'jszip'))

  test_data_path = os.path.join(trace_viewer_path, 'test_data')
  skp_data_path = os.path.join(trace_viewer_path, 'skp_data')

  def __init__(self, other_paths=None):
    paths = [self.src_path, self.jszip_path]
    if other_paths:
      paths.extend(other_paths)
    super(TraceViewerProject, self).__init__(
      paths)
