mirror of
https://github.com/vale981/emacs-jupyter
synced 2025-03-05 07:41:37 -05:00
Silence cl-defgeneric
warnings
This commit is contained in:
parent
e2af374d01
commit
7d7cf4716b
9 changed files with 25 additions and 22 deletions
|
@ -393,7 +393,7 @@ Adds the method `jupyter-add-finalizer' which maintains a list of
|
|||
finalizer functions to be called when the object is garbage
|
||||
collected.")
|
||||
|
||||
(cl-defgeneric jupyter-add-finalizer ((obj jupyter-finalized-object) finalizer)
|
||||
(cl-defmethod jupyter-add-finalizer ((obj jupyter-finalized-object) finalizer)
|
||||
"Cleanup resources automatically.
|
||||
FINALIZER if a function to be added to a list of finalizers that
|
||||
will be called when OBJ is garbage collected."
|
||||
|
|
|
@ -1117,7 +1117,7 @@ STR is displayed after the region."
|
|||
|
||||
(define-jupyter-client-handler execute-reply)
|
||||
|
||||
(cl-defgeneric jupyter-handle-payload ((source symbol) _payload)
|
||||
(cl-defmethod jupyter-handle-payload ((source symbol) _payload)
|
||||
"Execute the action in a Jupyter PAYLOAD.
|
||||
SOURCE is the type of payload and PAYLOAD will be a property list
|
||||
containing the necessary information to perform the actions of
|
||||
|
|
|
@ -298,7 +298,10 @@ By default this adds the events quit, callback, and timer."
|
|||
;; Can only send lists at the moment
|
||||
(when (and res (listp res)) (zmq-prin1 res)))))
|
||||
|
||||
(cl-defgeneric jupyter-ioloop-add-callback ((ioloop jupyter-ioloop) cb)
|
||||
(cl-defgeneric jupyter-ioloop-add-callback ()
|
||||
(declare (indent 1)))
|
||||
|
||||
(cl-defmethod jupyter-ioloop-add-callback ((ioloop jupyter-ioloop) cb)
|
||||
"In IOLOOP, add CB to be run in the IOLOOP environment.
|
||||
CB is run at the start of every polling loop. Callbacks are
|
||||
called in the order they are added.
|
||||
|
@ -308,7 +311,6 @@ sending closures to the IOLOOP. An example:
|
|||
|
||||
(jupyter-ioloop-add-callback ioloop
|
||||
`(lambda () (zmq-prin1 'foo \"bar\")))"
|
||||
(declare (indent 1))
|
||||
(cl-assert (functionp cb))
|
||||
(cl-callf append (oref ioloop callbacks) (list cb))
|
||||
(when (process-live-p (oref ioloop process))
|
||||
|
@ -412,7 +414,7 @@ polling the STDIN file handle."
|
|||
(t
|
||||
(funcall handler event))))))
|
||||
|
||||
(cl-defgeneric jupyter-ioloop-start ((ioloop jupyter-ioloop)
|
||||
(cl-defmethod jupyter-ioloop-start ((ioloop jupyter-ioloop)
|
||||
handler
|
||||
&key buffer)
|
||||
"Start an IOLOOP.
|
||||
|
@ -450,7 +452,7 @@ the IOLOOP subprocess buffer, see `zmq-start-process'."
|
|||
(process-put process :stdin stdin))
|
||||
(jupyter-ioloop-wait-until ioloop 'start #'identity))))
|
||||
|
||||
(cl-defgeneric jupyter-ioloop-stop ((ioloop jupyter-ioloop))
|
||||
(cl-defmethod jupyter-ioloop-stop ((ioloop jupyter-ioloop))
|
||||
"Stop IOLOOP.
|
||||
Send a quit event to IOLOOP, wait until it actually quits before
|
||||
returning."
|
||||
|
|
|
@ -83,7 +83,7 @@ purposes of handling different forms of ARGS."
|
|||
(jupyter-kernelspec-name
|
||||
(jupyter-kernel-spec kernel)))
|
||||
|
||||
(cl-defgeneric jupyter-launch ((kernel jupyter-kernel))
|
||||
(cl-defmethod jupyter-launch ((kernel jupyter-kernel))
|
||||
"Launch KERNEL."
|
||||
(cl-assert (jupyter-alive-p kernel)))
|
||||
|
||||
|
@ -95,7 +95,7 @@ purposes of handling different forms of ARGS."
|
|||
"Notify that the kernel launched."
|
||||
(message "Launching %s kernel...done" (jupyter-kernel-name kernel)))
|
||||
|
||||
(cl-defgeneric jupyter-shutdown ((kernel jupyter-kernel))
|
||||
(cl-defmethod jupyter-shutdown ((kernel jupyter-kernel))
|
||||
"Shutdown KERNEL.
|
||||
Once a kernel has been shutdown it has no more connected clients
|
||||
and the process it represents no longer exists.
|
||||
|
@ -113,7 +113,7 @@ nil."
|
|||
"Notify that the kernel launched."
|
||||
(message "%s kernel shutdown...done" (jupyter-kernel-name kernel)))
|
||||
|
||||
(cl-defgeneric jupyter-restart ((kernel jupyter-kernel))
|
||||
(cl-defmethod jupyter-restart ((kernel jupyter-kernel))
|
||||
"Restart KERNEL.
|
||||
|
||||
The default implementation shuts down and then re-launches
|
||||
|
@ -121,7 +121,7 @@ KERNEL."
|
|||
(jupyter-shutdown kernel)
|
||||
(jupyter-launch kernel))
|
||||
|
||||
(cl-defgeneric jupyter-interrupt ((_kernel jupyter-kernel))
|
||||
(cl-defmethod jupyter-interrupt ((_kernel jupyter-kernel))
|
||||
"Interrupt KERNEL."
|
||||
(ignore))
|
||||
|
||||
|
|
|
@ -643,7 +643,7 @@ property."
|
|||
(save-excursion (jupyter-beginning-of-display) (point))
|
||||
(save-excursion (jupyter-end-of-display) (point)))))
|
||||
|
||||
(cl-defgeneric jupyter-update-display ((display-id string) data &optional metadata)
|
||||
(cl-defmethod jupyter-update-display ((display-id string) data &optional metadata)
|
||||
"Update the display with DISPLAY-ID using DATA.
|
||||
DATA and METADATA have the same meaning as in a `:display-data'
|
||||
message."
|
||||
|
|
|
@ -1996,8 +1996,7 @@ have the same `major-mode' as the client's kernel language and
|
|||
|
||||
;;; Starting a REPL
|
||||
|
||||
(cl-defgeneric jupyter-bootstrap-repl ((client jupyter-repl-client)
|
||||
&optional repl-name associate-buffer display)
|
||||
(cl-defgeneric jupyter-bootstrap-repl (client &optional repl-name associate-buffer display)
|
||||
"Initialize a new REPL buffer based on CLIENT, return CLIENT.
|
||||
CLIENT should be a REPL client already connected to its kernel.
|
||||
|
||||
|
|
|
@ -499,7 +499,7 @@ error with the data being the error received by `url-retrieve'."
|
|||
jupyter-api-request-headers)
|
||||
(jupyter-api-get-kernelspec client)))))
|
||||
|
||||
(cl-defgeneric jupyter-api-authenticate ((client jupyter-rest-client) &rest args)
|
||||
(cl-defgeneric jupyter-api-authenticate (client &rest args)
|
||||
(declare (indent 1)))
|
||||
|
||||
(cl-defmethod jupyter-api-authenticate ((client jupyter-rest-client) (authenticator function))
|
||||
|
@ -651,7 +651,7 @@ will be '(:k1 ...)."
|
|||
"&"))))
|
||||
(cons endpoint plist)))
|
||||
|
||||
(cl-defgeneric jupyter-api-request ((client jupyter-rest-client) method &rest plist)
|
||||
(cl-defgeneric jupyter-api-request (client method &rest plist)
|
||||
(declare (indent 2)))
|
||||
|
||||
(cl-defmethod jupyter-api-request ((client jupyter-rest-client) method &rest plist)
|
||||
|
@ -720,7 +720,7 @@ the server."
|
|||
|
||||
;;;; Endpoints
|
||||
|
||||
(cl-defgeneric jupyter-api/kernels ((client jupyter-rest-client) method &rest plist)
|
||||
(cl-defgeneric jupyter-api/kernels (client method &rest plist)
|
||||
(declare (indent 2)))
|
||||
|
||||
(cl-defmethod jupyter-api/kernels ((client jupyter-rest-client) method &rest plist)
|
||||
|
@ -729,7 +729,7 @@ METHOD is the HTTP method to use. PLIST has the same meaning as
|
|||
in `jupyter-api-request'."
|
||||
(apply #'jupyter-api-request client method "api" "kernels" plist))
|
||||
|
||||
(cl-defgeneric jupyter-api/kernelspecs ((client jupyter-rest-client) method &rest plist)
|
||||
(cl-defgeneric jupyter-api/kernelspecs (client method &rest plist)
|
||||
(declare (indent 2)))
|
||||
|
||||
(cl-defmethod jupyter-api/kernelspecs ((client jupyter-rest-client) method &rest plist)
|
||||
|
@ -738,7 +738,7 @@ METHOD is the HTTP method to use. PLIST has the same meaning as
|
|||
in `jupyter-api-request'."
|
||||
(apply #'jupyter-api-request client method "api" "kernelspecs" plist))
|
||||
|
||||
(cl-defgeneric jupyter-api/contents ((client jupyter-rest-client) method &rest plist)
|
||||
(cl-defgeneric jupyter-api/contents (client method &rest plist)
|
||||
(declare (indent 2)))
|
||||
|
||||
(cl-defmethod jupyter-api/contents ((client jupyter-rest-client) method &rest plist)
|
||||
|
@ -747,7 +747,7 @@ METHOD is the HTTP method to use. PLIST has the same meaning as
|
|||
in `jupyter-api-request'."
|
||||
(apply #'jupyter-api-request client method "api" "contents" plist))
|
||||
|
||||
(cl-defgeneric jupyter-api/config ((client jupyter-rest-client) method &rest plist)
|
||||
(cl-defgeneric jupyter-api/config (client method &rest plist)
|
||||
(declare (indent 2)))
|
||||
|
||||
(cl-defmethod jupyter-api/config ((client jupyter-rest-client) method &rest plist)
|
||||
|
|
|
@ -207,12 +207,14 @@ use `jupyter-hb-unpause'."))
|
|||
(oset channel paused nil)
|
||||
(jupyter-hb--send-ping channel)))
|
||||
|
||||
(cl-defgeneric jupyter-hb-on-kernel-dead (channel fun)
|
||||
(declare (indent 1)))
|
||||
|
||||
(cl-defmethod jupyter-hb-on-kernel-dead ((channel jupyter-hb-channel) fun)
|
||||
"When the kernel connected to CHANNEL dies, call FUN.
|
||||
A kernel is considered dead when CHANNEL does not receive a
|
||||
response after \(* `jupyter-hb-max-failures' `time-to-dead'\)
|
||||
seconds has elapsed without the kernel sending a ping back."
|
||||
(declare (indent 1))
|
||||
(oset channel dead-cb fun))
|
||||
|
||||
(defun jupyter-hb--send-ping (channel &optional failed-count)
|
||||
|
|
|
@ -243,11 +243,11 @@ return nil."
|
|||
(:constructor org-babel-jupyter-remote-session))
|
||||
connect-repl-p)
|
||||
|
||||
(cl-defgeneric org-babel-jupyter-parse-session ((session string))
|
||||
(cl-defmethod org-babel-jupyter-parse-session ((session string))
|
||||
"Return a parsed representation of SESSION."
|
||||
(org-babel-jupyter-session :name session))
|
||||
|
||||
(cl-defgeneric org-babel-jupyter-initiate-client ((_session org-babel-jupyter-session) kernel)
|
||||
(cl-defmethod org-babel-jupyter-initiate-client ((_session org-babel-jupyter-session) kernel)
|
||||
"Launch SESSION's KERNEL, return a `jupyter-org-client' connected to it.
|
||||
SESSION is the :session header argument of a source block and
|
||||
KERNEL is the name of the kernel to launch."
|
||||
|
|
Loading…
Add table
Reference in a new issue