Skip to content

Commit

Permalink
Replace typing.Sequence with collections.abc.Sequence.
Browse files Browse the repository at this point in the history
Since Python 3.9 `typing.Sequence` has been deprecated in favor of
`collections.abc.Sequence`.

PiperOrigin-RevId: 584776281
  • Loading branch information
kenjitoyama authored and copybara-github committed Nov 23, 2023
1 parent 5e9ac3b commit acc0a30
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions android_env/components/app_screen_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@

"""Determines if the current app screen matches an expected app screen."""

from collections.abc import Sequence
import enum
import re
import time
from typing import Callable, Optional, Sequence, Pattern
from typing import Callable, Optional, Pattern

from absl import logging

from android_env.components import adb_call_parser as adb_call_parser_lib
from android_env.components import errors
from android_env.proto import adb_pb2
Expand Down
3 changes: 2 additions & 1 deletion android_env/components/log_stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@
"""Abstract class for handling a stream of logs from a simulator."""

import abc
from collections.abc import Sequence
import threading
from typing import Generator, Sequence
from typing import Generator
from absl import logging


Expand Down
3 changes: 2 additions & 1 deletion android_env/components/setup_step_interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@

"""A component that parses and processes SetupSteps."""

from collections.abc import Sequence
import copy
import time
from typing import Any, Sequence
from typing import Any

from absl import logging
from android_env.components import adb_call_parser as adb_call_parser_lib
Expand Down
2 changes: 1 addition & 1 deletion android_env/components/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

"""Utils for AndroidEnv."""

from typing import Sequence
from collections.abc import Sequence

from dm_env import specs
import numpy as np
Expand Down
2 changes: 1 addition & 1 deletion android_env/wrappers/discrete_action_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

"""Wraps the AndroidEnv environment to provide discrete actions."""

from typing import Sequence
from collections.abc import Sequence

from android_env.components import action_type
from android_env.wrappers import base_wrapper
Expand Down
2 changes: 1 addition & 1 deletion android_env/wrappers/image_rescale_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

"""Wraps the AndroidEnv environment to rescale the observations."""

from typing import Sequence
from collections.abc import Sequence

from android_env.wrappers import base_wrapper
import dm_env
Expand Down
2 changes: 1 addition & 1 deletion android_env/wrappers/tap_action_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

"""Wraps the AndroidEnv environment to provide tap actions of a given duration."""

from typing import Sequence
from collections.abc import Sequence

from android_env.components import action_type
from android_env.wrappers import base_wrapper
Expand Down

0 comments on commit acc0a30

Please sign in to comment.