59cb786bc30a73fbe3c114ea4b8cdff338e9bb5c,lib/matplotlib/backend_tools.py,ToolHelpBase,format_shortcut,#Any#,1031

Before Change


            s = match.group(0)
            return "Shift+" + s if len(
                s) == 1 and s.isupper() else s.capitalize()
        if len(keysequence) == 1:
            return keysequence  // do not modify single characters
        return re.sub(r"\w{2,}|(?<=\+)\w", repl, keysequence)

    def _format_tool_keymap(self, name):
        keymaps = self.toolmanager.get_tool_keymap(name)
        return ", ".join(self.format_shortcut(keymap) for keymap in keymaps)

After Change


        Converts a shortcut string from the notation used in rc config to the
        standard notation for displaying shortcuts, e.g. "ctrl+a" -> "Ctrl+A".
        
        return (key_sequence if len(key_sequence) == 1 else
                re.sub(r"\+[A-Z]", r"+Shift\g<0>", key_sequence).title())

    def _format_tool_keymap(self, name):
        keymaps = self.toolmanager.get_tool_keymap(name)
        return ", ".join(self.format_shortcut(keymap) for keymap in keymaps)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: matplotlib/matplotlib
Commit Name: 59cb786bc30a73fbe3c114ea4b8cdff338e9bb5c
Time: 2018-04-18
Author: anntzer.lee@gmail.com
File Name: lib/matplotlib/backend_tools.py
Class Name: ToolHelpBase
Method Name: format_shortcut


Project Name: home-assistant/home-assistant
Commit Name: db23320659a711637b5164fbe6ae6db15cc48e48
Time: 2016-07-06
Author: dale3h@gmail.com
File Name: homeassistant/components/sensor/apcupsd.py
Class Name:
Method Name: setup_platform


Project Name: streamlit/streamlit
Commit Name: 3e96b208fe5bc38223eb453b68a03dae51a33544
Time: 2018-10-22
Author: thiagot@gmail.com
File Name: lib/streamlit/caseconverters.py
Class Name:
Method Name: to_lower_camel_case