### Summary

Add type hints to `ansible.utils.display::Display`

### Issue Type

Feature Idea

### Component Name

lib/ansible/utils/display.py
for connection_type in C.MAGIC_VARIABLE_MAPPING.get('connection'):
                if connection_type in delegated_vars:
                    break
            else:
                remote_addr_local = new_info.remote_addr in C.LOCALHOST
                inv_hostname_local = delegated_vars.get('inventory_hostname') in C.LOCALHOST
                if remote_addr_local and inv_hostname_local:
                    setattr(new_info, 'connection', 'local')
                elif getattr(new_info, 'connection', None) == 'local' and (not remote_addr_local or not inv_hostname_local):
                    setattr(new_info, 'connection', C.DEFAULT_TRANSPORT)
        
        
        if new_info.connection == 'local':
            if not new_info.connection_user:
                new_info.connection_user = new_info.remote_user
        
        
        if new_info.remote_addr == 'inventory_hostname':
            new_info.remote_addr = variables.get('inventory_hostname')
            display.warning('The "%s" connection plugin has an improperly configured remote target value, '
                            'forcing "inventory_hostname" templated value instead of the string' % new_info.connection)
        
        if new_info.no_log is None:
            new_info.no_log = C.DEFAULT_NO_LOG
        if task.check_mode is not None:
            new_info.check_mode = task.check_mode
        if task.diff is not None:
            new_info.diff = task.diff
        return new_info
    def set_become_plugin(self, plugin):