parameters: (self)
docstring: Emit all stored warnings.
docstring_summary: Emit all stored warnings.
docstring_tokens: Emit all stored warnings .
function: def flush(self):
          """
          Emit all stored warnings.
          """
          def key(arg):
              # It is possible through codegen to create entirely identical
              # warnings, this leads to comparing types when sorting which breaks
              # on Python 3. Key as str() and if the worse happens then `id`
              # creates some uniqueness
              return str(arg) + str(id(arg))
  
          for (filename, lineno, category), messages in sorted(
                  self._warnings.items(), key=key):
              for msg in sorted(messages):
                  warnings.warn_explicit(msg, category, filename, lineno)
          self._warnings.clear()
function_tokens: def flush ( self ) : def key ( arg ) : # It is possible through codegen to create entirely identical # warnings, this leads to comparing types when sorting which breaks # on Python 3. Key as str() and if the worse happens then `id` # creates some uniqueness return str ( arg ) + str ( id ( arg ) ) for ( filename , lineno , category ) , messages in sorted ( self . _warnings . items ( ) , key = key ) : for msg in sorted ( messages ) : warnings . warn_explicit ( msg , category , filename , lineno ) self . _warnings . clear ( )