Skip to content

Commit b62cc39

Browse files
committed
apply commit hook in this repo
1 parent 00f50d1 commit b62cc39

File tree

6 files changed

+33
-26
lines changed

6 files changed

+33
-26
lines changed

appium/options/common/supports_capabilities.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121

2222

2323
class SupportsCapabilities(Protocol):
24-
def set_capability(self: T, name: str, value: Any) -> T: ...
24+
def set_capability(self: T, name: str, value: Any) -> T:
25+
...
2526

26-
def get_capability(self: T, name: str) -> Any: ...
27+
def get_capability(self: T, name: str) -> Any:
28+
...

appium/protocols/webdriver/can_execute_commands.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@
2020
class CanExecuteCommands(Protocol):
2121
command_executor: RemoteConnection
2222

23-
def execute(self, driver_command: str, params: Union[Dict, None] = None) -> Dict: ...
23+
def execute(self, driver_command: str, params: Union[Dict, None] = None) -> Dict:
24+
...

appium/protocols/webdriver/can_execute_scripts.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,17 @@
1616

1717

1818
class CanExecuteScripts(Protocol):
19-
def pin_script(self, script: str, script_key: Optional[Any] = None) -> Any: ...
19+
def pin_script(self, script: str, script_key: Optional[Any] = None) -> Any:
20+
...
2021

21-
def unpin(self, script_key: Any) -> None: ...
22+
def unpin(self, script_key: Any) -> None:
23+
...
2224

23-
def get_pinned_scripts(self) -> List[str]: ...
25+
def get_pinned_scripts(self) -> List[str]:
26+
...
2427

25-
def execute_script(self, script: str, *args: Any) -> Any: ...
28+
def execute_script(self, script: str, *args: Any) -> Any:
29+
...
2630

27-
def execute_async_script(self, script: str, *args: Any) -> Any: ...
31+
def execute_async_script(self, script: str, *args: Any) -> Any:
32+
...

appium/protocols/webdriver/can_find_elements.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919

2020

2121
class CanFindElements(Protocol):
22-
def find_element(self, by: str, value: Union[str, Dict, None] = None) -> 'WebElement': ...
22+
def find_element(self, by: str, value: Union[str, Dict, None] = None) -> 'WebElement':
23+
...
2324

24-
def find_elements(self, by: str, value: Union[str, Dict, None] = None) -> List['WebElement']: ...
25+
def find_elements(self, by: str, value: Union[str, Dict, None] = None) -> List['WebElement']:
26+
...

appium/protocols/webdriver/can_remember_extension_presence.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818

1919

2020
class CanRememberExtensionPresence(Protocol):
21-
def assert_extension_exists(self: T, ext_name: str) -> T: ...
21+
def assert_extension_exists(self: T, ext_name: str) -> T:
22+
...
2223

23-
def mark_extension_absence(self: T, ext_name: str) -> T: ...
24+
def mark_extension_absence(self: T, ext_name: str) -> T:
25+
...

test/unit/webdriver/webdriver_test.py

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -368,27 +368,22 @@ class CustomAppiumConnection(AppiumConnection):
368368

369369
assert isinstance(driver.command_executor, CustomAppiumConnection)
370370

371-
372371
@httpretty.activate
373372
def test_extention_command_check(self):
374373
driver = android_w3c_driver()
375374
httpretty.register_uri(
376375
httpretty.POST, appium_command('/session/1234567890/execute/sync'), body='{"value": true}'
377376
)
378-
assert driver.execute_script(
379-
'mobile: startActivity',
380-
{
381-
'component': 'io.appium.android.apis/.accessibility.AccessibilityNodeProviderActivity'
382-
}
383-
) is True
384-
377+
assert (
378+
driver.execute_script(
379+
'mobile: startActivity',
380+
{'component': 'io.appium.android.apis/.accessibility.AccessibilityNodeProviderActivity'},
381+
)
382+
is True
383+
)
385384
assert {
386-
'args': [
387-
{
388-
'component': 'io.appium.android.apis/.accessibility.AccessibilityNodeProviderActivity'
389-
}
390-
],
391-
'script': 'mobile: startActivity'
385+
'args': [{'component': 'io.appium.android.apis/.accessibility.AccessibilityNodeProviderActivity'}],
386+
'script': 'mobile: startActivity',
392387
}, get_httpretty_request_body(httpretty.last_request())
393388

394389

0 commit comments

Comments
 (0)