@@ -29,11 +29,11 @@ function Comm(target,
2929 return comm
3030end
3131
32- comm_target (comm :: Comm{target} ) where {target} = target
32+ comm_target (comm :: Comm{target} ) where {target} = target:: Symbol
3333
3434function comm_info_request (sock, kernel, msg)
3535 reply = if haskey (msg. content, " target_name" )
36- t = Symbol (msg. content[" target_name" ])
36+ t = Symbol (msg. content[" target_name" ]:: String )
3737 filter (kv -> comm_target (kv. second) == t, kernel. comms)
3838 else
3939 # reply with all comms.
8787
8888function comm_open (sock, kernel, msg)
8989 if haskey (msg. content, " comm_id" )
90- comm_id = msg. content[" comm_id" ]
90+ comm_id = msg. content[" comm_id" ]:: String
9191 if haskey (msg. content, " target_name" )
92- target = msg. content[" target_name" ]
92+ target = msg. content[" target_name" ]:: String
9393 if ! haskey (msg. content, " data" )
9494 msg. content[" data" ] = Dict ()
9595 end
@@ -104,11 +104,13 @@ function comm_open(sock, kernel, msg)
104104 msg, " comm_close" ))
105105 end
106106 end
107+
108+ nothing
107109end
108110
109111function comm_msg (sock, kernel, msg)
110112 if haskey (msg. content, " comm_id" )
111- comm_id = msg. content[" comm_id" ]
113+ comm_id = msg. content[" comm_id" ]:: String
112114 if haskey (kernel. comms, comm_id)
113115 comm = kernel. comms[comm_id]
114116 else
@@ -121,11 +123,13 @@ function comm_msg(sock, kernel, msg)
121123 end
122124 comm. on_msg (msg)
123125 end
126+
127+ nothing
124128end
125129
126130function comm_close (sock, kernel, msg)
127131 if haskey (msg. content, " comm_id" )
128- comm_id = msg. content[" comm_id" ]
132+ comm_id = msg. content[" comm_id" ]:: String
129133 comm = kernel. comms[comm_id]
130134
131135 if ! haskey (msg. content, " data" )
@@ -135,6 +139,8 @@ function comm_close(sock, kernel, msg)
135139
136140 delete! (kernel. comms, comm. id)
137141 end
142+
143+ nothing
138144end
139145
140146end # module
0 commit comments