Skip to content

Commit 72e11c7

Browse files
committed
Fixed singleton issue
1 parent 75faf7b commit 72e11c7

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

mirte_robot/robot.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,10 @@ def get_instance(*args, **kwargs):
6363

6464
return get_instance
6565

66-
# We should not decorate the class here with @singleton. That will
67-
# prevent sphinx autodoc from generating the docs for this class.
66+
# TODO: We should not decorate the class here with @singleton. That will
67+
# prevent sphinx autodoc from generating the docs for this class. But the
68+
# previous check did not work.
69+
@singleton
6870
class Robot:
6971
"""Robot API
7072
@@ -890,5 +892,5 @@ def createRobot(
890892
"""
891893

892894
global mirte
893-
mirte = singleton(Robot(machine_namespace, hardware_namespace))
895+
mirte = Robot(machine_namespace, hardware_namespace)
894896
return mirte

0 commit comments

Comments
 (0)