parameters: (self, rules, line, dependee_path, fail_on_temp_allow=False)
return_statement: return True, None
docstring: Checks the given line with the given rule set.
  
      Returns a tuple (is_import, dependency_violation) where
      is_import is True only if the line is an import
      statement, and dependency_violation is an instance of
      results.DependencyViolation if the line violates a rule, or None
      if it does not.
docstring_summary: Checks the given line with the given rule set.
docstring_tokens: Checks the given line with the given rule set .
function: def CheckLine(self, rules, line, dependee_path, fail_on_temp_allow=False):
      """Checks the given line with the given rule set.
  
      Returns a tuple (is_import, dependency_violation) where
      is_import is True only if the line is an import
      statement, and dependency_violation is an instance of
      results.DependencyViolation if the line violates a rule, or None
      if it does not.
      """
      found_item = self._EXTRACT_IMPORT_PATH.match(line)
      if not found_item:
        return False, None  # Not a match
  
      import_path = found_item.group(1)
  
      if '\\' in import_path:
        return True, results.DependencyViolation(
            import_path,
            MessageRule('Import paths may not include backslashes.'),
            rules)
  
      if '/' not in import_path:
        # Don't fail when no directory is specified. We may want to be more
        # strict about this in the future.
        if self._verbose:
          print ' WARNING: import specified with no directory: ' + import_path
        return True, None
  
      if self._resolve_dotdot and '../' in import_path:
        dependee_dir = os.path.dirname(dependee_path)
        import_path = os.path.join(dependee_dir, import_path)
        import_path = os.path.relpath(import_path, self._root_dir)
  
      if not self.IsFullPath(import_path):
        return True, None
  
      rule = rules.RuleApplyingTo(import_path, dependee_path)
  
      if (rule.allow == Rule.DISALLOW or
          (fail_on_temp_allow and rule.allow == Rule.TEMP_ALLOW)):
        return True, results.DependencyViolation(import_path, rule, rules)
      return True, None
function_tokens: def CheckLine ( self , rules , line , dependee_path , fail_on_temp_allow = False ) : found_item = self . _EXTRACT_IMPORT_PATH . match ( line ) if not found_item : return False , None # Not a match import_path = found_item . group ( 1 ) if '\\' in import_path : return True , results . DependencyViolation ( import_path , MessageRule ( 'Import paths may not include backslashes.' ) , rules ) if '/' not in import_path : # Don't fail when no directory is specified. We may want to be more # strict about this in the future. if self . _verbose : print ' WARNING: import specified with no directory: ' + import_path return True , None if self . _resolve_dotdot and '../' in import_path : dependee_dir = os . path . dirname ( dependee_path ) import_path = os . path . join ( dependee_dir , import_path ) import_path = os . path . relpath ( import_path , self . _root_dir ) if not self . IsFullPath ( import_path ) : return True , None rule = rules . RuleApplyingTo ( import_path , dependee_path ) if ( rule . allow == Rule . DISALLOW or ( fail_on_temp_allow and rule . allow == Rule . TEMP_ALLOW ) ) : return True , results . DependencyViolation ( import_path , rule , rules ) return True , None