Skip to content

Commit

Permalink
Replace mutable default arguments with None.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 597859400
  • Loading branch information
DeepMind authored and copybara-github committed Jan 12, 2024
1 parent 94a2f03 commit 61ea983
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions android_env/components/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __init__(
self,
simulator: base_simulator.BaseSimulator,
task_manager: task_manager_lib.TaskManager,
config: config_classes.CoordinatorConfig = config_classes.CoordinatorConfig(),
config: config_classes.CoordinatorConfig | None = None,
):
"""Handles communication between AndroidEnv and its components.
Expand All @@ -55,7 +55,7 @@ def __init__(
"""
self._simulator = simulator
self._task_manager = task_manager
self._config = config
self._config = config or config_classes.CoordinatorConfig()
self._adb_call_parser: adb_call_parser.AdbCallParser = None
self._orientation = np.zeros(4, dtype=np.uint8)
self._interaction_thread: InteractionThread | None = None
Expand Down
4 changes: 2 additions & 2 deletions android_env/components/task_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class TaskManager:
def __init__(
self,
task: task_pb2.Task,
config: config_classes.TaskManagerConfig = config_classes.TaskManagerConfig(),
config: config_classes.TaskManagerConfig | None = None,
):
"""Controls task-relevant events and information.
Expand All @@ -53,7 +53,7 @@ def __init__(
"""

self._task = task
self._config = config
self._config = config or config_classes.TaskManagerConfig()
self._lock = threading.Lock()
self._logcat_thread = None
self._dumpsys_thread = None
Expand Down

0 comments on commit 61ea983

Please sign in to comment.