Skip to content

Commit 99aae09

Browse files
author
Christopher Doris
committed
noqa for missing references to julia modules
1 parent 67abf66 commit 99aae09

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

pysrc/juliacall/__init__.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def newmodule(name):
99
"A new module with the given name."
1010
global _newmodule
1111
if _newmodule is None:
12-
_newmodule = Main.seval("name -> (n1=Symbol(name); n2=gensym(n1); Main.@eval(module $n2; module $n1; end; end); Main.@eval $n2.$n1)")
12+
_newmodule = Main.seval("name -> (n1=Symbol(name); n2=gensym(n1); Main.@eval(module $n2; module $n1; end; end); Main.@eval $n2.$n1)") # noqa: F821
1313
return _newmodule(name)
1414

1515
_convert = None
@@ -18,15 +18,15 @@ def convert(T, x):
1818
"Convert x to a Julia T."
1919
global _convert
2020
if _convert is None:
21-
_convert = PythonCall.JlWrap.seval("pyjlcallback((T,x)->pyjl(pyconvert(pyjlvalue(T)::Type,x)))")
21+
_convert = PythonCall.JlWrap.seval("pyjlcallback((T,x)->pyjl(pyconvert(pyjlvalue(T)::Type,x)))") # noqa: F821
2222
return _convert(T, x)
2323

2424
def interactive(enable=True):
2525
"Allow the Julia event loop to run in the background of the Python REPL."
2626
if enable:
27-
PythonCall.Compat._set_python_input_hook()
27+
PythonCall.Compat._set_python_input_hook() # noqa: F821
2828
else:
29-
PythonCall.Compat._unset_python_input_hook()
29+
PythonCall.Compat._unset_python_input_hook() # noqa: F821
3030

3131
class JuliaError(Exception):
3232
"An error arising in Julia code."
@@ -36,9 +36,9 @@ def __str__(self):
3636
e = self.exception
3737
b = self.backtrace
3838
if b is None:
39-
return Base.sprint(Base.showerror, e)
39+
return Base.sprint(Base.showerror, e) # noqa: F821
4040
else:
41-
return Base.sprint(Base.showerror, e, b)
41+
return Base.sprint(Base.showerror, e, b) # noqa: F821
4242
@property
4343
def exception(self):
4444
return self.args[0]
@@ -241,7 +241,7 @@ def jlstr(x):
241241
CONFIG['inited'] = True
242242

243243
if CONFIG['opt_handle_signals'] is None:
244-
if Base.Threads.nthreads() > 1:
244+
if Base.Threads.nthreads() > 1: # noqa: F821
245245
# a warning to help multithreaded users
246246
# TODO: should we set PYTHON_JULIACALL_HANDLE_SIGNALS=yes whenever PYTHON_JULIACALL_THREADS != 1?
247247
warnings.warn(

0 commit comments

Comments
 (0)