          else:
              header = results
              style = 'detail'
  
          columns = [key for key in header.keys() if key != 'url']
          details = [key for key in header.keys() if key != 'url']
  
          context['style'] = style
          context['columns'] = columns
          context['details'] = details
          context['results'] = results
 
</s> remove         for key in self.params.keys():
 </s> add         for key in self.params: </s> remove         for key in kwargs.keys():
 </s> add         for key in kwargs: </s> remove         for key in self._data.keys():
 </s> add         for key in self._data: </s> remove                 for key in queryset.query.annotations.keys()
 </s> add                 for key in queryset.query.annotations </s> remove             actions = set(callback.actions.keys())
 </s> add             actions = set(callback.actions)
        columns = [key for key in header if key != 'url']
        details = [key for key in header if key != 'url']
          else:
              header = results
              style = 'detail'
  
        columns = [key for key in header if key != 'url']
        details = [key for key in header if key != 'url']
        columns = [key for key in header if key != 'url']
        details = [key for key in header if key != 'url']
  
          context['style'] = style
          context['columns'] = columns
          context['details'] = details
          context['results'] = results
keep keep keep keep replace replace keep keep keep keep keep
 Perfer iter(dict) over iter(dict.keys()) (#5736)

Calling dict.keys() is unnecessary. The two are functionally equivalent
on modern Pythons.

Inspired by Lennart Regebro's talk "Prehistoric Patterns in Python" from
PyCon 2017.

https://www.youtube.com/watch?v=V5-JH23Vk0I 
rest_framework/renderers.py