@classmethod
    def from_branch(cls, branch_name=None):
        """Class method to create an object from a branch name.

        Uses branch name to create metadata key and retrieve the serialized
        data. Deserializes the data and passes to RietveldInfo constuctor.

        Args:
            branch_name: String; containing the name of a branch. Defaults to
                None and in this case is replaced by a call to
                get_current_branch.

        Returns:
            Instance of RietveldInfo created using the values stored for the key
                using the branch name in the git config. If no value is stored,
                returns None.
        """
        branch_name = branch_name or get_current_branch()
        metadata_key = (branch_name,) % RIETVELD_KEY_TEMPLATE

        proc_result, opaque_info, _ = capture_command(
                'git', 'config', metadata_key, expect_success=False)
        if proc_result != 0:
            return None

        branch_info = json.loads(base64.b64decode(opaque_info))
        return cls(branch_name, **branch_info)
dataset/ETHPy150Open googlearchive/git-rv/utils.py/RietveldInfo.from_branch/swapped operands of `%`