Skip to content

Commit b506a17

Browse files
committed
Specify type for eval_str and api arguments
1 parent 4827695 commit b506a17

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

src/core.jl

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using Base.Meta: isexpr
22
using PyCall
3+
using PyCall: pyjlwrap_new
34
import Conda
45

56
const _getproperty = try
@@ -30,15 +31,17 @@ julia_exepath() =
3031
joinpath(VERSION < v"0.7.0-DEV.3073" ? JULIA_HOME : Base.Sys.BINDIR,
3132
Base.julia_exename())
3233

33-
_start_ipython(name::Symbol) = _start_ipython(getipythonjl(name))
34+
_start_ipython(name::Symbol) = _start_ipython(getipythonjl(name), PyAny)
3435
# helper function that is used only in tests
3536

36-
_start_ipython(f::PyObject) =
37-
pycall(
38-
f, Nothing,
39-
JuliaAPI.eval_str,
40-
JuliaAPI,
37+
function _start_ipython(f::PyObject,
38+
returntype = Nothing)
39+
return pycall(
40+
f, returntype,
41+
pyfunctionret(JuliaAPI.eval_str, PyObject, String),
42+
pyjlwrap_new(JuliaAPI),
4143
)
44+
end
4245

4346
start_ipython() = _start_ipython(_customized_ipython)
4447

0 commit comments

Comments
 (0)