parameters: (
          self, function=None, firstresult=False, historic=False, warn_on_impl=None
      )
docstring: if passed a function, directly sets attributes on the function
          which will make it discoverable to :py:meth:`.PluginManager.add_hookspecs`.
          If passed no function, returns a decorator which can be applied to a function
          later using the attributes supplied.
  
          If ``firstresult`` is ``True`` the 1:N hook call (N being the number of registered
          hook implementation functions) will stop at I<=N when the I'th function
          returns a non-``None`` result.
  
          If ``historic`` is ``True`` calls to a hook will be memorized and replayed
          on later registered plugins.
docstring_summary: if passed a function, directly sets attributes on the function
          which will make it discoverable to :py:meth:`.PluginManager.add_hookspecs`.
          If passed no function, returns a decorator which can be applied to a function
          later using the attributes supplied.
docstring_tokens: if passed a function directly sets attributes on the function which will make it discoverable to : py : meth : . PluginManager . add_hookspecs . If passed no function returns a decorator which can be applied to a function later using the attributes supplied .
function: def __call__(
          self, function=None, firstresult=False, historic=False, warn_on_impl=None
      ):
          """if passed a function, directly sets attributes on the function
          which will make it discoverable to :py:meth:`.PluginManager.add_hookspecs`.
          If passed no function, returns a decorator which can be applied to a function
          later using the attributes supplied.
  
          If ``firstresult`` is ``True`` the 1:N hook call (N being the number of registered
          hook implementation functions) will stop at I<=N when the I'th function
          returns a non-``None`` result.
  
          If ``historic`` is ``True`` calls to a hook will be memorized and replayed
          on later registered plugins.
  
          """
  
          def setattr_hookspec_opts(func):
              if historic and firstresult:
                  raise ValueError("cannot have a historic firstresult hook")
              setattr(
                  func,
                  self.project_name + "_spec",
                  dict(
                      firstresult=firstresult,
                      historic=historic,
                      warn_on_impl=warn_on_impl,
                  ),
              )
              return func
  
          if function is not None:
              return setattr_hookspec_opts(function)
          else:
              return setattr_hookspec_opts
function_tokens: def __call__ ( self , function = None , firstresult = False , historic = False , warn_on_impl = None ) : def setattr_hookspec_opts ( func ) : if historic and firstresult : raise ValueError ( "cannot have a historic firstresult hook" ) setattr ( func , self . project_name + "_spec" , dict ( firstresult = firstresult , historic = historic , warn_on_impl = warn_on_impl , ) , ) return func if function is not None : return setattr_hookspec_opts ( function ) else : return setattr_hookspec_opts