parameters: (self, filename)
return_statement: return CythonModuleTracer(filename, py_file, c_file, self._c_files_map, self._file_path_map)
docstring: Try to find a C source file for a file path found by the tracer.
docstring_summary: Try to find a C source file for a file path found by the tracer.
docstring_tokens: Try to find a C source file for a file path found by the tracer .
function: def file_tracer(self, filename):
          """
          Try to find a C source file for a file path found by the tracer.
          """
          # TODO We need to pxd-files to the include map. For more info see pybuild.py
          # Currently skip such files, because they are not supported in Arcadia pybuild with coverage.
          if os.path.splitext(filename)[-1] not in ('.pyx', '.pxi'):
              return None
          if filename.startswith('<') or filename.startswith('memory:'):
              return None
          c_file = py_file = None
          filename = canonical_filename(filename)
          if self._c_files_map and filename in self._c_files_map:
              c_file = self._c_files_map[filename][0]
  
          if c_file is None:
              c_file, py_file = self._find_source_files(filename)
              if not c_file:
                  return None  # unknown file
  
              # parse all source file paths and lines from C file
              # to learn about all relevant source files right away (pyx/pxi/pxd)
              # FIXME: this might already be too late if the first executed line
              #        is not from the main .pyx file but a file with a different
              #        name than the .c file (which prevents us from finding the
              #        .c file)
              _, code = self._read_source_lines(c_file, filename)
              if code is None:
                  return None  # no source found
  
          if self._file_path_map is None:
              self._file_path_map = {}
          return CythonModuleTracer(filename, py_file, c_file, self._c_files_map, self._file_path_map)
function_tokens: def file_tracer ( self , filename ) : # TODO We need to pxd-files to the include map. For more info see pybuild.py # Currently skip such files, because they are not supported in Arcadia pybuild with coverage. if os . path . splitext ( filename ) [ - 1 ] not in ( '.pyx' , '.pxi' ) : return None if filename . startswith ( '<' ) or filename . startswith ( 'memory:' ) : return None c_file = py_file = None filename = canonical_filename ( filename ) if self . _c_files_map and filename in self . _c_files_map : c_file = self . _c_files_map [ filename ] [ 0 ] if c_file is None : c_file , py_file = self . _find_source_files ( filename ) if not c_file : return None # unknown file # parse all source file paths and lines from C file # to learn about all relevant source files right away (pyx/pxi/pxd) # FIXME: this might already be too late if the first executed line #        is not from the main .pyx file but a file with a different #        name than the .c file (which prevents us from finding the #        .c file) _ , code = self . _read_source_lines ( c_file , filename ) if code is None : return None # no source found if self . _file_path_map is None : self . _file_path_map = { } return CythonModuleTracer ( filename , py_file , c_file , self . _c_files_map , self . _file_path_map )