third_party/blink/tools/blinkpy/common/checkout/baseline_optimizer.py
def _results_by_port_name(self, results_by_directory):
        """Transforms a by-directory result dict to by-port-name.

        The method mimicks the baseline search behaviour, i.e. results[port] is
        the first baseline found on the baseline search path of the port. If no
        baseline is found on the search path, the test is assumed to be an all-
        PASS testharness.js test.

        Args:
            results_by_directory: A dictionary returned by read_results_by_directory().

        Returns:
            A dictionary mapping port names to their baselines.
        """
        results_by_port_name = {}
        for port_name, port in self._ports.items():
            for directory in self._relative_baseline_search_path(port):
                if directory in results_by_directory:
                    results_by_port_name[port_name] = results_by_directory[
                        directory]
                    break
            if port_name not in results_by_port_name:
                # Implicit extra result.
                results_by_port_name[port_name] = ResultDigest(None, None)
        return results_by_port_name
Transforms a by-directory result dict to by-port-name.

        The method mimicks the baseline search behaviour, i.e. results[port] is
        the first baseline found on the baseline search path of the port. If no
        baseline is found on the search path, the test is assumed to be an all-
        PASS testharness.js test.

        Args:
            results_by_directory: A dictionary returned by read_results_by_directory().

        Returns:
            A dictionary mapping port names to their baselines.
        
Transforms a by-directory result dict to by-port-name.
The method mimicks the baseline search behaviour, i.e. results[port] is
the first baseline found on the baseline search path of the port. If no
baseline is found on the search path, the test is assumed to be an all
PASS testharness.js test.
Transforms a by - directory result dict to by - port - name . The method mimicks the baseline search behaviour i . e . results [ port ] is the first baseline found on the baseline search path of the port . If no baseline is found on the search path the test is assumed to be an all PASS testharness . js test .
def _results_by_port_name(self, results_by_directory):
        results_by_port_name = {}
        for port_name, port in self._ports.items():
            for directory in self._relative_baseline_search_path(port):
                if directory in results_by_directory:
                    results_by_port_name[port_name] = results_by_directory[
                        directory]
                    break
            if port_name not in results_by_port_name:
                results_by_port_name[port_name] = ResultDigest(None, None)
        return results_by_port_name
def _results_by_port_name ( self , results_by_directory ) : results_by_port_name = { } for port_name , port in self . _ports . items ( ) : for directory in self . _relative_baseline_search_path ( port ) : if directory in results_by_directory : results_by_port_name [ port_name ] = results_by_directory [ directory ] break if port_name not in results_by_port_name : results_by_port_name [ port_name ] = ResultDigest ( None , None ) return results_by_port_name
Transforms a by-directory result dict to by-port-name.
Transforms a by - directory result dict to by - port - name .
"""Transforms a by-directory result dict to by-port-name.

        The method mimicks the baseline search behaviour, i.e. results[port] is
        the first baseline found on the baseline search path of the port. If no
        baseline is found on the search path, the test is assumed to be an all-
        PASS testharness.js test.

        Args:
            results_by_directory: A dictionary returned by read_results_by_directory().

        Returns:
            A dictionary mapping port names to their baselines.
        """ # Implicit extra result.
A dictionary mapping port names to their baselines.
A dictionary mapping port names to their baselines .
self
results_by_directory
A dictionary returned by read_results_by_directory().
A dictionary returned by read_results_by_directory () .