Skip to content

Commit 46e90d6

Browse files
moar
1 parent daee9a1 commit 46e90d6

File tree

16 files changed

+16
-76
lines changed

16 files changed

+16
-76
lines changed

appium/webdriver/extensions/action_helpers.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,12 @@
1414

1515
from typing import TYPE_CHECKING, List, Optional, Tuple, cast
1616

17-
try:
18-
from typing import Self
19-
except (ImportError, AttributeError):
20-
from typing_extensions import Self
21-
2217
from selenium.webdriver.common.action_chains import ActionChains
2318
from selenium.webdriver.common.actions import interaction
2419
from selenium.webdriver.common.actions.action_builder import ActionBuilder
2520
from selenium.webdriver.common.actions.mouse_button import MouseButton
2621
from selenium.webdriver.common.actions.pointer_input import PointerInput
22+
from typing_extensions import Self
2723

2824
from appium.webdriver.webelement import WebElement
2925

appium/webdriver/extensions/android/common.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,9 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
try:
15-
from typing import Self
16-
except (ImportError, AttributeError):
17-
from typing_extensions import Self
1814

1915
from selenium.common.exceptions import UnknownMethodException
16+
from typing_extensions import Self
2017

2118
from appium.protocols.webdriver.can_execute_commands import CanExecuteCommands
2219
from appium.protocols.webdriver.can_execute_scripts import CanExecuteScripts

appium/webdriver/extensions/android/gsm.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,8 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
try:
16-
from typing import Self
17-
except (ImportError, AttributeError):
18-
from typing_extensions import Self
19-
2015
from selenium.common.exceptions import UnknownMethodException
16+
from typing_extensions import Self
2117

2218
from appium.common.helper import extract_const_attributes
2319
from appium.common.logger import logger

appium/webdriver/extensions/android/network.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,8 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
try:
16-
from typing import Self
17-
except (ImportError, AttributeError):
18-
from typing_extensions import Self
19-
2015
from selenium.common.exceptions import UnknownMethodException
16+
from typing_extensions import Self
2117

2218
from appium.common.helper import extract_const_attributes
2319
from appium.common.logger import logger

appium/webdriver/extensions/android/power.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,8 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
try:
16-
from typing import Self
17-
except (ImportError, AttributeError):
18-
from typing_extensions import Self
19-
2015
from selenium.common.exceptions import UnknownMethodException
16+
from typing_extensions import Self
2117

2218
from appium.protocols.webdriver.can_execute_commands import CanExecuteCommands
2319
from appium.protocols.webdriver.can_execute_scripts import CanExecuteScripts

appium/webdriver/extensions/android/sms.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,8 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
try:
16-
from typing import Self
17-
except (ImportError, AttributeError):
18-
from typing_extensions import Self
19-
2015
from selenium.common.exceptions import UnknownMethodException
16+
from typing_extensions import Self
2117

2218
from appium.protocols.webdriver.can_execute_commands import CanExecuteCommands
2319
from appium.protocols.webdriver.can_execute_scripts import CanExecuteScripts

appium/webdriver/extensions/clipboard.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,8 @@
1515
import base64
1616
from typing import Optional
1717

18-
try:
19-
from typing import Self
20-
except (ImportError, AttributeError):
21-
from typing_extensions import Self
22-
2318
from selenium.common.exceptions import UnknownMethodException
19+
from typing_extensions import Self
2420

2521
from appium.protocols.webdriver.can_execute_commands import CanExecuteCommands
2622
from appium.protocols.webdriver.can_execute_scripts import CanExecuteScripts

appium/webdriver/extensions/execute_mobile_command.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@
1414

1515
from typing import Any, Dict
1616

17-
try:
18-
from typing import Self
19-
except (ImportError, AttributeError):
20-
from typing_extensions import Self
17+
from typing_extensions import Self
2118

2219
from appium.protocols.webdriver.can_execute_scripts import CanExecuteScripts
2320

appium/webdriver/extensions/keyboard.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,8 @@
1414

1515
from typing import Dict, Optional
1616

17-
try:
18-
from typing import Self
19-
except (ImportError, AttributeError):
20-
from typing_extensions import Self
21-
2217
from selenium.common.exceptions import UnknownMethodException
18+
from typing_extensions import Self
2319

2420
from appium.protocols.webdriver.can_execute_commands import CanExecuteCommands
2521
from appium.protocols.webdriver.can_execute_scripts import CanExecuteScripts

appium/webdriver/extensions/location.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,8 @@
1414

1515
from typing import Dict, Union
1616

17-
try:
18-
from typing import Self
19-
except (ImportError, AttributeError):
20-
from typing_extensions import Self
21-
2217
from selenium.common.exceptions import UnknownMethodException
18+
from typing_extensions import Self
2319

2420
from appium.protocols.webdriver.can_execute_commands import CanExecuteCommands
2521
from appium.protocols.webdriver.can_execute_scripts import CanExecuteScripts

0 commit comments

Comments
 (0)