Spaces:
Sleeping
Sleeping
refactor: declare julia as `Any` to avoid typing issues
Browse files- pysr/julia_import.py +4 -0
pysr/julia_import.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
| 1 |
import os
|
| 2 |
import sys
|
| 3 |
import warnings
|
|
|
|
| 4 |
|
| 5 |
# Check if JuliaCall is already loaded, and if so, warn the user
|
| 6 |
# about the relevant environment variables. If not loaded,
|
|
@@ -37,6 +38,9 @@ else:
|
|
| 37 |
|
| 38 |
from juliacall import Main as jl # type: ignore
|
| 39 |
|
|
|
|
|
|
|
|
|
|
| 40 |
jl_version = (jl.VERSION.major, jl.VERSION.minor, jl.VERSION.patch)
|
| 41 |
|
| 42 |
# Next, automatically load the juliacall extension if we're in a Jupyter notebook
|
|
|
|
| 1 |
import os
|
| 2 |
import sys
|
| 3 |
import warnings
|
| 4 |
+
from typing import Any
|
| 5 |
|
| 6 |
# Check if JuliaCall is already loaded, and if so, warn the user
|
| 7 |
# about the relevant environment variables. If not loaded,
|
|
|
|
| 38 |
|
| 39 |
from juliacall import Main as jl # type: ignore
|
| 40 |
|
| 41 |
+
jl: Any = jl # type: ignore
|
| 42 |
+
|
| 43 |
+
|
| 44 |
jl_version = (jl.VERSION.major, jl.VERSION.minor, jl.VERSION.patch)
|
| 45 |
|
| 46 |
# Next, automatically load the juliacall extension if we're in a Jupyter notebook
|