Skip to content

Commit 388de1d

Browse files
committed
ci: fix stubgen by removing gym import
1 parent 9957f2f commit 388de1d

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed
Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
1-
from rcs_fr3 import desk, envs
1+
import sys
2+
3+
from rcs_fr3 import desk
24
from rcs_fr3._core import hw
35

46
__all__ = [
57
"desk",
6-
"envs",
78
"hw",
89
]
10+
11+
if "pybind11_stubgen" not in sys.modules:
12+
from rcs_panda import envs # noqa: F401
13+
14+
__all__.append("envs")
Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
1-
from rcs_panda import envs
1+
import sys
2+
23
from rcs_panda._core import hw
34

45
__all__ = [
5-
"envs",
66
"hw",
77
]
8+
9+
# prevent gymnasium import during stubgen, which can cause a segfault
10+
if "pybind11_stubgen" not in sys.modules:
11+
from rcs_panda import envs # type: ignore
12+
13+
__all__.append("envs")

0 commit comments

Comments
 (0)