Silence checkdoc warnings

This commit is contained in:
Nathaniel Nicandro 2018-01-22 19:12:47 -06:00
parent 9e480c7e05
commit 066cc4efc0

View file

@ -35,7 +35,8 @@
(require 'jupyter-connection) (require 'jupyter-connection)
(require 'jupyter-channels) (require 'jupyter-channels)
(require 'jupyter-messages) (require 'jupyter-messages)
(eval-when-compile (require 'cl-macs))
(declare-function hash-table-values "subr-x" (hash-table))
(defvar jupyter--debug nil (defvar jupyter--debug nil
"Set to non-nil to emit sent and received messages to *Messages*.") "Set to non-nil to emit sent and received messages to *Messages*.")
@ -497,7 +498,7 @@ element in `:jupyter-pending-requests'."
;;; Channel subprocess filter/sentinel ;;; Channel subprocess filter/sentinel
(defun jupyter--ioloop-sentinel (client ioloop event) (defun jupyter--ioloop-sentinel (client _ioloop event)
"The process sentinel for CLIENT's IOLOOP subprocess. "The process sentinel for CLIENT's IOLOOP subprocess.
When EVENT is one of the events signifying that the process is When EVENT is one of the events signifying that the process is
dead, stop the heartbeat channel and set the IOLOOP slot to nil dead, stop the heartbeat channel and set the IOLOOP slot to nil
@ -543,6 +544,7 @@ by `jupyter--ioloop'."
;; Cleanup handled in sentinel ;; Cleanup handled in sentinel
(when jupyter--debug (when jupyter--debug
(message "CLIENT CLOSED"))))) (message "CLIENT CLOSED")))))
;;; Starting the channel subprocess ;;; Starting the channel subprocess
(cl-defmethod jupyter-start-channels ((client jupyter-kernel-client) (cl-defmethod jupyter-start-channels ((client jupyter-kernel-client)
@ -784,7 +786,7 @@ are taken:
;;; STDIN handlers ;;; STDIN handlers
(cl-defmethod jupyter-handle-message ((channel jupyter-stdin-channel) (cl-defmethod jupyter-handle-message ((_channel jupyter-stdin-channel)
client client
req req
msg) msg)
@ -794,7 +796,7 @@ are taken:
(jupyter-handle-input-reply client req prompt password))) (jupyter-handle-input-reply client req prompt password)))
(cl-defgeneric jupyter-handle-input-reply ((client jupyter-kernel-client) (cl-defgeneric jupyter-handle-input-reply ((client jupyter-kernel-client)
req _req
prompt prompt
password) password)
"Handle an input request from CLIENT's kernel. "Handle an input request from CLIENT's kernel.
@ -814,7 +816,7 @@ the user. Otherwise `read-from-minibuffer' is used."
;;; SHELL handlers ;;; SHELL handlers
;; http://jupyter-client.readthedocs.io/en/latest/messaging.html#messages-on-the-shell-router-dealer-channel ;; http://jupyter-client.readthedocs.io/en/latest/messaging.html#messages-on-the-shell-router-dealer-channel
(cl-defmethod jupyter-handle-message ((channel jupyter-shell-channel) (cl-defmethod jupyter-handle-message ((_channel jupyter-shell-channel)
client client
req req
msg) msg)
@ -822,7 +824,7 @@ the user. Otherwise `read-from-minibuffer' is used."
(let ((content (jupyter-message-content msg))) (let ((content (jupyter-message-content msg)))
;; TODO: How to handle errors? Let the IOPub error message handler deal ;; TODO: How to handle errors? Let the IOPub error message handler deal
;; with it? Or do something here? ;; with it? Or do something here?
(cl-destructuring-bind (&key status ename evalue &allow-other-keys) content (cl-destructuring-bind (&key status _ename _evalue &allow-other-keys) content
(if (member status '("error" "abort")) (if (member status '("error" "abort"))
;; FIXME: The python kernel will expect errors to be handled by an ;; FIXME: The python kernel will expect errors to be handled by an
;; execute-reply and not emit an error message through IOPub whereas ;; execute-reply and not emit an error message through IOPub whereas
@ -914,11 +916,11 @@ the user. Otherwise `read-from-minibuffer' is used."
:stop-on-error stop-on-error))) :stop-on-error stop-on-error)))
(jupyter-send client channel "execute_request" msg))) (jupyter-send client channel "execute_request" msg)))
(cl-defgeneric jupyter-handle-execute-reply ((client jupyter-kernel-client) (cl-defgeneric jupyter-handle-execute-reply ((_client jupyter-kernel-client)
req _req
execution-count _execution-count
user-expressions _user-expressions
payload) _payload)
"Default execute reply handler." "Default execute reply handler."
nil) nil)
@ -933,11 +935,11 @@ the user. Otherwise `read-from-minibuffer' is used."
:code code :pos pos :detail detail))) :code code :pos pos :detail detail)))
(jupyter-send client channel "inspect_request" msg))) (jupyter-send client channel "inspect_request" msg)))
(cl-defgeneric jupyter-handle-inspect-reply ((client jupyter-kernel-client) (cl-defgeneric jupyter-handle-inspect-reply ((_client jupyter-kernel-client)
req _req
found _found
data _data
metadata) _metadata)
"Default inspect reply handler." "Default inspect reply handler."
nil) nil)
@ -951,12 +953,12 @@ the user. Otherwise `read-from-minibuffer' is used."
:code code :pos pos))) :code code :pos pos)))
(jupyter-send client channel "complete_request" msg))) (jupyter-send client channel "complete_request" msg)))
(cl-defgeneric jupyter-handle-complete-reply ((client jupyter-kernel-client) (cl-defgeneric jupyter-handle-complete-reply ((_client jupyter-kernel-client)
req _req
matches _matches
cursor-start _cursor-start
cursor-end _cursor-end
metadata) _metadata)
"Default complete reply handler." "Default complete reply handler."
nil) nil)
@ -986,9 +988,9 @@ the user. Otherwise `read-from-minibuffer' is used."
:unique unique))) :unique unique)))
(jupyter-send client channel "history_request" msg))) (jupyter-send client channel "history_request" msg)))
(cl-defgeneric jupyter-handle-history-reply ((client jupyter-kernel-client) (cl-defgeneric jupyter-handle-history-reply ((_client jupyter-kernel-client)
req _req
history) _history)
"Default history reply handler." "Default history reply handler."
nil) nil)
@ -1001,10 +1003,10 @@ the user. Otherwise `read-from-minibuffer' is used."
:code code))) :code code)))
(jupyter-send client channel "is_complete_request" msg))) (jupyter-send client channel "is_complete_request" msg)))
(cl-defgeneric jupyter-handle-is-complete-reply ((client jupyter-kernel-client) (cl-defgeneric jupyter-handle-is-complete-reply ((_client jupyter-kernel-client)
req _req
status _status
indent) _indent)
"Default is complete reply handler." "Default is complete reply handler."
nil) nil)
@ -1017,9 +1019,9 @@ the user. Otherwise `read-from-minibuffer' is used."
:target-name target-name))) :target-name target-name)))
(jupyter-send client channel "comm_info_request" msg))) (jupyter-send client channel "comm_info_request" msg)))
(cl-defgeneric jupyter-handle-comm-info-reply ((client jupyter-kernel-client) (cl-defgeneric jupyter-handle-comm-info-reply ((_client jupyter-kernel-client)
req _req
comms) _comms)
"Default comm info. reply handler." "Default comm info. reply handler."
nil) nil)
@ -1029,14 +1031,14 @@ the user. Otherwise `read-from-minibuffer' is used."
(msg (jupyter-message-kernel-info-request))) (msg (jupyter-message-kernel-info-request)))
(jupyter-send client channel "kernel_info_request" msg))) (jupyter-send client channel "kernel_info_request" msg)))
(cl-defgeneric jupyter-handle-kernel-info-reply ((client jupyter-kernel-client) (cl-defgeneric jupyter-handle-kernel-info-reply ((_client jupyter-kernel-client)
req _req
protocol-version _protocol-version
implementation _implementation
implementation-version _implementation-version
language-info _language-info
banner _banner
help-links) _help-links)
"Default kernel-info reply handler." "Default kernel-info reply handler."
nil) nil)
@ -1048,15 +1050,15 @@ If RESTART is non-nil, request a restart instead of a complete shutdown."
(msg (jupyter-message-shutdown-request :restart restart))) (msg (jupyter-message-shutdown-request :restart restart)))
(jupyter-send client channel "shutdown_request" msg))) (jupyter-send client channel "shutdown_request" msg)))
(cl-defgeneric jupyter-handle-shutdown-reply ((client jupyter-kernel-client) (cl-defgeneric jupyter-handle-shutdown-reply ((_client jupyter-kernel-client)
req _req
restart) _restart)
"Default shutdown reply handler." "Default shutdown reply handler."
nil) nil)
;;; IOPUB handlers ;;; IOPUB handlers
(cl-defmethod jupyter-handle-message ((channel jupyter-iopub-channel) (cl-defmethod jupyter-handle-message ((_channel jupyter-iopub-channel)
client client
req req
msg) msg)
@ -1114,69 +1116,69 @@ If RESTART is non-nil, request a restart instead of a complete shutdown."
(_ (_
(warn "Message type not handled (%s)" (jupyter-message-type msg)))))) (warn "Message type not handled (%s)" (jupyter-message-type msg))))))
(cl-defgeneric jupyter-handle-stream ((client jupyter-kernel-client) (cl-defgeneric jupyter-handle-stream ((_client jupyter-kernel-client)
req _req
name _name
text) _text)
"Default stream handler." "Default stream handler."
nil) nil)
(cl-defgeneric jupyter-handle-execute-input ((client jupyter-kernel-client) (cl-defgeneric jupyter-handle-execute-input ((_client jupyter-kernel-client)
req _req
code _code
execution-count) _execution-count)
"Default execute input handler." "Default execute input handler."
nil) nil)
(cl-defgeneric jupyter-handle-execute-result ((client jupyter-kernel-client) (cl-defgeneric jupyter-handle-execute-result ((_client jupyter-kernel-client)
req _req
execution-count _execution-count
data _data
metadata) _metadata)
"Default execute result handler." "Default execute result handler."
nil) nil)
(cl-defgeneric jupyter-handle-error ((client jupyter-kernel-client) (cl-defgeneric jupyter-handle-error ((_client jupyter-kernel-client)
req _req
ename _ename
evalue _evalue
traceback) _traceback)
"Default error handler." "Default error handler."
nil) nil)
(cl-defgeneric jupyter-handle-status ((client jupyter-kernel-client) (cl-defgeneric jupyter-handle-status ((_client jupyter-kernel-client)
req _req
execution-state) _execution-state)
"Default status handler." "Default status handler."
nil) nil)
(cl-defgeneric jupyter-handle-clear-output ((client jupyter-kernel-client) (cl-defgeneric jupyter-handle-clear-output ((_client jupyter-kernel-client)
req _req
wait) _wait)
"Default clear output handler." "Default clear output handler."
nil) nil)
(cl-defgeneric jupyter-handle-display-data ((client jupyter-kernel-client) (cl-defgeneric jupyter-handle-display-data ((_client jupyter-kernel-client)
req _req
data _data
metadata _metadata
transient) _transient)
"Default display data handler." "Default display data handler."
nil) nil)
(cl-defgeneric jupyter-handle-display-data ((client jupyter-kernel-client) (cl-defgeneric jupyter-handle-display-data ((_client jupyter-kernel-client)
req _req
data _data
metadata _metadata
transient) _transient)
"Default display data handler." "Default display data handler."
nil) nil)
(cl-defgeneric jupyter-handle-update-display-data ((client jupyter-kernel-client) (cl-defgeneric jupyter-handle-update-display-data ((_client jupyter-kernel-client)
req _req
data _data
metadata _metadata
transient) _transient)
"Default update display handler" "Default update display handler"
nil) nil)